public override void OnLoad(ConfigNode node) { base.OnLoad(node); if (Config == null) { Config = new LRTRHomeWorldParameters(); foreach (ConfigNode stg in GameDatabase.Instance.GetConfigNodes("HOMEWORLDPARAMETERS")) { Config.Load(stg); } } if (Settings == null) { Settings = new MaintenanceSettings(); foreach (ConfigNode n in GameDatabase.Instance.GetConfigNodes("MAINTENANCESETTINGS")) { Settings.Load(n); } } if (HighLogic.LoadedScene == GameScenes.SPACECENTER) { // Need to load the facility upgrade prices after CustomBarnKit has finished patching them GameEvents.onLevelWasLoaded.Add(LoadUpgradesPrices); } }
public override void OnLoad(ConfigNode node) { base.OnLoad(node); foreach (ConfigNode n in GameDatabase.Instance.GetConfigNodes("MAINTENANCESETTINGS")) { settings.Load(n); } if (HighLogic.LoadedScene == GameScenes.SPACECENTER) { // Need to load the facility upgrade prices after CustomBarnKit has finished patching them GameEvents.onLevelWasLoaded.Add(LoadUpgradesPrices); } }