diff --git a/agrf/parameters/__init__.py b/agrf/parameters/__init__.py index c2fee4d8..07e24dab 100644 --- a/agrf/parameters/__init__.py +++ b/agrf/parameters/__init__.py @@ -58,7 +58,7 @@ def __init__(self, choices, parameter_list): def copy(self): return SearchSpace(copy.deepcopy(self.choices), self.parameter_list) - def fix_docs_params(self, cat, options): + def update_params(self, cat, options): [(idx, all_options)] = [ (i, the_options) for i, (the_cat, the_options) in enumerate(self.choices) if the_cat == cat ] diff --git a/industry/docgen/economy.py b/industry/docgen/economy.py index 91a0250c..a9c9b567 100644 --- a/industry/docgen/economy.py +++ b/industry/docgen/economy.py @@ -72,7 +72,7 @@ def gen_economy_doc(all_economies, string_manager): choices_text = [] for preset, preset_params in PRESETS.items(): - preset_desc = parameter_choices.desc(preset_params) + preset_desc = docs_parameter_choices.desc(preset_params) if preset_desc == variation_desc: choices_text.append(f"{preset}") else: diff --git a/industry/lib/parameters.py b/industry/lib/parameters.py index 4d2ec04f..37528ddc 100644 --- a/industry/lib/parameters.py +++ b/industry/lib/parameters.py @@ -176,9 +176,9 @@ docs_parameter_choices = parameter_choices.copy() -docs_parameter_choices.fix_docs_params("WORKFORCE", ["ABSTRACT", "PROFESSIONAL", "YETI"]) -docs_parameter_choices.fix_docs_params("LAND_PORTS", ["ORGANIC"]) -docs_parameter_choices.fix_docs_params("TOWN_GOODS", ["ORGANIC"]) +docs_parameter_choices.update_params("WORKFORCE", ["ABSTRACT", "PROFESSIONAL", "YETI"]) +docs_parameter_choices.update_params("LAND_PORTS", ["ORGANIC"]) +docs_parameter_choices.update_params("TOWN_GOODS", ["ORGANIC"]) PRESETS = {