Esempio n. 1
0
 public static bool AGX2VslActivateGroup(uint FlightID, int group, bool forceDir) //other vessel, direct activate group
 {
     print("AGX Call: Activate group for " + group + " for vessel " + FlightID + " in dir " + forceDir);
     if (HighLogic.LoadedSceneIsFlight)
     {
         if (FlightGlobals.ActiveVessel.rootPart.flightID == FlightID)
         {
             //print("this vsl");
             AGXFlight.ActivateActionGroupActivation(group, true, forceDir);
             return(true);
         }
         else
         {
             //print("other vsl");
             //ScreenMessages.PostScreenMessage("AGX Action Fail, other vessels not implemented yet", 10F, ScreenMessageStyle.UPPER_CENTER);
             //return false;
             AGXOtherVessel otherVsl = new AGXOtherVessel(FlightID);
             otherVsl.ActivateActionGroupActivation(group, true, forceDir);
             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);
     }
 }
Esempio n. 2
0
 public static bool RTDataReceive(ConfigNode node) //receive data back from RT
 {
     Debug.Log("AGX Call: RemoteTechCallback");
     if (HighLogic.LoadedSceneIsFlight)
     {
         if (FlightGlobals.ActiveVessel.rootPart.flightID == Convert.ToUInt32(node.GetValue("FlightID")))
         {
             AGXFlight.ActivateActionGroupActivation(Convert.ToInt32(node.GetValue("Group")), Convert.ToBoolean(node.GetValue("Force")), Convert.ToBoolean(node.GetValue("ForceDir")));
         }
         else
         {
             AGXOtherVessel otherVsl = new AGXOtherVessel(Convert.ToUInt32(node.GetValue("FlightID")));
             otherVsl.ActivateActionGroupActivation(Convert.ToInt32(node.GetValue("Group")), Convert.ToBoolean(node.GetValue("Force")), Convert.ToBoolean(node.GetValue("ForceDir")));
         }
     }
     else
     {
         ScreenMessages.PostScreenMessage("AGX Action Not Activated, Remotetech passed invalid vessel", 10F, ScreenMessageStyle.UPPER_CENTER);
     }
     return(false);
 }
Esempio n. 3
0
 public static bool AGX2VslToggleGroup(uint FlightID, int group) //other vessel direct toggle activate
 {
     print("AGX Call: toggle action " + group + " for vessel " + FlightID);
     if (HighLogic.LoadedSceneIsFlight)
     {
         if (FlightGlobals.ActiveVessel.rootPart.flightID == FlightID)
         {
             AGXFlight.ActivateActionGroupActivation(group, false, false);
             return(true);
         }
         else
         {
             AGXOtherVessel otherVsl = new AGXOtherVessel(FlightID);
             otherVsl.ActivateActionGroupActivation(group, false, false);
             return(true);
         }
     }
     else
     {
         return(false);
     }
 }