示例#1
0
 public override void OnLoad(ConfigNode gameNode)
 {
     base.OnLoad(gameNode);
     RMGameSettings.Load(gameNode);
     RMKerbals.Load(gameNode);
     if (HighLogic.CurrentGame.Mode == Game.Modes.CAREER)
     {
         return;
     }
     //Salaries and Profession change charing are disabled in non-career mode games.
     RMGameSettings.EnableSalaries         = false;
     RMGameSettings.ChangeProfessionCharge = false;
 }
示例#2
0
        public override void OnAwake()
        {
            RmUtils.LogMessage("RosterManagerLifeSpan.Awake Active...", "info", RMSettings.VerboseLogging);
            base.OnAwake();
            _instance      = this;
            RMKerbals      = new RMKerbals();
            RMGameSettings = new RMGameSettings();

            switch (HighLogic.LoadedScene)
            {
            case GameScenes.SPACECENTER:
            {
                RmUtils.LogMessage("RosterManagerLifeSpan.Awake adding SpaceCenterManager", "info", RMSettings.VerboseLogging);
                RMLifeSpanAddon klMem = gameObject.AddComponent <RMLifeSpanAddon>();
                _children.Add(klMem);
            }
            break;

            case GameScenes.FLIGHT:
            {
                RmUtils.LogMessage("RosterManagerLifeSpan.Awake adding FlightManager", "info", RMSettings.VerboseLogging);
                RMLifeSpanAddon klMem = gameObject.AddComponent <RMLifeSpanAddon>();
                _children.Add(klMem);
            }
            break;

            case GameScenes.EDITOR:
            {
                RmUtils.LogMessage("RosterManagerLifeSpan.Awake adding EditorManager", "info", RMSettings.VerboseLogging);
                RMLifeSpanAddon klMem = gameObject.AddComponent <RMLifeSpanAddon>();
                _children.Add(klMem);
            }
            break;

            case GameScenes.TRACKSTATION:
            {
                RmUtils.LogMessage("RosterManagerLifeSpan.Awake adding TrackingStationManager", "info", RMSettings.VerboseLogging);
                RMLifeSpanAddon klMem = gameObject.AddComponent <RMLifeSpanAddon>();
                _children.Add(klMem);
            }
            break;

            case GameScenes.LOADING:
                break;

            case GameScenes.LOADINGBUFFER:
                break;

            case GameScenes.MAINMENU:
                break;

            case GameScenes.SETTINGS:
                break;

            case GameScenes.CREDITS:
                break;

            case GameScenes.PSYSTEM:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#3
0
 public override void OnSave(ConfigNode gameNode)
 {
     base.OnSave(gameNode);
     RMGameSettings.Save(gameNode);
     RMKerbals.Save(gameNode);
 }