From Dark and Darker Wiki
(testing, should be good to go) |
m (Cleaned up whitespace. Formatted the code to indicate scope level.) |
||
Line 1: | Line 1: | ||
<includeonly>{{ #arraydefine: craftables | {{Crafting Data|{{{1}}}}} }}{{ | <includeonly>{{ #arraydefine: craftables | {{Crafting Data|{{{1}}}}} }} | ||
{{ | |||
#loop: i | |||
|0 | |||
|{{ #arraysize:craftables }} | |||
|<nowiki/>{{#vardefine:craft|{{ #arrayindex:craftables | {{ #var:i }} }}}}<!-- | |||
</includeonly> | -->{{#if:{{{ingredient|}}}<!-- | ||
<noinclude> | -->|{{#if:{{#pos:{{Crafting Data|{{ #var:craft }}|ingredients}}|{{{ingredient|}}}}}<!-- | ||
-->|{{GenerateCraftingRow|{{ #var:craft }}}}}}<!-- | |||
-->|{{GenerateCraftingRow|{{ #var:craft }}}}}} | |||
}} | |||
</includeonly><noinclude> | |||
Auto creates crafting row | Auto creates crafting row | ||
==Example== | ==Example== | ||
<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 01:49, 4 March 2024
Auto creates crafting row
Example
{{CraftingTable| {{GenerateCraftingRows|Alchemist}} }}
Example
{{CraftingTable| {{GenerateCraftingRows|all|ingredient=Gold}} }}