public orbitbodytype getorbitbodytype()
{
if (!HighLogic.LoadedSceneIsFlight)
{
return orbitbodytype.ksc;
}
else if (FlightGlobals.ActiveVessel.mainBody == Sun)
{
return orbitbodytype.sun;
}
else if (FlightGlobals.ActiveVessel.mainBody.referenceBody != Sun)
{
return orbitbodytype.moon;
}
else
{
return orbitbodytype.planet;
}
}