예제 #1
0
 public static void ClearStatics()
 {
     ShipListMod.Debug_Log("[ShipListMod] clearstatics called");
     SLStaticData.Clear();
     //SLStaticData.UpdateGameScene();
     AllVesselData.Clear();
     staticsInitialized = false;
 }
예제 #2
0
 ////////////////////////////////
 private SingleVesselData tryGetSingleVesselData(Vessel v)
 {
     if (v == null)
     {
         return(null);
     }
     try {
         return(AllVesselData.getData(v));
     } catch {
         Debug.LogError("[ShipListMod] getVesselData exception for \"" + v.GetName() + "\"");
         return(null);
     }
 }
예제 #3
0
        // public void Start() { }

        public void Update()
        {
            SLStaticData.UpdateGameScene();
            if (clearButton)
            {
                ShipListMod.Debug_Log("[ShipListMod] clearButton activated.");
                AllVesselData.Clear();
                clearButton = false;
            }

            // while in-flight, track the active vessel even if the gui is closed
            if ((HighLogic.LoadedSceneIsFlight) && (!showWindow))
            {
                tryGetSingleVesselData(FlightGlobals.ActiveVessel);
            }
        }