Exemple #1
0
        internal override void Process()
        {
            this.BuildingClassData    = (BuildingClassData)CSV.Tables.Get(Gamefile.Building_Classes).GetData(this.BuildingClass);
            this.BuildResourceData    = (ResourceData)CSV.Tables.Get(Gamefile.Resources).GetData(this.BuildResource);
            this.ProducesResourceData = (ResourceData)CSV.Tables.Get(Gamefile.Resources).GetData(this.ProducesResource);

            if (this.BuildingClassData == null)
            {
                throw new Exception("Buildings.csv: Building Class does not exist.");
            }

            if (this.BuildResourceData == null)
            {
                throw new Exception("Buildings.csv: Build Resource is invalid!.");
            }
        }
        internal override void Process()
        {
            this.gearUpBuildingData = DataTables.GetBuildingByName(this.GearUpBuilding);

            this.BuildingClassData           = DataTables.GetBuildingClassByName(this.BuildingClass);
            this.secondaryTargetingClassData = DataTables.GetBuildingClassByName(this.SecondaryTargetingClass);
            this.shopBuildingClassData       = DataTables.GetBuildingClassByName(this.ShopBuildingClass);
            this.BuildResourceData           = DataTables.GetResourceByName(this.BuildResource);
            this.ProducesResourceData        = DataTables.GetResourceByName(this.ProducesResource);

            if (this.BuildingClassData == null)
            {
                throw new Exception("Buildings.csv: Building Class does not exist.");
            }

            if (this.BuildResourceData == null)
            {
                throw new Exception("Buildings.csv: Build Resource is invalid!.");
            }
        }