public void AddYieldChange(BuildingYieldChange yc) { if (yc == null) { return; } doesThisChangeYields = true; buildingYieldChanges.Add(yc); }
static void LoadBuildingBlueprints() { //could possibly load from xml file BuildingBlueprint bb; BuildingYieldChange yield; int id = 0; //culture test bb = new BuildingBlueprint(id, "Monument"); yield = new BuildingYieldChange(BuildingYieldChange.YieldType.YIELD_CULTURE, 2); bb.AddYieldChange(yield); buildings.Add(id++, bb); //food test bb = new BuildingBlueprint(id, "Granary"); yield = new BuildingYieldChange(BuildingYieldChange.YieldType.YIELD_FOOD, 2); bb.AddYieldChange(yield); buildings.Add(id++, bb); //gold test bb = new BuildingBlueprint(id, "Market"); yield = new BuildingYieldChange(BuildingYieldChange.YieldType.YIELD_GOLD, 2); bb.AddYieldChange(yield); yield = new BuildingYieldChange(BuildingYieldChange.YieldType.YIELD_GOLD_PERCENT, .50f); bb.AddYieldChange(yield); buildings.Add(id++, bb); //science test bb = new BuildingBlueprint(id, "Library"); yield = new BuildingYieldChange(BuildingYieldChange.YieldType.YIELD_SCIENCE, 2); bb.AddYieldChange(yield); buildings.Add(id++, bb); //production test bb = new BuildingBlueprint(id, "Workshop"); yield = new BuildingYieldChange(BuildingYieldChange.YieldType.YIELD_PRODUCTION, 2); bb.AddYieldChange(yield); buildings.Add(id++, bb); }