From Dark and Darker Wiki
m (Raw Salad moved page Template:GenerateCraftingRows to Template:GenerateCraftingTable: Combined crafting row templates.) |
(Added optional parameter to determine whether to generate the header or not.) |
||
Line 1: | Line 1: | ||
<includeonly><!-- | <includeonly><!-- | ||
-->{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}} }}<!-- | -->{{#arraydefine:craftables|{{Merchant Data|{{{1}}}|Crafts|All}} }}<!-- | ||
--><table cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:55%; min-width:500px; background:transparent; text-align:center; vertical-align:middle;"> | --><table cellspacing="0" class="wikitable sortable jquery-tablesorter" style="width:55%; min-width:500px; background:transparent; text-align:center; vertical-align:middle;"><!-- | ||
<tr> | -->{{#if:{{{header|}}}<!-- | ||
-->|<tr><th style="font-weight:bold; width:15%">Name</th><th style="font-weight:bold; width:25%">Ingredients</th><th style="font-weight:bold; width:10%">Trader</th></tr>}}<!-- | |||
-->{{#loop:i|0|{{#arraysize:craftables}} | -->{{#loop:i|0|{{#arraysize:craftables}} | ||
|{{#vardefine:craft|{{#arrayindex:craftables|{{#var:i}} }} }}<!-- | |{{#vardefine:craft|{{#arrayindex:craftables|{{#var:i}} }} }}<!-- | ||
Line 35: | Line 33: | ||
--></includeonly><noinclude> | --></includeonly><noinclude> | ||
Creates crafting table | |||
==Example== | ==Example== | ||
<pre>{{GenerateCraftingTable|Alchemist}}</pre> | <pre>{{GenerateCraftingTable|Alchemist|header=yes}}</pre> | ||
{{GenerateCraftingTable|Alchemist}} | {{GenerateCraftingTable|Alchemist|header=yes}} | ||
==Example== | ==Example== | ||
<pre>{{GenerateCraftingTable|Alchemist|ingredient=Gold}}</pre> | <pre>{{GenerateCraftingTable|Alchemist|ingredient=Gold}}</pre> |
Revision as of 00:16, 14 May 2024
Creates crafting table
Example
{{GenerateCraftingTable|Alchemist|header=yes}}
Example
{{GenerateCraftingTable|Alchemist|ingredient=Gold}}
Alchemist | ||
Alchemist | ||
Alchemist |
Example
{{GenerateCraftingTable|Weaponsmith|ingredient=Gold}}
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith | ||
Weaponsmith |
Example
{{GenerateCraftingTable|Armourer|ingredient=Gold}}
Armourer | ||
Armourer | ||
Armourer | ||
Armourer | ||
Armourer | ||
Armourer | ||
Armourer | ||
Armourer |