Skip to content

Commit

Permalink
(Aegis) Fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Nov 18, 2023
1 parent e773b82 commit 459c0dd
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 6 deletions.
2 changes: 1 addition & 1 deletion agrf/split_action/meta_sprite_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def dynamic_definitions(self, all_choices, parameters, i=0):
var_id = all_choices[i]
sublists = []
hashes = []
for choice in range(len(self._parameter_list.parameters[var_id].enum)):
for choice in self._parameter_list.parameters[var_id].enum.keys():
parameters[var_id] = choice
sublist, h = self.dynamic_definitions(all_choices, parameters, i + 1)
sublists.append(sublist)
Expand Down
54 changes: 49 additions & 5 deletions industry/aegis_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,54 @@ def initialize_metadata():

for industry in all_industries:
industry._props["exists"] = SplitDefinition(
("ECONOMY", "POLICY", "PRIMARY_INDUSTRY_GROWTH", "WORKFORCE", "SEA_INDUSTRY", "TOWN_GOODS"), {}
(
"ECONOMY",
"POLICY",
"PRIMARY_INDUSTRY_GROWTH",
"WORKFORCE",
"WORKER_PARTICIPATION",
"SEA_INDUSTRY",
"TOWN_GOODS",
),
{},
)
industry._props["production_types"] = SplitDefinition(
("ECONOMY", "POLICY", "PRIMARY_INDUSTRY_GROWTH", "WORKFORCE", "SEA_INDUSTRY", "TOWN_GOODS"), {}
(
"ECONOMY",
"POLICY",
"PRIMARY_INDUSTRY_GROWTH",
"WORKFORCE",
"WORKER_PARTICIPATION",
"SEA_INDUSTRY",
"TOWN_GOODS",
),
{},
)
industry._props["acceptance_types"] = SplitDefinition(
("ECONOMY", "POLICY", "PRIMARY_INDUSTRY_GROWTH", "WORKFORCE", "SEA_INDUSTRY", "TOWN_GOODS"), {}
(
"ECONOMY",
"POLICY",
"PRIMARY_INDUSTRY_GROWTH",
"WORKFORCE",
"WORKER_PARTICIPATION",
"SEA_INDUSTRY",
"TOWN_GOODS",
),
{},
)

for cargo in all_cargos:
cargo._props["exists"] = SplitDefinition(
("ECONOMY", "POLICY", "PRIMARY_INDUSTRY_GROWTH", "WORKFORCE", "SEA_INDUSTRY", "TOWN_GOODS"), {}
(
"ECONOMY",
"POLICY",
"PRIMARY_INDUSTRY_GROWTH",
"WORKFORCE",
"WORKER_PARTICIPATION",
"SEA_INDUSTRY",
"TOWN_GOODS",
),
{},
)

for i, meta_economy in enumerate(all_economies):
Expand All @@ -55,7 +91,15 @@ def initialize_metadata():
4: "BASIC_ARCTIC",
}[i],
) + tuple(
variation[i] for i in ("POLICY", "PRIMARY_INDUSTRY_GROWTH", "WORKFORCE", "SEA_INDUSTRY", "TOWN_GOODS")
variation[i]
for i in (
"POLICY",
"PRIMARY_INDUSTRY_GROWTH",
"WORKFORCE",
"WORKER_PARTICIPATION",
"SEA_INDUSTRY",
"TOWN_GOODS",
)
)
for industry in all_industries:
if industry in economy.industries:
Expand Down
6 changes: 6 additions & 0 deletions industry/lib/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
],
)
docs_parameter_choices.update_params("WORKFORCE", ["ABSTRACT", "PROFESSIONAL", "YETI"])
docs_parameter_choices.update_params("WORKER_PARTICIPATION", ["NONE", "PRIMARY_INDUSTRY", "SECONDARY_INDUSTRY"])
docs_parameter_choices.update_params("SEA_INDUSTRY", ["ORGANIC"])
docs_parameter_choices.update_params("TOWN_GOODS", ["ORGANIC"])

Expand All @@ -251,34 +252,39 @@
"POLICY": "AUTARKY",
"PRIMARY_INDUSTRY_GROWTH": "NONE",
"WORKFORCE": "ABSTRACT",
"WORKER_PARTICIPATION": "NONE",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"FIRS": {
"POLICY": "FREE_TRADE",
"PRIMARY_INDUSTRY_GROWTH": "GENERIC_SUPPLIES",
"WORKFORCE": "ABSTRACT",
"WORKER_PARTICIPATION": "NONE",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"YETI": {
"POLICY": "AUTARKY",
"PRIMARY_INDUSTRY_GROWTH": "UNIVERSAL_SUPPLIES",
"WORKFORCE": "YETI",
"WORKER_PARTICIPATION": "PRIMARY_INDUSTRY",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"CARIBBEAN": {
"POLICY": "EXPORT",
"PRIMARY_INDUSTRY_GROWTH": "GENERIC_SUPPLIES",
"WORKFORCE": "ABSTRACT",
"WORKER_PARTICIPATION": "SECONDARY_INDUSTRY",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
"LUMBERJACK": {
"POLICY": "AUTARKY",
"PRIMARY_INDUSTRY_GROWTH": "GENERIC_SUPPLIES",
"WORKFORCE": "ABSTRACT",
"WORKER_PARTICIPATION": "SECONDARY_INDUSTRY",
"SEA_INDUSTRY": "ORGANIC",
"TOWN_GOODS": "ORGANIC",
},
Expand Down

0 comments on commit 459c0dd

Please sign in to comment.