Anonymous user
Template:Crafting table: Difference between revisions
m
no edit summary
imported>Ttv pedro270707 m (Added a bunch of checks at an attempt to reduce expensive the amount of expensive parser functions) |
imported>Ttv pedro270707 mNo edit summary |
||
Line 2: | Line 2: | ||
-->{{#ifeq: {{#var:crafting-table|}} | y | | {{#vardefine:crafting-table|y}}<table class="wikitable sortable mw-collapsible"> | -->{{#ifeq: {{#var:crafting-table|}} | y | | {{#vardefine:crafting-table|y}}<table class="wikitable sortable mw-collapsible"> | ||
<tr>{{#ifeq: {{bl|{{{name|}}}|string=y}} | n | {{#vardefine:name|n}} | <th>Name</th>{{#vardefine:name|y}}}}{{#ifeq: {{bl|{{{ingredients|}}}|string=y}} | n | {{#vardefine:ingredients|n}} | <th>Ingredients</th>{{#vardefine:ingredients|y}}}}<th class="unsortable">Crafting recipe</th>{{#ifeq: {{bl|{{{showdescription|}}}}} | y | <th class="unsortable">Description</th>{{#vardefine:showdescription|y}}}}</tr>}}<!-- | <tr>{{#ifeq: {{bl|{{{name|y}}}|string=y}} | n | {{#vardefine:name|n}} | <th>Name</th>{{#vardefine:name|y}}}}{{#ifeq: {{bl|{{{ingredients|}}}|string=y}} | n | {{#vardefine:ingredients|n}} | <th>Ingredients</th>{{#vardefine:ingredients|y}}}}<th class="unsortable">Crafting recipe</th>{{#ifeq: {{bl|{{{showdescription|}}}}} | y | <th class="unsortable">Description</th>{{#vardefine:showdescription|y}}}}</tr>}}<!-- | ||
-->{{#vardefine:name-str|{{bl|{{{name|y}}}|string=y}}}}<!-- | |||
--><tr>{{#ifeq: {{#var:name|}} | n | | | --><tr>{{#ifeq: {{#var:name|}} | n | | | ||
<th>'''{{#ifeq: {{#var:exists-{{{RESULT|}}}}} | y | {{#ifeq: {{{RESULT|}}} | {{FULLPAGENAME}} | {{{RESULT|}}} | [[{{{RESULT|}}}]]}} | {{#ifeq: {{#var:exists-{{{RESULT|}}}}} | n | {{{RESULT|}}} | {{#ifexist: {{{RESULT|}}} | {{#vardefine:exists-{{{RESULT|}}}|y}}{{#ifeq: {{{RESULT|}}} | {{FULLPAGENAME}} | {{{RESULT|}}} | [[{{{RESULT|}}}]]}} | {{#vardefine:exists-{{{RESULT|}}}|n}}{{{RESULT|}}} }} }} }}'''</th> | <th>'''{{#ifeq: {{#var:name-str|}} | y | {{#ifeq: {{#var:exists-{{{RESULT|}}}}} | y | {{#ifeq: {{{RESULT|}}} | {{FULLPAGENAME}} | {{{RESULT|}}} | [[{{{RESULT|}}}]]}} | {{#ifeq: {{#var:exists-{{{RESULT|}}}}} | n | {{{RESULT|}}} | {{#ifexist: {{{RESULT|}}} | {{#vardefine:exists-{{{RESULT|}}}|y}}{{#ifeq: {{{RESULT|}}} | {{FULLPAGENAME}} | {{{RESULT|}}} | [[{{{RESULT|}}}]]}} | {{#vardefine:exists-{{{RESULT|}}}|n}}{{{RESULT|}}} }} }} }} | {{#var:name-str|}} }}'''</th> <!-- If name is not a boolean, it displays the text in the name parameter instead --> | ||
}}<!-- | }}<!-- | ||
Line 40: | Line 42: | ||
|showdescription=y | |showdescription=y | ||
|description=Description! | |description=Description! | ||
|name= | |name=y | ||
}} | }} | ||
{{Crafting table | {{Crafting table | ||
Line 54: | Line 56: | ||
|9=Iron Ingot | |9=Iron Ingot | ||
|RESULT=Block of Iron | |RESULT=Block of Iron | ||
|name= | |name=Hi! | ||
}} | }} | ||
{{Crafting table | {{Crafting table |