Example #1
0
 public override void OnLoad(ConfigNode gameNode)
 {
     base.OnLoad(gameNode);
     RBgameSettings.Load(gameNode);
     // Load the global settings
     //if (File.Exists(globalConfigFilename))
     //{
     //    globalNode = ConfigNode.Load(globalConfigFilename);
     //    foreach (Savable s in children.Where(c => c is Savable))
     //    {
     //        s.Load(globalNode);
     //    }
     //}
     RSTLogWriter.debuggingOn = RBgameSettings.DebugLogging;
     if (HighLogic.CurrentGame.Mode == Game.Modes.SANDBOX && !Database.instance.enableInSandbox)
     {
         RBgameSettings.Enabled = false;
     }
     enabled  = RBgameSettings.Enabled;
     APIReady = true;
     if (RSTLogWriter.debuggingOn)
     {
         RSTLogWriter.Log_Debug("Scenario: " + HighLogic.LoadedScene + " OnLoad: \n ");
     }
     //    RSTLogWriter.Log_Debug("Scenario: " + HighLogic.LoadedScene + " OnLoad: \n " + gameNode + "\n" + globalNode);
     else
     {
         RSTLogWriter.Log("ResearchBodies Scenario Onload Completed.");
     }
 }
 public override void OnLoad(ConfigNode gameNode)
 {
     Database.instance.ResetBodiesforLoad();
     base.OnLoad(gameNode);
     RBgameSettings.Load(gameNode);
     if (Database.instance.RB_SettingsParms != null)
     {
         RSTLogWriter.debuggingOn = Database.instance.RB_SettingsParms.DebugLogging;
     }
     APIReady = true;
     if (RSTLogWriter.debuggingOn)
     {
         RSTLogWriter.Log_Debug("Scenario: " + HighLogic.LoadedScene + " OnLoad: \n ");
     }
     //    RSTLogWriter.Log_Debug("Scenario: " + HighLogic.LoadedScene + " OnLoad: \n " + gameNode + "\n" + globalNode);
     else
     {
         RSTLogWriter.Log("ResearchBodies Scenario Onload Completed.");
     }
     RSTLogWriter.Flush();
 }