Skip to content

Commit

Permalink
(Aegis) unify parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Nov 6, 2023
1 parent c411ade commit 89b9078
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions industry/economies/firs_arctic.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def get_economy(self, parameters):
del ret.graph[ammonia_plant]
del ret.graph[clay_pit]

if parameters["BOOSTER"] == "UNIVERSAL":
if parameters["PRIMARY_INDUSTRY_GROWTH"] == "UNIVERSAL_SUPPLIES":
if ammonia_plant in ret.graph:
ret.graph[ammonia_plant].boosters = engineering_supplies
if clay_pit in ret.graph:
Expand All @@ -106,7 +106,7 @@ def get_economy(self, parameters):
ret.graph[herding_coop].boosters = engineering_supplies

ret.graph[paper_mill].produces += (engineering_supplies,)
elif parameters["BOOSTER"] == "GENERIC":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES":
if ammonia_plant in ret.graph:
ret.graph[ammonia_plant].boosters = engineering_supplies
if clay_pit in ret.graph:
Expand All @@ -122,7 +122,7 @@ def get_economy(self, parameters):

ret.graph[paper_mill].produces += (engineering_supplies,)
ret.graph[chemical_plant].produces += (farm_supplies,)
elif parameters["BOOSTER"] == "GENERIC_PASSENGERS":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES_PASSENGERS":
if ammonia_plant in ret.graph:
ret.graph[ammonia_plant].boosters = engineering_supplies
if clay_pit in ret.graph:
Expand Down
6 changes: 3 additions & 3 deletions industry/economies/firs_temperate.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ def get_economy(self, parameters):
ret.graph[port] = SecondaryIndustry(china_clay, chemicals)
# del ret.graph[clay_pit]

if parameters["BOOSTER"] == "UNIVERSAL":
if parameters["PRIMARY_INDUSTRY_GROWTH"] == "UNIVERSAL_SUPPLIES":
ret.graph[clay_pit].boosters = engineering_supplies
ret.graph[fish_farm].boosters = engineering_supplies
ret.graph[orchard_and_piggery].boosters = engineering_supplies

ret.graph[cider_mill].produces += (engineering_supplies,)
elif parameters["BOOSTER"] == "GENERIC":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES":
ret.graph[clay_pit].boosters = engineering_supplies
ret.graph[fish_farm].boosters = farm_supplies
ret.graph[orchard_and_piggery].boosters = farm_supplies

ret.graph[cider_mill].produces += (engineering_supplies, farm_supplies)
elif parameters["BOOSTER"] == "GENERIC_PASSENGERS":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES_PASSENGERS":
ret.graph[clay_pit].boosters = engineering_supplies
ret.graph[fish_farm].boosters = farm_supplies
ret.graph[orchard_and_piggery].boosters = farm_supplies
Expand Down
6 changes: 3 additions & 3 deletions industry/economies/vanilla_subarctic.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ def get_economy(self, parameters):
ret.graph[port] = SecondaryIndustry(wood, paper)
del ret.graph[paper_mill]

if parameters["BOOSTER"] == "UNIVERSAL":
if parameters["PRIMARY_INDUSTRY_GROWTH"] == "UNIVERSAL_SUPPLIES":
ret.graph[coal_mine].boosters = engineering_supplies
ret.graph[oil_wells].boosters = engineering_supplies
ret.graph[gold_mine].boosters = engineering_supplies
ret.graph[farm].boosters = engineering_supplies
ret.graph[forest].boosters = engineering_supplies

ret.graph[printing_works].produces += (engineering_supplies,)
elif parameters["BOOSTER"] == "GENERIC":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES":
ret.graph[coal_mine].boosters = engineering_supplies
ret.graph[oil_wells].boosters = engineering_supplies
ret.graph[gold_mine].boosters = engineering_supplies
Expand All @@ -89,7 +89,7 @@ def get_economy(self, parameters):

