mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00

- removed tutorialization (Craft/Do X to unlock tech) - start with everything needed for power, electric mining drills, science lab and automation science already unlocked - updated world gen - updated mod api use - updated fluid boxes (CaitSith2) - new option: free sample quality (needs quality mod) - removed old gruft, faster gen speed, faster load time - lists space age as explicitly not supported, so it prevents the game from trying to load both - fixes Y offset of traps being wrong (way higher than intended) - client now has a 5 second timeout to communicate with the bound factorio server, so it aborts actions if the server died - savegames are now stored in write_data_directory -> saves -> Archipelago - add cargo-landing-pad handling - starting rocket silo and cargo landing pad respect free sample quality - supports Factorio 2.0 --------- Co-authored-by: CaitSith2 <d_good@caitsith2.com>
30 lines
923 B
Lua
30 lines
923 B
Lua
{% macro dict_to_lua(dict) -%}
|
|
{
|
|
{%- for key, value in dict.items() -%}
|
|
["{{ key }}"] = {{ variable_to_lua(value) }}{% if not loop.last %},{% endif %}
|
|
{% endfor -%}
|
|
}
|
|
{% endmacro %}
|
|
{% macro list_to_lua(list) -%}
|
|
{
|
|
{%- for key in list -%}
|
|
{{ variable_to_lua(key) }}{% 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 }}"
|
|
{%- elif value is iterable -%}{{ list_to_lua(value) }}
|
|
{%- else -%} {{ value | safe }}
|
|
{%- endif -%}
|
|
{%- endmacro -%}
|
|
{% macro dict_to_recipe(dict, liquids) -%}
|
|
{
|
|
{%- for key, value in dict.items() -%}
|
|
{type = {% if key in liquids %}"fluid"{% else %}"item"{% endif %}, name = "{{ key }}", amount = {{ value | safe }}}{% if not loop.last %},{% endif %}
|
|
{% endfor -%}
|
|
}
|
|
{%- endmacro %}
|