mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
add Factorio world gen settings
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
{% macro dict_to_lua(dict) -%}
|
||||
{
|
||||
{%- for key, value in dict.items() -%}
|
||||
["{{ key }}"] = {% if value is mapping %}{{ dict_to_lua(value) }}{% else %}{{ value | safe }}{% endif %}{% if not loop.last %},{% endif %}
|
||||
["{{ key }}"] = {{ variable_to_lua(value) }}{% if not loop.last %},{% endif %}
|
||||
{% endfor -%}
|
||||
}
|
||||
{%- endmacro %}
|
||||
{%- macro variable_to_lua(value) %}
|
||||
{%- if value is mapping -%}{{ dict_to_lua(value) }}
|
||||
{%- elif value is boolean -%}{{ value | string | lower }}
|
||||
{%- elif value is string -%} "{{ value | safe }}"
|
||||
{%- else -%} {{ value | safe }}
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
{% macro dict_to_recipe(dict) -%}
|
||||
{
|
||||
{%- for key, value in dict.items() -%}
|
||||
|
Reference in New Issue
Block a user