Skip to content

Commit

Permalink
(Aegis) Fix paths again
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Nov 2, 2023
1 parent cd848d1 commit ccb890c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions agrf/parameters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ def iterate_variations(self, i=0, params={}):
if i == len(self.choices):
yield params
else:
for j in self.choices[i][1]:
parameter_name, available_choices = self.choices[i]
for j in available_choices:
new_params = params.copy()
new_params[self.choices[i][0]] = j
new_params[parameter_name] = j
for variation in self.iterate_variations(i + 1, new_params):
yield variation

Expand Down
6 changes: 3 additions & 3 deletions industry/docgen/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def gen_economy_doc(all_economies, string_manager):

choices_text = []
for preset, preset_params in PRESETS.items():
preset_desc = docs_parameter_choices.desc(preset_params)
preset_desc = parameter_choices.desc(preset_params)
if preset_desc == variation_desc:
choices_text.append(f"{preset}")
else:
Expand All @@ -89,12 +89,12 @@ def gen_economy_doc(all_economies, string_manager):
if len(choices) == 1:
continue
choices_text = []
for j, choice in enumerate(choices):
for choice in choices:
if variation[param] == choice:
choices_text.append(f"{choice}")
else:
choices_text.append(
f"[{choice}]({meta_economy.name}_{variation_desc[:i]}{j}{variation_desc[i+1:]}.html)"
f"[{choice}]({meta_economy.name}_{parameter_choices.desc({**variation, param: choice})}.html)"
)
print(
f"{param}: " + " \\| ".join(choices_text) + "\n",
Expand Down

0 comments on commit ccb890c

Please sign in to comment.