예제 #1
0
        public void OnLoad(ConfigNode cn)
        {
            Debug.Log("[Bureaucracy]: Budget Manager: OnLoad");
            ConfigNode managerNode    = cn.GetNode("BUDGET_MANAGER");
            double     nextBudgetTime = GetNextBudgetTime();

            if (managerNode != null)
            {
                int.TryParse(managerNode.GetValue("FundingAllocation"), out int i);
                FundingAllocation = i;
                double.TryParse(managerNode.GetValue("nextBudget"), out nextBudgetTime);
            }
            NextBudget = new BudgetEvent(nextBudgetTime, this, NeedNewKacAlarm());
            ConfigNode costsNode = cn.GetNode("COSTS");

            Costs.Instance.OnLoad(costsNode);
            Debug.Log("[Bureaucracy]: Budget Manager: OnLoad Complete");
        }
예제 #2
0
 public override void OnEventCompletedManagerActions(BureaucracyEvent eventCompleted)
 {
     Debug.Log("[Bureaucracy]: Budget Event completed. Setting next budget");
     NextBudget = new BudgetEvent(GetNextBudgetTime(), this, true);
 }