mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Now possible for randomized science packs/silo/satellite recipe to use fluids.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
require('lib')
|
||||
|
||||
{%- for recipe_name, recipe in custom_recipes.items() %}
|
||||
data.raw["recipe"]["{{recipe_name}}"].ingredients = {{ dict_to_recipe(recipe.ingredients) }}
|
||||
data.raw["recipe"]["{{recipe_name}}"].category = "{{recipe.category}}"
|
||||
data.raw["recipe"]["{{recipe_name}}"].ingredients = {{ dict_to_recipe(recipe.ingredients, liquids) }}
|
||||
{%- endfor %}
|
||||
|
||||
local technologies = data.raw["technology"]
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
{%- else -%} {{ value | safe }}
|
||||
{%- endif -%}
|
||||
{%- endmacro -%}
|
||||
{% macro dict_to_recipe(dict) -%}
|
||||
{% macro dict_to_recipe(dict, liquids) -%}
|
||||
{
|
||||
{%- for key, value in dict.items() -%}
|
||||
{"{{ key }}", {{ value | safe }}}{% if not loop.last %},{% endif %}
|
||||
{type = {% if key in liquids %}"fluid"{% else %}"item"{% endif %}, name = "{{ key }}", amount = {{ value | safe }}}{% if not loop.last %},{% endif %}
|
||||
{% endfor -%}
|
||||
}
|
||||
{%- endmacro %}
|
||||
Reference in New Issue
Block a user