{% extends "base.html" %} {% import "macros.html" as macros with context %} {% block content %} {# --- 宏:递归渲染树节点 --- #} {% macro render_tree_node(tree_node) %}
  • {{ macros.item_slot(tree_node.item, show_name=True) }} {# 制作站图标 #} {% if tree_node.recipes %} {% set main_recipe = tree_node.recipes[0] %} {% if main_recipe.stations %}
    {% if main_recipe.stations[0].imagePath %} {% else %} ? {% endif %}
    {% endif %} {# 条件显示 #} {% if main_recipe.conditions %}
    {{ main_recipe.conditions[0] }}
    {% endif %} {% endif %} {# [Marker] 截断提示 (Truncated) #} {% if tree_node.truncated %}
    ...
    {% endif %} {# [Marker] 循环提示 (Loop) #} {% if tree_node.loop %}
    {% endif %} {# [Marker] 引用提示 (Reference) #} {% if tree_node.reference %}
    *
    {% endif %}
    {% if tree_node.recipes and tree_node.recipes[0].ingredients %} {% endif %}
  • {% endmacro %}
    合成树: {{ data.root.item.name }} {{ data.root.item.mod }}
    {# 底部信息栏 #}
    {# 左侧:合成配方数量提示 #}
    {% if data.root.recipes|length > 1 %} * 该物品还有其他 {{ data.root.recipes|length - 1 }} 种合成配方,仅展示第一种。 {% endif %}
    {# 右侧:图例 (Legend) #}
    * 参考别处
    循环配方
    ... 超出限制
    {% if data.usageRecipes %}
    可以合成
    {% for r in data.usageRecipes %} {% set result_node = data.nodes[r.resultId|string] %}
    {% for ing in r.ingredients %} {% set ing_node = data.nodes[ing.itemId|string] %} {% if ing_node %} {% if ing.itemId == data.targetId %}
    {{ macros.item_slot({'name': ing_node.name, 'stack': ing.count, 'imagePath': ing_node.imagePath, 'frameCount': ing_node.frameCount}, show_name=False) }}
    {% else %} {{ macros.item_slot({'name': ing_node.name, 'stack': ing.count, 'imagePath': ing_node.imagePath, 'frameCount': ing_node.frameCount}, show_name=False) }} {% endif %} {% endif %} {% endfor %} {% if r.conditions %}
    {% for cond in r.conditions %} {{ cond }} {% endfor %}
    {% endif %}
    {% if r.stations %} {% if r.stations[0].imagePath %} {% else %} ? {% endif %} {% else %} - {% endif %}
    {% if result_node %} {{ macros.item_slot({'name': result_node.name, 'stack': r.resultCount, 'imagePath': result_node.imagePath, 'frameCount': result_node.frameCount}, show_name=True) }} {% else %} {{ macros.item_slot({'name': 'ID:' ~ r.resultId, 'stack': r.resultCount}, show_name=True) }} {% endif %}
    {% endfor %}
    {% if data.hiddenUsagesCount > 0 %}
    ... 还有 {{ data.hiddenUsagesCount }} 个合成用途未显示 ...
    {% endif %} {% endif %} {% endblock %}