public void Start() { EntryCostManager.FillUpgrades(); EntryCostDatabase.Initialize(); EntryCostDatabase.UpdatePartEntryCosts(); }
public void Start() { EntryCostManager.FillUpgrades(); EntryCostDatabase.Initialize(); EntryCostDatabase.UpdatePartEntryCosts(); // KSP's Funding binds to the same event and is used for deducting funds for entry purchases. // RF will need to bind to the event before KSP itself does to process ECMs right after KSP has updated the funding. // Note that KSP fires events in a reverse while loop. GameEvents.OnPartPurchased.Add(OnPartPurchased); }
public override void OnAwake() { base.OnAwake(); if (_instance != null) { Object.Destroy(this); return; } _instance = this; if (configUpgrades == null) // just in case { FillUpgrades(); } EntryCostDatabase.Initialize(); // should not be needed though. GameEvents.OnPartPurchased.Add(new EventData <AvailablePart> .OnEvent(onPartPurchased)); }