Template:CraftingInterface: Difference between revisions

mNo edit summary
No edit summary
Tag: Manual revert
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
==Example Usage==
<pre>
{{CraftingInterface
| row1item3 = File:iron ingot.png | row1item3tooltip = Iron Ingot | row1item3link = Apricorn
| row2item1 = File:copper ingot.png | row2item1tooltip = Copper Ingot
| row2item2 = File:copper ingot.png | row2item2tooltip = Copper Ingot
| row2item3 = File:iron ingot.png | row2item3tooltip = Iron Ingot
| row3item1 = File:iron ingot.png | row3item1tooltip = Iron Ingot
| row3item2 = File:iron ingot.png | row3item2tooltip = Iron Ingot
| row3item3 = File:iron ingot.png | row3item3tooltip = Iron Ingot
| itemresult = File:healing machine.png | itemresultcount = 4 | itemresulttooltip = Healing Machine | itemresultlink = Healing Machine
}}
</pre>
==Example Result==
{{CraftingInterface
| row1item3 = File:iron ingot.png | row1item3tooltip = Iron Ingot | row1item3link = Apricorn
| row2item1 = File:copper ingot.png | row2item1tooltip = Copper Ingot
| row2item2 = File:copper ingot.png | row2item2tooltip = Copper Ingot
| row2item3 = File:iron ingot.png | row2item3tooltip = Iron Ingot
| row3item1 = File:iron ingot.png | row3item1tooltip = Iron Ingot
| row3item2 = File:iron ingot.png | row3item2tooltip = Iron Ingot
| row3item3 = File:iron ingot.png | row3item3tooltip = Iron Ingot
| itemresult = File:healing machine.png | itemresultcount = 4 | itemresulttooltip = Healing Machine | itemresultlink = Healing Machine
}}
</noinclude>
<includeonly>
<includeonly>
<div class="crafting-interface">
<div class="interface crafting-interface">
   <div class="crafting-interface-ingredients">
   <div class="crafting-interface-ingredients">
     <div class="crafting-row">
     <div class="crafting-row">
       <div class="item-slot">{{#if:{{{row1item1|}}}|[[File:{{PAGENAME:{{{row1item1}}}}}|link={{#if:{{{row1item1link|}}}|{{PAGENAME:{{{row1item1link}}}}}}}]]{{#if:{{{row1item1tooltip|}}}|<span class="item-tooltip">{{{row1item1tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{A1|}}}|[[File:{{PAGENAME:{{{A1}}}.png}}|link={{#if:{{{A1-link|}}}|{{PAGENAME:{{{A1-link}}}}}}}]]{{#if:{{{A1-tooltip|}}}}|<span class="item-tooltip">{{{A1-tooltip|{{{A1}}}}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{row1item2|}}}|[[File:{{PAGENAME:{{{row1item2}}}}}|link={{#if:{{{row1item2link|}}}|{{PAGENAME:{{{row1item2link}}}}}}}]]{{#if:{{{row1item2tooltip|}}}|<span class="item-tooltip">{{{row1item2tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{A2|}}}|[[File:{{PAGENAME:{{{A2}}}.png}}|link={{#if:{{{A2-link|}}}|{{PAGENAME:{{{A2-link}}}}}}}]]{{#if:{{{A2-tooltip|}}}}|<span class="item-tooltip">{{{A2-tooltip|{{{A2}}}}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{row1item3|}}}|[[File:{{PAGENAME:{{{row1item3}}}}}|link={{#if:{{{row1item3link|}}}|{{PAGENAME:{{{row1item3link}}}}}}}]]{{#if:{{{row1item3tooltip|}}}|<span class="item-tooltip">{{{row1item3tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{A3|}}}|[[File:{{PAGENAME:{{{A3}}}.png}}|link={{#if:{{{A3-link|}}}|{{PAGENAME:{{{A3-link}}}}}}}]]{{#if:{{{A3-tooltip|}}}}|<span class="item-tooltip">{{{A3-tooltip|{{{A3}}}}}}</span>}}}}</div>
     </div>
     </div>
     <div class="crafting-row">
     <div class="crafting-row">
       <div class="item-slot">{{#if:{{{row2item1|}}}|[[File:{{PAGENAME:{{{row2item1}}}}}|link={{#if:{{{row2item1link|}}}|{{PAGENAME:{{{row2item1link}}}}}}}]]{{#if:{{{row2item1tooltip|}}}|<span class="item-tooltip">{{{row2item1tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{B1|}}}|[[File:{{PAGENAME:{{{B1}}}.png}}|link={{#if:{{{B1-link|}}}|{{PAGENAME:{{{B1-link}}}}}}}]]{{#if:{{{B1-tooltip|}}}}|<span class="item-tooltip">{{{B1-tooltip|{{{B1}}}}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{row2item2|}}}|[[File:{{PAGENAME:{{{row2item2}}}}}|link={{#if:{{{row2item2link|}}}|{{PAGENAME:{{{row2item2link}}}}}}}]]{{#if:{{{row2item2tooltip|}}}|<span class="item-tooltip">{{{row2item2tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{B2|}}}|[[File:{{PAGENAME:{{{B2}}}.png}}|link={{#if:{{{B2-link|}}}|{{PAGENAME:{{{B2-link}}}}}}}]]{{#if:{{{B2-tooltip|}}}}|<span class="item-tooltip">{{{B2-tooltip|{{{B2}}}}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{row2item3|}}}|[[File:{{PAGENAME:{{{row2item3}}}}}|link={{#if:{{{row2item3link|}}}|{{PAGENAME:{{{row2item3link}}}}}}}]]{{#if:{{{row2item3tooltip|}}}|<span class="item-tooltip">{{{row2item3tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{B3|}}}|[[File:{{PAGENAME:{{{B3}}}.png}}|link={{#if:{{{B3-link|}}}|{{PAGENAME:{{{B3-link}}}}}}}]]{{#if:{{{B3-tooltip|}}}}|<span class="item-tooltip">{{{B3-tooltip|{{{B3}}}}}}</span>}}}}</div>
     </div>
     </div>
     <div class="crafting-row">
     <div class="crafting-row">
       <div class="item-slot">{{#if:{{{row3item1|}}}|[[File:{{PAGENAME:{{{row3item1}}}}}|link={{#if:{{{row3item1link|}}}|{{PAGENAME:{{{row3item1link}}}}}}}]]{{#if:{{{row3item1tooltip|}}}|<span class="item-tooltip">{{{row3item1tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{C1|}}}|[[File:{{PAGENAME:{{{C1}}}.png}}|link={{#if:{{{C1-link|}}}|{{PAGENAME:{{{C1-link}}}}}}}]]{{#if:{{{C1-tooltip|}}}}|<span class="item-tooltip">{{{C1-tooltip|{{{C1}}}}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{row3item2|}}}|[[File:{{PAGENAME:{{{row3item2}}}}}|link={{#if:{{{row3item2link|}}}|{{PAGENAME:{{{row3item2link}}}}}}}]]{{#if:{{{row3item2tooltip|}}}|<span class="item-tooltip">{{{row3item2tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{C2|}}}|[[File:{{PAGENAME:{{{C2}}}.png}}|link={{#if:{{{C2-link|}}}|{{PAGENAME:{{{C2-link}}}}}}}]]{{#if:{{{C2-tooltip|}}}}|<span class="item-tooltip">{{{C2-tooltip|{{{C2}}}}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{row3item3|}}}|[[File:{{PAGENAME:{{{row3item3}}}}}|link={{#if:{{{row3item3link|}}}|{{PAGENAME:{{{row3item3link}}}}}}}]]{{#if:{{{row3item3tooltip|}}}|<span class="item-tooltip">{{{row3item3tooltip}}}</span>}}}}</div>
       <div class="item-slot">{{#if:{{{C3|}}}|[[File:{{PAGENAME:{{{C3}}}.png}}|link={{#if:{{{C3-link|}}}|{{PAGENAME:{{{C3-link}}}}}}}]]{{#if:{{{C3-tooltip|}}}}|<span class="item-tooltip">{{{C3-tooltip|{{{C3}}}}}}</span>}}}}</div>
     </div>
     </div>
   </div>
   </div>
   <div class="crafting-interface-result">
   <div class="crafting-interface-result">
       <div class="item-slot item-slot-large">{{#if:{{{itemresult|}}}|[[File:{{PAGENAME:{{{itemresult}}}}}|link={{#if:{{{itemresultlink|}}}|{{PAGENAME:{{{itemresultlink}}}}}}}]]{{#if:{{{itemresultcount|}}}|<span class="item-slot-count">{{{itemresultcount}}}</span>}}{{#if:{{{itemresulttooltip|}}}|<span class="item-tooltip">{{{itemresulttooltip}}}</span>}}}}</div>
       <div class="item-slot item-slot-large">{{#if:{{{output|}}}|[[File:{{PAGENAME:{{{output}}}.png}}|link={{#if:{{{output-link|}}}|{{PAGENAME:{{{output-link}}}|{{{output}}}}}|{{{output}}}}}]]{{#if:{{{output-count|}}}|<span class="item-slot-count">{{{output-count}}}</span>}}{{#if:{{{output-tooltip|}}}}|<span class="item-tooltip">{{{output-tooltip|{{{output}}}}}}</span>}}}}</div>
   </div>
   </div>
   {{#if:{{{shapeless}}}|<div class="shapeless-mark" title="This recipe is shapeless, items can be placed in any arrangement for this recipe">🛈</div>}}
   {{#if:{{{shapeless|}}}|<div class="shapeless-mark" title="This recipe is shapeless, items can be placed in any arrangement for this recipe"></div>}}
</div>
</div>
</includeonly>
</includeonly><noinclude>
{{documentation}}
</noinclude>

Latest revision as of 02:16, 14 October 2023

[view | edit | history | purge]Documentation

This template is used to create a grid that looks similar to the Crafting Table's GUI screen.

Notes

Each item can have a custom tooltip by setting the "-tooltip" parameter. For example: A2-tooltip would set a custom tooltip for item A2.

Each item excluding "output" are not linked by default. It can be linked by setting the "-link" parameter. For example: Setting A2-link to "Apricorn" would set the link of item A2 to [[Apricorn]].

{{CraftingInterface
| A1 = 
| A2 = 
| A3 = 
| B1 = 
| B2 = 
| B3 = 
| C1 =
| C2 =
| C3 =
| output = | output-count = | output-link =
}}

Usage

{{CraftingInterface
| A3 = Iron Ingot | A3-link = Apricorn
| B1 = Copper Ingot | B1-tooltip = Gold Ingot
| B2 = Copper Ingot
| B3 = Iron Ingot
| C1 = Iron Ingot
| C2 = Iron Ingot
| C3 = Iron Ingot
| output = Healing Machine | output-count = 4 | output-tooltip = Link Cable | output-link = PC
}}

produces:

Iron Ingot.pngIron Ingot
Copper Ingot.pngGold Ingot
Copper Ingot.pngCopper Ingot
Iron Ingot.pngIron Ingot
Iron Ingot.pngIron Ingot
Iron Ingot.pngIron Ingot
Iron Ingot.pngIron Ingot
Healing Machine.png4Link Cable


Optional Parameters

| shapeless = true

[view | edit | history | purge]The above documentation is transcluded from Template:CraftingInterface/doc.