From Dark and Darker Wiki

m (Cleaned up whitespace. Formatted the code to indicate scope level.)
mNo edit summary
Line 1: Line 1:
<includeonly>{{ #arraydefine: craftables | {{Crafting Data|{{{1}}}}} }}
<includeonly>{{#arraydefine:craftables|{{Crafting Data|{{{1}}}}} }}
{{
{{
    #loop: i
#loop: i
    |0
|0
    |{{ #arraysize:craftables }}
|{{#arraysize:craftables}}
    |<nowiki/>{{#vardefine:craft|{{ #arrayindex:craftables | {{ #var:i }} }}}}<!--
|<nowiki/>{{#vardefine:craft|{{#arrayindex:craftables|{{#var:i}} }} }}<!--
    -->{{#if:{{{ingredient|}}}<!--
-->{{#if:{{{ingredient|}}}<!--
        -->|{{#if:{{#pos:{{Crafting Data|{{ #var:craft }}|ingredients}}|{{{ingredient|}}}}}<!--
-->|{{#if:{{#pos:{{Crafting Data|{{#var:craft}}|ingredients}}|{{{ingredient|}}}}}<!--
            -->|{{GenerateCraftingRow|{{ #var:craft }}}}}}<!--
-->|{{GenerateCraftingRow|{{#var:craft}}}} }}<!--
        -->|{{GenerateCraftingRow|{{ #var:craft }}}}}}
-->|{{GenerateCraftingRow|{{#var:craft}}}} }}
}}
}}
</includeonly><noinclude>
</includeonly><noinclude>
Line 15: Line 15:
<pre>
<pre>
{{CraftingTable|
{{CraftingTable|
    {{GenerateCraftingRows|Alchemist}}
{{GenerateCraftingRows|Alchemist}}
}}
}}
</pre>
</pre>
{{CraftingTable|
{{CraftingTable|
    {{GenerateCraftingRows|Alchemist}}
{{GenerateCraftingRows|Alchemist}}
}}
}}
==Example==
==Example==
<pre>
<pre>
{{CraftingTable|
{{CraftingTable|
    {{GenerateCraftingRows|all|ingredient=Gold}}
{{GenerateCraftingRows|all|ingredient=Gold}}
}}
}}
</pre>
</pre>
{{CraftingTable|
{{CraftingTable|
    {{GenerateCraftingRows|all|ingredient=Gold}}
{{GenerateCraftingRows|all|ingredient=Gold}}
}}
}}
</noinclude>
</noinclude>

Revision as of 22:08, 13 March 2024

Auto creates crafting row

Example

{{CraftingTable|
	{{GenerateCraftingRows|Alchemist}}
}}

Template:CraftingTable

Example

{{CraftingTable|
	{{GenerateCraftingRows|all|ingredient=Gold}}
}}

Template:CraftingTable