Пример #1
0
        void Awake()
        {
            this.Log("Awake");
            globalSettings   = TacLifeSupport.Instance.globalSettings;
            gameSettings     = TacLifeSupport.Instance.gameSettings;
            rosterWindow     = new RosterWindow(globalSettings, gameSettings);
            monitoringWindow = new LifeSupportMonitoringWindow(this, globalSettings, gameSettings, rosterWindow);
            GameEvents.onGUIApplicationLauncherReady.Add(OnGUIAppLauncherReady);
            OnGUIAppLauncherReady();
            configFilename = IOUtils.GetFilePathFor(this.GetType(), "LifeSupport.cfg");

            //Check if DeepFreeze is installed and set bool.
            var DeepFreezeassembly = (from a in AppDomain.CurrentDomain.GetAssemblies()
                                      where a.FullName.StartsWith("DeepFreeze")
                                      select a).FirstOrDefault();

            if (DeepFreezeassembly != null)
            {
                IsDFInstalled = true;
            }
            else
            {
                IsDFInstalled = false;
            }
        }
        void Awake()
        {
            this.Log("Awake");
            globalSettings = TacLifeSupport.Instance.globalSettings;
            gameSettings = TacLifeSupport.Instance.gameSettings;
            rosterWindow = new RosterWindow(globalSettings, gameSettings);
            monitoringWindow = new LifeSupportMonitoringWindow(this, globalSettings, gameSettings, rosterWindow);

            button = new ButtonWrapper(new Rect(Screen.width * 0.75f, 0, 32, 32), "ThunderAerospace/TacLifeSupport/Textures/greenIcon",
                "LS", "TAC Life Support Monitoring Window", OnIconClicked, "FlightIcon");

            configFilename = IOUtils.GetFilePathFor(this.GetType(), "LifeSupport.cfg");

            //Check if DeepFreeze is installed and set bool.
            var DeepFreezeassembly = (from a in AppDomain.CurrentDomain.GetAssemblies()
                    where a.FullName.StartsWith("DeepFreeze")
                    select a).FirstOrDefault();
            if (DeepFreezeassembly != null)
            {
                IsDFInstalled = true;
            }
            else
            {
                IsDFInstalled = false;
            }
        }
Пример #3
0
        public RosterWindow(AppLauncherToolBar TACMenuAppLToolBar, GlobalSettings globalSettings, TacGameSettings gameSettings)
            : base(TACMenuAppLToolBar, "Life Support Crew Roster", 320, 200)
        {
            this.globalSettings = globalSettings;
            this.gameSettings   = gameSettings;

            SetVisible(true);
        }
Пример #4
0
 public RosterWindow(AppLauncherToolBar TACMenuAppLToolBar, GlobalSettings globalSettings, TacGameSettings gameSettings)
     : base(TACMenuAppLToolBar, Localizer.Format("#autoLOC_TACLS_00026"), 370, 200) // #autoLOC_TACLS_00026 = Life Support Crew Roster
 {
     this.globalSettings = globalSettings;
     this.gameSettings   = gameSettings;
     cacheLocalStrings();
     SetVisible(true);
 }
Пример #5
0
        public RosterWindow(GlobalSettings globalSettings, TacGameSettings gameSettings)
            : base("Life Support Crew Roster", 320, 200)
        {
            this.globalSettings = globalSettings;
            this.gameSettings   = gameSettings;

            SetVisible(true);
        }
Пример #6
0
 public LifeSupportMonitoringWindow(LifeSupportController controller, GlobalSettings globalSettings, TacGameSettings gameSettings, RosterWindow rosterWindow)
     : base("Life Support Monitoring", 300, 300)
 {
     this.gameSettings = gameSettings;
     this.rosterWindow = rosterWindow;
     version           = Utilities.GetDllVersion(this);
     windowPos.y       = 75;
 }
Пример #7
0
 public SpaceCenterManager()
 {
     this.Log("Constructor");
     globalSettings = TacLifeSupport.Instance.globalSettings;
     gameSettings   = TacLifeSupport.Instance.gameSettings;
     button         = new ButtonWrapper(new Rect(Screen.width * 0.75f, 0, 32, 32), "ThunderAerospace/TacLifeSupport/Textures/greenIcon",
                                        "LS", "TAC Life Support Configuration Window", OnIconClicked, "SpaceCenterIcon");
     configWindow = new SavedGameConfigWindow(globalSettings, gameSettings);
 }
