예제 #1
0
 private void Awake()
 {
     //Mod starts here.
     settings = new SettingsClass();
     RegisterBureaucracyManagers();
     Instance           = this;
     lastProgressUpdate = Planetarium.GetUniversalTime();
     Debug.Log("[Bureaucracy]: Awake");
 }
예제 #2
0
 public SettingsClass()
 {
     Instance    = this;
     defaultPath = KSPUtil.ApplicationRootPath + "/GameData/Bureaucracy/defaultSettings.cfg";
     savePath    = KSPUtil.ApplicationRootPath + "/saves/" + HighLogic.SaveFolder + "/BureaucracySettings.cfg";
     if (!File.Exists(defaultPath))
     {
         Debug.Log("[Bureaucracy]: Can't find default settings file. Creating it");
         OnSave(defaultPath);
     }
     if (!File.Exists(savePath))
     {
         Debug.Log("[Bureaucracy]: Can't find settings file for save. Creating it");
         OnLoad(defaultPath);
         OnSave(savePath);
     }
     else
     {
         OnLoad(savePath);
     }
 }