public static bool CanBuyUpgrade(string ID)
        {
            PlayerUpgrade up = (PlayerUpgrade)Upgrades.Get_Upgrade(Upgrade_Type.PLAYER_UPGRADE, ID);

            if (up == null)
            {
                return(false);
            }

            return(CanBuyUpgrade(up));
        }
Beispiel #2
0
        internal void Load(LandPlot pl, Plot_Upgrades up)
        {
            this.plot = pl;
            this.ID   = new PlotID(plot);
            foreach (string upgradeName in up.upgrades)
            {
                PlotUpgrade upgrade = (PlotUpgrade)Upgrades.Get_Upgrade(Upgrade_Type.PLOT_UPGRADE, upgradeName);

                if (upgrade != null)
                {
                    this.upgrades.Add(upgrade);
                }
                else
                {
                    upgrades_missing.Add(upgradeName);
                }
            }
        }