Ejemplo n.º 1
0
 /// <summary>
 /// Find the simulator in flight or editor
 /// </summary>
 public void FindData()
 {
     if (HighLogic.LoadedSceneIsFlight)
     {
         activeVessel = FlightGlobals.ActiveVessel;
         SystemHeatVessel heatVessel = activeVessel.GetComponent <SystemHeatVessel>();
         if (heatVessel != null)
         {
             simulator = heatVessel.Simulator;
         }
         partCount = activeVessel.Parts.Count;
         if (SystemHeatSettings.DebugUI)
         {
             Utils.Log("[Debug UI]: Located Flight data");
         }
     }
     if (HighLogic.LoadedSceneIsEditor)
     {
         if (simulator == null)
         {
             simulator = SystemHeatEditor.Instance.Simulator;
             if (simulator != null && SystemHeatSettings.DebugUI)
             {
                 Utils.Log("[Debug UI]: Located Editor data");
             }
         }
     }
 }
Ejemplo n.º 2
0
        protected void FindSimulator(Vessel v)
        {
            if (HighLogic.LoadedSceneIsEditor)
            {
                simulator = SystemHeatEditor.Instance.Simulator;
            }
            if (HighLogic.LoadedSceneIsFlight)
            {
                SystemHeatVessel heatVessel = v.GetComponent <SystemHeatVessel>();
                if (heatVessel != null)
                {
                    simulator = heatVessel.Simulator;
                }

                Utils.Log($"[SystemHeatOverlay]: Located Flight data on vessel {v.vesselName}", LogType.UI);
            }
        }
Ejemplo n.º 3
0
 protected void FindSimulator()
 {
     if (HighLogic.LoadedSceneIsEditor)
     {
         simulator = SystemHeatEditor.Instance.Simulator;
     }
     if (HighLogic.LoadedSceneIsFlight)
     {
         SystemHeatVessel heatVessel = FlightGlobals.ActiveVessel.GetComponent <SystemHeatVessel>();
         if (heatVessel != null)
         {
             simulator = heatVessel.Simulator;
         }
         if (SystemHeatSettings.DebugUI)
         {
             Utils.Log($"[SystemHeatOverlay]: Located Flight data on vessel {FlightGlobals.ActiveVessel.vesselName}");
         }
     }
 }