Difference between revisions of "Template:Crafting"

From ComputerCraft Wiki
Jump to: navigation, search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><div style="width:256px;height:132px">[[File:Empty-crafting-table.png|link=]]<!--
+
<includeonly><div style="width:256px;height:132px">[[File:Empty-crafting-table.png|link=]]<div style="position:relative;top:-118px;left:14px">{{
--><div style="position:relative;top:-120.5px">{{
+
  #if: {{{A1|}}} | <div style="width:32px;height:32px;position:absolute">[[File:Grid {{{A1}}}.png|link={{#if:{{{A1-link|}}}|{{{A1-link}}}|{{{A1}}}}}|32px]]</div> }}{{
  #if: {{{A1|}}} | <div style="width:60px;height:0px;text-align:center">[[File:Grid {{{A1}}}.png]]</div> }}{{
+
  #if: {{{B1|}}} | <div style="left:36px;width:32px;height:32px;position:absolute">[[File:Grid {{{B1}}}.png|link={{#if:{{{B1-link|}}}|{{{B1-link}}}|{{{B1}}}}}|32px]]</div> }}{{
  #if: {{{B1|}}} | <div style="width:132px;height:0px;text-align:center">[[File:Grid {{{B1}}}.png]]</div> }}{{
+
  #if: {{{C1|}}} | <div style="left:72px;width:32px;height:32px;position:absolute">[[File:Grid {{{C1}}}.png|link={{#if:{{{C1-link|}}}|{{{C1-link}}}|{{{C1}}}}}|32px]]</div> }}{{
  #if: {{{C1|}}} | <div style="width:204px;height:36px;text-align:center">[[File:Grid {{{C1}}}.png]]</div> }}{{
+
  #if: {{{A2|}}} | <div style="top:36px;width:32px;height:32px;position:absolute">[[File:Grid {{{A2}}}.png|link={{#if:{{{A2-link|}}}|{{{A2-link}}}|{{{A2}}}}}|32px]]</div> }}{{
  #if: {{{A2|}}} | <div style="width:60px;height:0px;text-align:center">[[File:Grid {{{A2}}}.png]]</div> }}{{
+
  #if: {{{B2|}}} | <div style="top:36px;left:36px;width:32px;height:32px;position:absolute">[[File:Grid {{{B2}}}.png|link={{#if:{{{B2-link|}}}|{{{B2-link}}}|{{{B2}}}}}|32px]]</div> }}{{
  #if: {{{B2|}}} | <div style="width:132px;height:0px;text-align:center">[[File:Grid {{{B2}}}.png]]</div> }}{{
+
  #if: {{{C2|}}} | <div style="top:36px;left:72px;width:32px;height:32px;position:absolute">[[File:Grid {{{C2}}}.png|link={{#if:{{{C2-link|}}}|{{{C2-link}}}|{{{C2}}}}}|32px]]</div> }}{{
  #if: {{{C2|}}} | <div style="width:204px;height:0px;text-align:center">[[File:Grid {{{C2}}}.png]]</div> }}{{
+
  #if: {{{Output|}}} | <div style="top:36px;left:188px;width:32px;height:32px;position:absolute">[[File:Grid {{{Output}}}.png|link={{#if:{{{Output-link|}}}|{{{Output-link}}}|{{{Output}}}}}|32px]]</div> }}{{
  #if: {{{Output|}}} | <div style="width:436px;height:36px;text-align:center">[[File:Grid {{{Output}}}.png]]</div> }}{{
+
#if:{{{OA|}}} | <span style="left:196px; top:54px; width:16px; height:16px; position:absolute; overflow:hidden;"><!--
  #if: {{{A3|}}} | <div style="width:60px;height:0px;text-align:center">[[File:Grid {{{A3}}}.png]]</div> }}{{
+
  --><span style="left:{{#expr:-16 * (floor({{{OA}}}/10) - 1)}}px; top:-5px; width:160px; height:16px; position:absolute;"><!--
  #if: {{{B3|}}} | <div style="width:132px;height:0px;text-align:center">[[File:Grid {{{B3}}}.png]]</div> }}{{
+
    -->[[Image:GridNumbersCSS.png|160px|link={{#if:{{{Output-link|}}}|{{{Output-link}}}|{{{Output}}}}}|alt={{{Output}}}]]<!--
  #if: {{{C3|}}} | <div style="width:204px;height:0px;text-align:center">[[File:Grid {{{C3}}}.png]]</div>
+
  --></span></span><span style="left:208px; top:54px; width:16px; height:16px; position:absolute; overflow:hidden;"><!--
}}</div></div></includeonly><noinclude>
+
  --><span style="left:{{#expr:-16 * (({{{OA}}} - 1) mod 10)}}px; top:-5px; width:160px; height:16px; position:absolute;"><!--
{{Crafting
+
    -->[[Image:GridNumbersCSS.png|160px|link={{#if:{{{Output-link|}}}|{{{Output-link}}}|{{{Output}}}}}|alt={{{Output}}}]]<!--
|A1=Computer
+
  --></span><!--
|B3=Disk_Drive
+
  --></span>}}{{
|Output=Computer
+
  #if: {{{A3|}}} | <div style="top:72px;width:32px;height:32px;position:absolute">[[File:Grid {{{A3}}}.png|link={{#if:{{{A3-link|}}}|{{{A3-link}}}|{{{A3}}}}}|32px]]</div> }}{{
}}
+
  #if: {{{B3|}}} | <div style="top:72px;left:36px;width:32px;height:32px;position:absolute">[[File:Grid {{{B3}}}.png|link={{#if:{{{B3-link|}}}|{{{B3-link}}}|{{{B3}}}}}|32px]]</div> }}{{
{{Crafting
+
  #if: {{{C3|}}} | <div style="top:72px;left:72px;width:32px;height:32px;position:absolute">[[File:Grid {{{C3}}}.png|link={{#if:{{{C3-link|}}}|{{{C3-link}}}|{{{C3}}}}}|32px]]</div>
|A1=Computer
+
}}</div></div></includeonly><noinclude>{{Documentation}}</noinclude>
|B1=Computer
+
|C1=Computer
+
|A2=Computer
+
|B2=Computer
+
|C2=Computer
+
|A3=Computer
+
|B3=Computer
+
|C3=Computer
+
|Output=Computer
+
}}
+
</noinclude>
+

Latest revision as of 06:44, 4 August 2020

[ view | edit | history ] Documentation

This is the standard Minecraft crafting grid.

The name of the images should be in the form of "grid_<name of the item>.png". E.g. the Computer image is named "Grid_Computer.png". Clicking on it will go to the page Computer.

usage:

{{Crafting
 |A1=Computer
 |B3=Disk_Drive
 |Output=Computer
}}

result:

Empty-crafting-table.png
Grid Computer.png
Grid Computer.png
Grid Disk Drive.png