Difference between revisions of "Template:Grid"

From Minetest Wiki
Jump to navigation Jump to search
(Created page with "<includeonly> <div class="animated" style="width: 32px; height: 32px; background-color: #888; border: 1px solid #333; {{#if: {{{padded|}}} | padding: 10px;|}}"> {{#if: {{#expl...")
 
m (Moved doc to /doc subpage)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly>{{#invoke:Animated|grid}}</includeonly><noinclude>
<div class="animated" style="width: 32px; height: 32px; background-color: #888; border: 1px solid #333; {{#if: {{{padded|}}} | padding: 10px;|}}">
+
{{Documentation}}
{{#if: {{#explode: {{{1|}}} | , | 0 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 0 }}|count={{#explode: {{{2|}}} | , | 0 }}}} |}}<!--
+
<!-- Categories go on the /doc subpage -->
-->{{#if: {{#explode: {{{1|}}} | , | 1 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 1 }}|count={{#explode: {{{2|}}} | , | 1 }}}} |}}<!--
+
</noinclude>
-->{{#if: {{#explode: {{{1|}}} | , | 2 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 2 }}|count={{#explode: {{{2|}}} | , | 2 }}}} |}}<!--
 
-->{{#if: {{#explode: {{{1|}}} | , | 3 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 3 }}|count={{#explode: {{{2|}}} | , | 3 }}}} |}}<!--
 
-->{{#if: {{#explode: {{{1|}}} | , | 4 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 4 }}|count={{#explode: {{{2|}}} | , | 4 }}}} |}}<!--
 
-->{{#if: {{#explode: {{{1|}}} | , | 5 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 5 }}|count={{#explode: {{{2|}}} | , | 5 }}}} |}}<!--
 
-->{{#if: {{#explode: {{{1|}}} | , | 6 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 6 }}|count={{#explode: {{{2|}}} | , | 6 }}}} |}}<!--
 
-->{{#if: {{#explode: {{{1|}}} | , | 7 }} | {{Grid/Cell|i={{#explode: {{{1|}}} | , | 7 }}|count={{#explode: {{{2|}}} | , | 7 }}}} |}}
 
</div>
 
</includeonly>
 

Latest revision as of 07:06, 14 May 2017

Documentation icon.png Documentation[view] [edit] [history] [purge]
Languages Language: English
Lua logo.png This template uses Module:Animated, a script written in Lua.
Please see wikipedia:Wikipedia:Lua and mw:Extension:Scribunto to learn more.

Usage

{{{1}}} is a list of item names, separated by commas. {{{2}}} is a corresponding list of item counts, also separated by commas.

Set {{{padded=1}}} to enable 10px padding.

Examples

Source Output
{{Grid|Stick}}
Stick.png
{{Grid|Iron Lump, Copper Lump, Gold Lump}}
Iron Lump.png
Copper Lump.png
Gold Lump.png
{{Grid|Steel Ingot, Bronze Ingot, Gold Ingot|2, 3, 4}}
Steel Ingot.png
2
Bronze Ingot.png
3
Gold Ingot.png
4
{{Grid|Diamond|padded=1}}
Diamond.png
{{Grid|Diamond, Mese Crystal|2, 3|padded=1}}
Diamond.png
2
Mese Crystal.png
3

See also