ret.graph[printing_works].produces += (engineering_supplies,)
ret.graph[oil_refinery].produces += (farm_supplies,)
elif parameters["BOOSTER"] == "GENERIC_PASSENGERS":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES_PASSENGERS":
ret.graph[coal_mine].boosters = engineering_supplies
ret.graph[oil_wells].boosters = passengers
ret.graph[gold_mine].boosters = engineering_supplies
Expand Down
4 changes: 2 additions & 2 deletions industry/economies/vanilla_subtropical.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ def get_economy(self, parameters):
},
parameters,
)
if parameters["BOOSTER"] == "UNIVERSAL":
if parameters["PRIMARY_INDUSTRY_GROWTH"] == "UNIVERSAL_SUPPLIES":
ret.graph[diamond_mine].boosters = engineering_supplies
ret.graph[oil_wells].boosters = engineering_supplies
ret.graph[copper_ore_mine].boosters = engineering_supplies
ret.graph[farm].boosters = engineering_supplies
ret.graph[lumber_mill].boosters = engineering_supplies

ret.graph[factory].produces += (engineering_supplies,)
elif parameters["BOOSTER"] == "GENERIC":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES":
ret.graph[diamond_mine].boosters = engineering_supplies
ret.graph[oil_wells].boosters = engineering_supplies
ret.graph[copper_ore_mine].boosters = engineering_supplies
Expand Down
4 changes: 2 additions & 2 deletions industry/economies/vanilla_temperate.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def get_economy(self, parameters):
},
parameters,
)
if parameters["BOOSTER"] == "UNIVERSAL":
if parameters["PRIMARY_INDUSTRY_GROWTH"] == "UNIVERSAL_SUPPLIES":
ret.graph[coal_mine].boosters = engineering_supplies
ret.graph[oil_wells].boosters = engineering_supplies
ret.graph[oil_rig].boosters = engineering_supplies
Expand All @@ -71,7 +71,7 @@ def get_economy(self, parameters):
ret.graph[forest].boosters = engineering_supplies

ret.graph[factory].produces += (engineering_supplies,)
elif parameters["BOOSTER"] == "GENERIC":
elif parameters["PRIMARY_INDUSTRY_GROWTH"] == "GENERIC_SUPPLIES":
ret.graph[coal_mine].boosters = engineering_supplies
ret.graph[oil_wells].boosters = engineering_supplies
ret.graph[oil_rig].boosters = engineering_supplies
Expand Down
12 changes: 6 additions & 6 deletions industry/lib/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
parameter_choices = SearchSpace(
[
("POLICY", ["AUTARKY", "SELF_SUFFICIENT", "FREE_TRADE", "EXPORT"]),
("BOOSTER", ["NONE", "UNIVERSAL", "GENERIC", "GENERIC_PASSENGERS"]),
("PRIMARY_INDUSTRY_GROWTH", ["NONE", "UNIVERSAL_SUPPLIES", "GENERIC_SUPPLIES", "SPECIFIC_SUPPLIES"]),
(
"WORKFORCE",
[
Expand Down Expand Up @@ -207,35 +207,35 @@
PRESETS = {
"VANILLA": {
"POLICY": "AUTARKY",
"BOOSTER": "NONE",
"PRIMARY_INDUSTRY_GROWTH": "NONE",
"WORKFORCE": "ABSTRACT",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"FIRS": {
"POLICY": "FREE_TRADE",
"BOOSTER": "GENERIC",
"PRIMARY_INDUSTRY_GROWTH": "GENERIC_SUPPLIES",
"WORKFORCE": "ABSTRACT",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"YETI": {
"POLICY": "AUTARKY",
"BOOSTER": "UNIVERSAL",
"PRIMARY_INDUSTRY_GROWTH": "UNIVERSAL_SUPPLIES",
"WORKFORCE": "YETI",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"CARIBBEAN": {
"POLICY": "EXPORT",
"BOOSTER": "GENERIC",
"PRIMARY_INDUSTRY_GROWTH": "GENERIC_SUPPLIES",
"WORKFORCE": "ABSTRACT",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"LUMBERJACK": {
"POLICY": "AUTARKY",
"BOOSTER": "GENERIC",
"PRIMARY_INDUSTRY_GROWTH": "GENERIC_SUPPLIES",
"WORKFORCE": "ABSTRACT",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
Expand Down

0 comments on commit 89b9078

Please sign in to comment.