Skip to content

Commit

Permalink
(Aegis) really pass the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Nov 19, 2023
1 parent 37121b8 commit e61dd71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion industry/aegis_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def main():
try:
validate(economy)
except AssertionError:
print(f"Economy: {meta_economy.name}")
print(f"Economy: {meta_economy.translation_name}")
for k, v in variation.items():
print(f"{k}: {v}")
raise
Expand Down
13 changes: 5 additions & 8 deletions industry/economies/vanilla_subarctic.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,12 @@ def get_economy(self, parameters):
elif parameters["WORKFORCE"] == "YETI_TIRED":
ret.graph[worker_yard] = WorkerYard(workers, boosters=(goods, gold, tired_workers))

if parameters["WORKER_PARTICIPATION"] == "NONE":
# FIXME: remove PRESET; support SECONDARY
if parameters["WORKER_PARTICIPATION"] in ("PRESET", "NONE"):
ret.graph[coal_mine].boosters = workers
elif parameters["WORKER_PARTICIPATION"] == "PRIMARY_INDUSTRY":
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,)
elif parameters["WORKER_PARTICIPATION"] == "SECONDARY_INDUSTRY":
# FIXME
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, gold_mine, farm, forest]:
ret.graph[i] = ret.graph[i].to_secondary(workers)
if parameters["WORKFORCE"] == "YETI_TIRED":
Expand Down

0 comments on commit e61dd71

Please sign in to comment.