Example #1
0
 public static bool AGX2VslToggleGroupDelayCheck(uint FlightID, int group) //other vessel toggle, delay check
 {
     print("AGX Call: toggle action " + group + " for vessel " + FlightID);
     if (HighLogic.LoadedSceneIsFlight)
     {
         if (FlightGlobals.ActiveVessel.rootPart.flightID == FlightID)
         {
             AGXFlight.ActivateActionGroup(group);
             return(true);
         }
         else
         {
             AGXOtherVessel otherVsl = new AGXOtherVessel(FlightID);
             otherVsl.ActivateActionGroup(group, false, false);
             return(true);
         }
     }
     else
     {
         // ScreenMessages.PostScreenMessage("AGX Action Not Activated, not in flight", 10F, ScreenMessageStyle.UPPER_CENTER);
         ScreenMessages.PostScreenMessage(Localizer.Format("#AGEXT_UI_SCREEN_MESSAGE_3"), 10F, ScreenMessageStyle.UPPER_CENTER);
         return(false);
     }
 }
Example #2
0
 public static List <AGXAction> AGX2VslAllAssignedActions(uint FlightID) //works //all actions on specific vessel, returns AGXAction, can other mods use this?
 {
     Log.Info("AGX Call: List all assigned actions for vessel " + FlightID);
     if (HighLogic.LoadedSceneIsFlight)
     {
         if (FlightGlobals.ActiveVessel.rootPart.flightID == FlightID)
         {
             return(StaticData.CurrentVesselActions);
         }
         else
         {
             AGXOtherVessel otherVsl = new AGXOtherVessel(FlightID);
             return(otherVsl.GetAssignedActions());
         }
     }
     else if (HighLogic.LoadedSceneIsEditor)
     {
         return(StaticData.CurrentVesselActions);
     }
     else
     {
         return(new List <AGXAction>());
     }
 }