From 77d3bf9172043f32d8e88dcfe302499a3c1f7084 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 3 May 2021 18:06:21 +0200 Subject: [PATCH] Factorio: Allow assembling machine 1 to use fluids Should improve the flow of the game a bit, no longer having to wait for automation-2 to get started with rocket fuel, processing units and others. --- data/factorio/mod_template/data-final-fixes.lua | 1 + data/factorio/mod_template/locale/en/locale.cfg | 13 +++++++------ worlds/factorio/Technologies.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/data/factorio/mod_template/data-final-fixes.lua b/data/factorio/mod_template/data-final-fixes.lua index 6508aedc..1ba00905 100644 --- a/data/factorio/mod_template/data-final-fixes.lua +++ b/data/factorio/mod_template/data-final-fixes.lua @@ -28,6 +28,7 @@ function prep_copy(new_copy, old_tech) end end +table.insert(data.raw["assembling-machine"]["assembling-machine-1"].crafting_categories, "crafting-with-fluid") {# each randomized tech gets set to be invisible, with new nodes added that trigger those #} {%- for original_tech_name, item_name, receiving_player in locations %} diff --git a/data/factorio/mod_template/locale/en/locale.cfg b/data/factorio/mod_template/locale/en/locale.cfg index 7e1dd94f..24b7ce05 100644 --- a/data/factorio/mod_template/locale/en/locale.cfg +++ b/data/factorio/mod_template/locale/en/locale.cfg @@ -1,17 +1,18 @@ [technology-name] {% for original_tech_name, item_name, receiving_player in locations %} -{%- if visibility %} +{%- if visibility -%} ap-{{ tech_table[original_tech_name] }}-={{ player_names[receiving_player] }}'s {{ item_name }} -{%- else %} +{% else %} ap-{{ tech_table[original_tech_name] }}-= An Archipelago Sendable -{%- endif %} +{%- endif -%} {% endfor %} + [technology-description] {% for original_tech_name, item_name, receiving_player in locations %} -{%- if visibility %} +{%- if visibility -%} ap-{{ tech_table[original_tech_name] }}-=Researching this technology sends {{ item_name }} to {{ player_names[receiving_player] }}. -{%- else %} +{% else %} ap-{{ tech_table[original_tech_name] }}-=Researching this technology sends something to someone. -{%- endif %} +{%- endif -%} {% endfor %} \ No newline at end of file diff --git a/worlds/factorio/Technologies.py b/worlds/factorio/Technologies.py index dcb68372..d6302c7f 100644 --- a/worlds/factorio/Technologies.py +++ b/worlds/factorio/Technologies.py @@ -12,7 +12,7 @@ with open(source_file) as f: raw = json.load(f) with open(recipe_source_file) as f: raw_recipes = json.load(f) -tech_table = {} +tech_table: Dict[str, int] = {} technology_table: Dict[str, Technology] = {} always = lambda state: True