Skip to content

Commit

Permalink
(Aegis) Extend the worker rules to FIRS economies
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Nov 19, 2023
1 parent 4a9a422 commit 6789822
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions industry/economies/firs_arctic.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,18 @@ def get_economy(self, parameters):
ret.graph[worker_yard] = WorkerYard(workers, boosters=(paper, zinc, mail))
elif parameters["WORKFORCE"] == "YETI_TIRED":
ret.graph[worker_yard] = WorkerYard(workers, boosters=(paper, zinc, tired_workers))
ret.graph[peatlands].produces += (tired_workers,)

ret.graph[fishing_grounds].boosters = workers
# FIXME: remove PRESET; support SECONDARY
if parameters["WORKER_PARTICIPATION"] in ("PRESET", "NONE"):
ret.graph[fishing_grounds].boosters = workers
if parameters["WORKFORCE"] == "YETI_TIRED":
ret.graph[fishing_grounds].produces += (tired_workers,)
if parameters["WORKER_PARTICIPATION"] in ("PRIMARY_INDUSTRY", "SECONDARY_INDUSTRY", "BOTH"):
for i in [ammonia_plant, clay_pit, potash_mine, peatlands, phosphate_mine, pyrite_mine]:
if i in ret.graph:
ret.graph[i] = ret.graph[i].to_secondary(workers)
if parameters["WORKFORCE"] == "YETI_TIRED":
ret.graph[i].produces += (tired_workers,)

if port in ret.graph:
if parameters["SEA_INDUSTRY"] == "LAND_ONLY":
Expand Down
13 changes: 11 additions & 2 deletions industry/economies/firs_temperate.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,18 @@ def get_economy(self, parameters):
ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, alcohol, mail))
elif parameters["WORKFORCE"] == "YETI_TIRED":
ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, alcohol, tired_workers))
ret.graph[orchard_and_piggery].produces += (tired_workers,)

ret.graph[fishing_grounds].boosters = workers
# FIXME: remove PRESET; support SECONDARY
if parameters["WORKER_PARTICIPATION"] in ("PRESET", "NONE"):
ret.graph[fishing_grounds].boosters = workers
if parameters["WORKFORCE"] == "YETI_TIRED":
ret.graph[fishing_grounds].produces += (tired_workers,)
if parameters["WORKER_PARTICIPATION"] in ("PRIMARY_INDUSTRY", "SECONDARY_INDUSTRY", "BOTH"):
for i in [clay_pit, coal_mine, dredging_site, iron_ore_mine, dairy_farm, orchard_and_piggery]:
if i in ret.graph:
ret.graph[i] = ret.graph[i].to_secondary(workers)
if parameters["WORKFORCE"] == "YETI_TIRED":
ret.graph[i].produces += (tired_workers,)

if port in ret.graph:
if parameters["SEA_INDUSTRY"] == "LAND_ONLY":
Expand Down

0 comments on commit 6789822

Please sign in to comment.