Anonymous user
Template:Crafting table: Difference between revisions
m
More work
imported>Ttv pedro270707 (Started working on Crafting table (haha get it it's the modern name for the workbench but here it's a html table......)) |
imported>Ttv pedro270707 m (More work) |
||
Line 1: | Line 1: | ||
<includeonly | <includeonly>{{#vardefine:crafting-table-index|{{#expr:{{#var:crafting-table-index|0}}+1}}}}{{#vardefine:type|{{{type|{{#var:type|workbench}}}}}}}<!-- | ||
-->{{#ifeq: {{#var:crafting-table|}} | y | | {{#vardefine:crafting-table|y}}<table class="wikitable sortable"> | -->{{#ifeq: {{#var:crafting-table|}} | y | | {{#vardefine:crafting-table|y}}<table class="wikitable sortable"> | ||
<tr>{{#ifeq: {{bl|{{{ingredients|}}}|string=y}} | n | | <th>Ingredients</th>}}<th class="unsortable">Crafting recipe</th></tr>}} | <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></tr>}} | ||
<tr>{{#ifeq: {{ | |||
<td>{{#fornumargs: argnum | argval | | <tr>{{#ifeq: {{#var:name|}} | n | | | ||
{{#ifeq: {{#var:item-{{#var:argval}}|}} | y | | {{#ifeq: {{#var:first-ingredient|}} | y | +<br> | {{#vardefine:first-ingredient|y}} }}'''{{#ifexist: {{#var:argval}} | [[{{#var:argval}}]] | {{#var:argval}} }}'''{{#vardefine:item-{{#var:argval}}|y}} }} | <th>'''{{#ifexist: {{{RESULT|}}} | {{#ifeq: {{{RESULT|}}} | {{FULLPAGENAME}} | {{{RESULT|}}} | [[{{{RESULT|}}}]]}} | {{{RESULT|}}} }}'''</th> | ||
}} | |||
{{#ifeq: {{#var:ingredients|}} | n | | | |||
<td>{{#switch: {{#var:type|workbench}} | |||
| workbench = {{#fornumargs: argnum | argval | | |||
{{#ifeq: {{#var:item-{{#var:argval}}-{{#var:crafting-table-index|0}}|}} | y | | {{#ifeq: {{#var:first-ingredient|}} | y | +<br> | {{#vardefine:first-ingredient|y}} }}'''{{#ifexist: {{#var:argval}} | {{#ifeq: {{#var:argval}} | {{FULLPAGENAME}} | {{#var:argval}} | [[{{#var:argval}}]]}} | {{#var:argval}} }}'''{{#vardefine:item-{{#var:argval}}-{{#var:crafting-table-index|0}}|y}} }} | |||
}} | |||
| furnace | blast-furnace = '''{{#ifexist: {{{input|}}} | {{#ifeq: {{{input|}}} | {{FULLPAGENAME}} | {{{input|}}} | [[{{{input|}}}]]}} | {{{input|}}} }} | |||
}}</td> | }}</td> | ||
}}<td style="padding: 0; display: flex; justify-content: center; border: none;">{{#switch: {{ | }}<td style="padding: 0; display: flex; justify-content: center; border: none;">{{#switch: {{#var:type|workbench}} | ||
| workbench = {{Crafting|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|7={{{7|}}}|8={{{8|}}}|9={{{9|}}}|RESULT={{{RESULT|}}}|shapeless={{{shapeless|}}}}} | | workbench = {{Crafting|1={{{1|}}}|2={{{2|}}}|3={{{3|}}}|4={{{4|}}}|5={{{5|}}}|6={{{6|}}}|7={{{7|}}}|8={{{8|}}}|9={{{9|}}}|RESULT={{{RESULT|}}}|shapeless={{{shapeless|}}}}} | ||
| furnace = {{Crafting/Furnace|input={{{input|}}}|fuel={{{fuel|}}}|RESULT={{{RESULT|}}}|blast furnace=n}} | | furnace = {{Crafting/Furnace|input={{{input|}}}|fuel={{{fuel|}}}|RESULT={{{RESULT|}}}|blast furnace=n}} | ||
| blast-furnace = {{Crafting/Furnace|input={{{input|}}}|fuel={{{fuel|}}}|RESULT={{{RESULT|}}}|blast furnace=y}} | | blast-furnace = {{Crafting/Furnace|input={{{input|}}}|fuel={{{fuel|}}}|RESULT={{{RESULT|}}}|blast furnace=y}} | ||
}}</td></tr> | }}</td></tr> | ||
{{#ifeq: {{bl|{{{foot|}}}}} | y | </table>{{#vardefine:crafting-table|}}{{#vardefine: | {{#vardefine:first-ingredient|}}{{#ifeq: {{bl|{{{foot|}}}}} | y | </table>{{#vardefine:crafting-table|}}{{#vardefine:name|}}{{#vardefine:ingredients|}} | }}</includeonly><noinclude> | ||
{{Crafting table | {{Crafting table | ||
|type=workbench | |type=workbench | ||
Line 25: | Line 33: | ||
|9=Iron Ingot | |9=Iron Ingot | ||
|RESULT=Block of Iron | |RESULT=Block of Iron | ||
|name=n | |||
}} | |||
{{Crafting table | |||
|type=workbench | |||
|1=Steel Ingot | |||
|2=Steel Ingot | |||
|3=Steel Ingot | |||
|4=Iron Ingot | |||
|5=Iron Ingot | |||
|6=Iron Ingot | |||
|7=Iron Ingot | |||
|8=Iron Ingot | |||
|9=Iron Ingot | |||
|RESULT=Block of Iron | |||
|name=y | |||
|foot=y | |foot=y | ||
}} | }} | ||
Line 30: | Line 53: | ||
{{Crafting table | {{Crafting table | ||
|type=blast-furnace | |type=blast-furnace | ||
|input=Iron Ingot | |||
|fuel=Iron Ingot | |||
|RESULT=Block of Iron | |||
}} | |||
{{Crafting table | |||
|input=Iron Ingot | |input=Iron Ingot | ||
|fuel=Iron Ingot | |fuel=Iron Ingot |