Пример #8
0
        public TacLifeSupport()
        {
            this.Log("Constructor");
            Instance       = this;
            gameSettings   = new TacGameSettings();
            globalSettings = new GlobalSettings();

            globalConfigFilename = IOUtils.GetFilePathFor(this.GetType(), "LifeSupport.cfg");
        }
Пример #9
0
 public SpaceCenterManager()
 {
     this.Log("Constructor");
     globalSettings = TacLifeSupport.Instance.globalSettings;
     gameSettings = TacLifeSupport.Instance.gameSettings;
     button = new ButtonWrapper(new Rect(Screen.width * 0.75f, 0, 32, 32), "ThunderAerospace/TacLifeSupport/Textures/greenIcon",
         "LS", "TAC Life Support Configuration Window", OnIconClicked, "SpaceCenterIcon");
     configWindow = new SavedGameConfigWindow(globalSettings, gameSettings);
 }
Пример #10
0
        public TacLifeSupport()
        {
            this.Log("Constructor");
            Instance = this;
            gameSettings = new TacGameSettings();
            globalSettings = new GlobalSettings();

            globalConfigFilename = IOUtils.GetFilePathFor(this.GetType(), "LifeSupport.cfg");
        }
Пример #11
0
        public SavedGameConfigWindow(GlobalSettings globalSettings, TacGameSettings gameSettings)
            : base("TAC Life Support Settings", 400, 300)
        {
            base.Resizable      = false;
            this.globalSettings = globalSettings;
            this.gameSettings   = gameSettings;

            version = Utilities.GetDllVersion(this);
        }
        void Awake()
        {
            this.Log("Awake");
            globalSettings = TacLifeSupport.Instance.globalSettings;
            gameSettings = TacLifeSupport.Instance.gameSettings;
            rosterWindow = new RosterWindow(globalSettings, gameSettings);
            monitoringWindow = new LifeSupportMonitoringWindow(this, globalSettings, gameSettings, rosterWindow);

            button = new ButtonWrapper(new Rect(Screen.width * 0.75f, 0, 32, 32), "ThunderAerospace/TacLifeSupport/Textures/greenIcon",
                "LS", "TAC Life Support Monitoring Window", OnIconClicked, "FlightIcon");

            configFilename = IOUtils.GetFilePathFor(this.GetType(), "LifeSupport.cfg");
        }
        void Awake()
        {
            this.Log("Awake");
            globalSettings   = TacLifeSupport.Instance.globalSettings;
            gameSettings     = TacLifeSupport.Instance.gameSettings;
            rosterWindow     = new RosterWindow(globalSettings, gameSettings);
            monitoringWindow = new LifeSupportMonitoringWindow(this, globalSettings, gameSettings, rosterWindow);

            button = new ButtonWrapper(new Rect(Screen.width * 0.75f, 0, 32, 32), "ThunderAerospace/TacLifeSupport/Textures/greenIcon",
                                       "LS", "TAC Life Support Monitoring Window", OnIconClicked, "FlightIcon");

            configFilename = IOUtils.GetFilePathFor(this.GetType(), "LifeSupport.cfg");
        }
Пример #14
0
 public override void OnLoad(ConfigNode gameNode)
 {
     base.OnLoad(gameNode);
     if (Enabled)
     {
         gameSettings = new TacGameSettings();
         gameSettings.Load(gameNode);
         if (HighLogic.LoadedScene == GameScenes.SPACECENTER)
         {
             TACEditorFilter.Instance.Setup();
         }
         for (int i = 0; i < children.Count; ++i)
         {
             if (children[i] is Savable)
             {
                 var child = children[i] as Savable;
                 child.Load(gameNode);
             }
         }
         //this.Log("OnLoad: " + gameNode);
     }
 }
Пример #15
0
 public override void OnLoad(ConfigNode gameNode)
 {
     base.OnLoad(gameNode);
     if (Enabled)
     {
         gameSettings = new TacGameSettings();
         gameSettings.Load(gameNode);
         if (HighLogic.LoadedScene == GameScenes.SPACECENTER)
         {
             TACEditorFilter.Instance.Setup();
         }
         for (int i = 0; i < children.Count; ++i)
         {
             if (children[i] is Savable)
             {
                 var child = children[i] as Savable;
                 child.Load(gameNode);
             }
         }
         //this.Log("OnLoad: " + gameNode);
     }
 }
Пример #16
0
 public SpaceCenterManager()
 {
     this.Log("Constructor");
     globalSettings = TacLifeSupport.Instance.globalSettings;
     gameSettings   = TacLifeSupport.Instance.gameSettings;
 }