diff --git a/industry/economies/firs_tropical.py b/industry/economies/firs_tropical.py index f1a9fe7d..b0ef9392 100644 --- a/industry/economies/firs_tropical.py +++ b/industry/economies/firs_tropical.py @@ -12,61 +12,48 @@ alcohol, beans, chemicals, - china_clay, coffee, copper, copper_ore, engineering_supplies, - explosives, farm_supplies, - fertiliser, fish, food, fruit, + goods, grain, livestock, mail, nitrates, oil, - paper, passengers, - peat, - phosphate, - potash, - pyrite_ore, - sulphur, - timber, tired_workers, water, - wood, wool, workers, zinc, ) from industry.industries import ( - nitrate_mine, + arable_farm, chemical_plant, - clay_pit, - fish_farm, + coffee_estate, + copper_ore_mine, + copper_smelter, fishing_grounds, fishing_harbor, - forest, + flour_mill, + food_processing_plant, general_store, - herding_coop, - paper_mill, - peatlands, - phosphate_mine, + nitrate_mine, + oil_wells, port, - potash_mine, - power_station, - pyrite_mine, - pyrite_smelter, - sawmill, + ranch, + stockyard, towns, trading_centre, + vineyard, water_supply, water_tower, - wharf, worker_yard, ) @@ -78,94 +65,77 @@ def __init__(self): def get_economy(self, parameters): ret = Economy( { + copper_ore_mine: PrimaryIndustry(copper_ore), nitrate_mine: PrimaryIndustry(nitrates), - clay_pit: PrimaryIndustry(china_clay), - peatlands: PrimaryIndustry(peat), - phosphate_mine: PrimaryIndustry(phosphate), - potash_mine: PrimaryIndustry(potash), - pyrite_mine: PrimaryIndustry(pyrite_ore), - fish_farm: PrimaryIndustry(fish), + oil_wells: PrimaryIndustry(oil), + arable_farm: PrimaryIndustry((grain, beans)), fishing_grounds: PrimaryIndustry(fish), - forest: PrimaryIndustry(wood), - herding_coop: PrimaryIndustry(food), - pyrite_smelter: SecondaryIndustry(pyrite_ore, (sulphur, zinc)), - sawmill: SecondaryIndustry(wood, timber), - chemical_plant: SecondaryIndustry( - (phosphate, sulphur, nitrates, potash), - (explosives, fertiliser), - ), + coffee_estate: PrimaryIndustry((fruit, coffee)), + ranch: PrimaryIndustry((livestock, wool)), + vineyard: PrimaryIndustry((fruit, alcohol)), + copper_smelter: SecondaryIndustry((copper_ore, chemicals), copper), + food_processing_plant: SecondaryIndustry((beans, fruit), food), + stockyard: SecondaryIndustry(livestock, food), + flour_mill: SecondaryIndustry(grain, food), + chemical_plant: SecondaryIndustry((nitrates, oil), chemicals), fishing_harbor: SecondaryIndustry(fish, food), - paper_mill: SecondaryIndustry((wood, sulphur, china_clay), paper), - power_station: TertiaryIndustry(peat), - general_store: TertiaryIndustry((explosives, fertiliser, zinc, timber)), - towns: Town(passengers, mail, food, paper), + general_store: TertiaryIndustry((alcohol, food, goods, wool, copper, coffee)), + towns: Town(passengers, mail, food, goods), }, parameters, ) if parameters["POLICY"] == "SELF_SUFFICIENT": - ret.graph[port] = FreePort((zinc, fertiliser, paper), (china_clay, nitrates)) - ret.graph[wharf] = FreePort((peat, timber, explosives), potash) + ret.graph[port] = FreePort((alcohol, coffee, wool, copper, food, chemicals), goods) del ret.graph[general_store] # FIXME elif parameters["POLICY"] in ("FREE_TRADE", "EXPORT"): - ret.graph[port] = FreePort((zinc, fertiliser, paper), (china_clay, nitrates)) - ret.graph[wharf] = FreePort((peat, timber, explosives), potash) + ret.graph[port] = FreePort((alcohol, coffee, wool, copper, food, chemicals), goods) del ret.graph[general_store] # FIXME - del ret.graph[potash_mine] - del ret.graph[nitrate_mine] - del ret.graph[clay_pit] + else: + ret.graph[towns].goods = alcohol + ret.graph[general_store].consumes = (alcohol, food, wool, copper, coffee) if parameters["PRIMARY_INDUSTRY_GROWTH"] == "UNIVERSAL_SUPPLIES": if nitrate_mine in ret.graph: ret.graph[nitrate_mine].boosters = engineering_supplies - if clay_pit in ret.graph: - ret.graph[clay_pit].boosters = engineering_supplies - if potash_mine in ret.graph: - ret.graph[potash_mine].boosters = engineering_supplies - ret.graph[peatlands].boosters = engineering_supplies - ret.graph[phosphate_mine].boosters = engineering_supplies - ret.graph[pyrite_mine].boosters = engineering_supplies + ret.graph[oil_wells].boosters = engineering_supplies + ret.graph[copper_ore_mine].boosters = engineering_supplies - ret.graph[fish_farm].boosters = engineering_supplies - ret.graph[forest].boosters = engineering_supplies - ret.graph[herding_coop].boosters = engineering_supplies + ret.graph[vineyard].boosters = engineering_supplies + ret.graph[arable_farm].boosters = engineering_supplies + ret.graph[coffee_estate].boosters = engineering_supplies + ret.graph[ranch].boosters = engineering_supplies if parameters["POLICY"] in ("SELF_SUFFICIENT", "FREE_TRADE", "EXPORT"): ret.graph[port].produces += (engineering_supplies,) - ret.graph[wharf].produces += (engineering_supplies,) else: - ret.graph[paper_mill].produces += (engineering_supplies,) + ret.graph[chemical_plant].produces += (engineering_supplies,) elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES": if nitrate_mine in ret.graph: ret.graph[nitrate_mine].boosters = engineering_supplies - if clay_pit in ret.graph: - ret.graph[clay_pit].boosters = engineering_supplies - if potash_mine in ret.graph: - ret.graph[potash_mine].boosters = engineering_supplies - ret.graph[peatlands].boosters = engineering_supplies - ret.graph[phosphate_mine].boosters = engineering_supplies - ret.graph[pyrite_mine].boosters = engineering_supplies + ret.graph[oil_wells].boosters = engineering_supplies + ret.graph[copper_ore_mine].boosters = engineering_supplies - ret.graph[fish_farm].boosters = farm_supplies - ret.graph[forest].boosters = farm_supplies - ret.graph[herding_coop].boosters = farm_supplies + ret.graph[vineyard].boosters = farm_supplies + ret.graph[arable_farm].boosters = farm_supplies + ret.graph[coffee_estate].boosters = farm_supplies + ret.graph[ranch].boosters = farm_supplies if parameters["POLICY"] in ("SELF_SUFFICIENT", "FREE_TRADE", "EXPORT"): ret.graph[port].produces += (engineering_supplies, farm_supplies) - ret.graph[wharf].produces += (engineering_supplies, farm_supplies) else: - ret.graph[paper_mill].produces += (engineering_supplies,) + ret.graph[copper_smelter].produces += (engineering_supplies,) ret.graph[chemical_plant].produces += (farm_supplies,) if parameters["WORKFORCE"].startswith("YETI"): if parameters["WORKFORCE"] == "YETI": - ret.graph[worker_yard] = WorkerYard(workers, boosters=(paper, zinc)) + ret.graph[worker_yard] = WorkerYard(workers, boosters=(food, wool)) elif parameters["WORKFORCE"] == "YETI_PASSENGERS": - ret.graph[worker_yard] = WorkerYard(workers, boosters=(paper, zinc, passengers)) + ret.graph[worker_yard] = WorkerYard(workers, boosters=(food, wool, passengers)) elif parameters["WORKFORCE"] == "YETI_MAIL": - ret.graph[worker_yard] = WorkerYard(workers, boosters=(paper, zinc, mail)) + ret.graph[worker_yard] = WorkerYard(workers, boosters=(food, wool, mail)) elif parameters["WORKFORCE"] == "YETI_TIRED": - ret.graph[worker_yard] = WorkerYard(workers, boosters=(paper, zinc, tired_workers)) + ret.graph[worker_yard] = WorkerYard(workers, boosters=(food, wool, tired_workers)) # FIXME: remove PRESET; support SECONDARY if parameters["WORKER_PARTICIPATION"] in ("PRESET", "NONE"): @@ -175,14 +145,11 @@ def get_economy(self, parameters): if parameters["WORKER_PARTICIPATION"] in ("PRIMARY_INDUSTRY", "SECONDARY_INDUSTRY", "BOTH"): for i in [ nitrate_mine, - clay_pit, - potash_mine, - peatlands, - phosphate_mine, - pyrite_mine, - fish_farm, - forest, - herding_coop, + oil_wells, + copper_ore_mine, + vineyard, + arable_farm, + ranch, ]: if i in ret.graph: ret.graph[i] = ret.graph[i].to_secondary(workers)