コード例 #1
0
 public static bool AGX2VslActivateGroupNameDelayCheck(uint flightID, string grpName, bool forceDir)
 {
     try
     {
         print("AGX Call: activate group by name for " + grpName + " for " + flightID + " in dir " + forceDir);
         if (HighLogic.LoadedSceneIsFlight) //only workes in flight
         {
             if (FlightGlobals.ActiveVessel.rootPart.flightID == flightID)
             {
                 return(AGXActivateGroupNameDelayCheck(grpName, forceDir));
             }
             else
             {
                 AGXOtherVessel otherVsl = new AGXOtherVessel(flightID);
                 otherVsl.ActivateActionString(grpName, true, forceDir);
                 return(true);
             }
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }
コード例 #2
0
 public static bool AGX2VslToggleGroupNameDelayCheck(uint flightID, string grpName, bool forceDir)
 {
     try
     {
         Log.trace("Call: toggle group by name for {0} for {1} in dir {2}", grpName, flightID, forceDir);
         if (HighLogic.LoadedSceneIsFlight) //only workes in flight
         {
             if (FlightGlobals.ActiveVessel.rootPart.flightID == flightID)
             {
                 return(AGXToggleGroupNameDelayCheck(grpName));
             }
             else
             {
                 AGXOtherVessel otherVsl = new AGXOtherVessel(flightID);
                 otherVsl.ActivateActionString(grpName, false, false);
                 return(true);
             }
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         return(false);
     }
 }