mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Factorio: Build logic for rocket launch, allow beatable only to work correctly
Convert Science requirements to Event of "automate <pack>"
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
{% macro dict_to_lua(dict) -%}
|
||||
{
|
||||
{% for key, value in dict.items() %}
|
||||
["{{ key }}"] = {{ value | safe }}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
{%- endmacro %}
|
||||
{% from "macros.lua" import dict_to_lua %}
|
||||
-- this file gets written automatically by the Archipelago Randomizer and is in its raw form a Jinja2 Template
|
||||
require "lib"
|
||||
require "util"
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
{% from "macros.lua" import dict_to_recipe %}
|
||||
-- this file gets written automatically by the Archipelago Randomizer and is in its raw form a Jinja2 Template
|
||||
require('lib')
|
||||
|
||||
data.raw["recipe"]["rocket-part"].ingredients = {{ rocket_recipe | safe }}
|
||||
data.raw["recipe"]["rocket-part"].ingredients = {{ dict_to_recipe(rocket_recipe) }}
|
||||
|
||||
local technologies = data.raw["technology"]
|
||||
local original_tech
|
||||
|
14
data/factorio/mod_template/macros.lua
Normal file
14
data/factorio/mod_template/macros.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
{% macro dict_to_lua(dict) -%}
|
||||
{
|
||||
{%- for key, value in dict.items() -%}
|
||||
["{{ key }}"] = {{ value | safe }}{% if not loop.last %},{% endif %}
|
||||
{% endfor -%}
|
||||
}
|
||||
{%- endmacro %}
|
||||
{% macro dict_to_recipe(dict) -%}
|
||||
{
|
||||
{%- for key, value in dict.items() -%}
|
||||
{"{{ key }}", {{ value | safe }}}{% if not loop.last %},{% endif %}
|
||||
{% endfor -%}
|
||||
}
|
||||
{%- endmacro %}
|
Reference in New Issue
Block a user