Beispiel #1
0
 public void OnLoad(ConfigNode[] facilityNodes)
 {
     for (int i = 0; i < facilityNodes.Length; i++)
     {
         ConfigNode cn = facilityNodes.ElementAt(i);
         if (cn.GetValue("Name") != Name)
         {
             continue;
         }
         bool.TryParse(cn.GetValue("RecentlyUpgraded"), out recentlyUpgraded);
         bool.TryParse(cn.GetValue("Closed"), out isClosed);
         bool.TryParse(cn.GetValue("isPriority"), out IsPriority);
         int.TryParse(cn.GetValue("LaunchesThisMonth"), out LaunchesThisMonth);
         SetCosts();
         ConfigNode upgradeNode = cn.GetNode("UPGRADE");
         if (upgradeNode == null)
         {
             return;
         }
         Upgrading = true;
         Upgrade   = new FacilityUpgradeEvent(upgradeNode.GetValue("ID"), this);
         Upgrade.OnLoad(upgradeNode);
     }
 }