From 46823ec812a1ec7634e96e07b3eb1a93bab6c693 Mon Sep 17 00:00:00 2001 From: "Yi Yang @ Anteros" Date: Mon, 20 Nov 2023 00:17:25 +0800 Subject: [PATCH] (Aegis) Update economies --- industry/economies/vanilla_subtropical.py | 14 +++++++++++--- industry/economies/vanilla_temperate.py | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/industry/economies/vanilla_subtropical.py b/industry/economies/vanilla_subtropical.py index da83f210..29e39bdd 100644 --- a/industry/economies/vanilla_subtropical.py +++ b/industry/economies/vanilla_subtropical.py @@ -100,9 +100,17 @@ def get_economy(self, parameters): ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, diamonds, mail)) elif parameters["WORKFORCE"] == "YETI_TIRED": ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, diamonds, tired_workers)) - ret.graph[diamond_mine].produces += (tired_workers,) - # FIXME - ret.graph[diamond_mine].boosters = workers + + # FIXME: remove PRESET; support SECONDARY + if parameters["WORKER_PARTICIPATION"] in ("PRESET", "NONE"): + ret.graph[diamond_mine].boosters = workers + if parameters["WORKFORCE"] == "YETI_TIRED": + ret.graph[diamond_mine].produces += (tired_workers,) + if parameters["WORKER_PARTICIPATION"] in ("PRIMARY_INDUSTRY", "SECONDARY_INDUSTRY", "BOTH"): + for i in [diamond_mine, oil_wells, copper_ore_mine, farm, lumber_mill]: + ret.graph[i] = ret.graph[i].to_secondary(workers) + if parameters["WORKFORCE"] == "YETI_TIRED": + ret.graph[i].produces += (tired_workers,) if parameters["TOWN_GOODS"] in ("ORGANIC", "FOOD_AND_WATER"): ret.graph[water_supply] = PrimaryIndustry(water) diff --git a/industry/economies/vanilla_temperate.py b/industry/economies/vanilla_temperate.py index 32bd14ae..a0b72196 100644 --- a/industry/economies/vanilla_temperate.py +++ b/industry/economies/vanilla_temperate.py @@ -107,9 +107,17 @@ def get_economy(self, parameters): ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, valuables, mail)) elif parameters["WORKFORCE"] == "YETI_TIRED": ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, valuables, tired_workers)) - ret.graph[coal_mine].produces += (tired_workers,) - # FIXME - ret.graph[coal_mine].boosters = workers + + # FIXME: remove PRESET; support SECONDARY + if parameters["WORKER_PARTICIPATION"] in ("PRESET", "NONE"): + ret.graph[coal_mine].boosters = workers + if parameters["WORKFORCE"] == "YETI_TIRED": + ret.graph[coal_mine].produces += (tired_workers,) + if parameters["WORKER_PARTICIPATION"] in ("PRIMARY_INDUSTRY", "SECONDARY_INDUSTRY", "BOTH"): + for i in [coal_mine, oil_wells, oil_rig, iron_ore_mine, farm, forest]: + ret.graph[i] = ret.graph[i].to_secondary(workers) + if parameters["WORKFORCE"] == "YETI_TIRED": + ret.graph[i].produces += (tired_workers,) if parameters["TOWN_GOODS"] in ("FOOD", "FOOD_AND_WATER"): ret.graph[food_processing_plant] = SecondaryIndustry(