diff --git a/industry/economies/vanilla_subarctic.py b/industry/economies/vanilla_subarctic.py index 98fecc92..73dd5d94 100644 --- a/industry/economies/vanilla_subarctic.py +++ b/industry/economies/vanilla_subarctic.py @@ -119,16 +119,22 @@ def get_economy(self, parameters): elif parameters["WORKFORCE"] == "YETI_TIRED": ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, gold, tired_workers)) - # FIXME: remove PRESET; support SECONDARY + # FIXME: remove PRESET 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"): + if parameters["WORKER_PARTICIPATION"] in ("PRIMARY_INDUSTRY", "BOTH"): for i in [coal_mine, oil_wells, gold_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["WORKER_PARTICIPATION"] in ("SECONDARY_INDUSTRY", "BOTH"): + for i in [food_processing_plant, paper_mill, oil_refinery, printing_works]: + if i in ret.graph: + ret.graph[i].boosters += (workers,) + if parameters["WORKFORCE"] == "YETI_TIRED": + ret.graph[i].produces += (tired_workers,) if port in ret.graph: if parameters["SEA_INDUSTRY"] == "LAND_ONLY": diff --git a/industry/economies/vanilla_subtropical.py b/industry/economies/vanilla_subtropical.py index 29e39bdd..c00a7275 100644 --- a/industry/economies/vanilla_subtropical.py +++ b/industry/economies/vanilla_subtropical.py @@ -106,11 +106,16 @@ def get_economy(self, parameters): 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"): + if parameters["WORKER_PARTICIPATION"] in ("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["WORKER_PARTICIPATION"] in ("PRIMARY_INDUSTRY", "BOTH"): + for i in [food_processing_plant, oil_refinery, factory]: + ret.graph[i].boosters += (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 a0b72196..bd1e6adf 100644 --- a/industry/economies/vanilla_temperate.py +++ b/industry/economies/vanilla_temperate.py @@ -108,16 +108,21 @@ def get_economy(self, parameters): elif parameters["WORKFORCE"] == "YETI_TIRED": ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, valuables, tired_workers)) - # FIXME: remove PRESET; support SECONDARY + # FIXME: remove PRESET 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"): + if parameters["WORKER_PARTICIPATION"] in ("PRIMARY_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["WORKER_PARTICIPATION"] in ("SECONDARY_INDUSTRY", "BOTH"): + for i in [factory, oil_refinery, sawmill, steel_mill]: + ret.graph[i].boosters += (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( diff --git a/industry/lib/economy/__init__.py b/industry/lib/economy/__init__.py index f51f1e5c..c58d9669 100644 --- a/industry/lib/economy/__init__.py +++ b/industry/lib/economy/__init__.py @@ -71,7 +71,7 @@ def __init__(self, consumes=(), produces=(), extra_accepts=(), boosters=()): self.boosters = make_tuple(boosters) def copy(self): - return SecondaryIndustry(self.consumes, self.produces, self.extra_accepts) + return SecondaryIndustry(self.consumes, self.produces, self.extra_accepts, self.boosters) @property def accepts(self):