Template:InfoboxResource: Difference between revisions
From Project Nakagami
No edit summary |
No edit summary |
||
| (21 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{| | <includeonly>{| class="infobox" | ||
|style="text-align: center" colspan="2" | '''{{PAGENAME}}''' | |style="text-align: center; font-size: large;" colspan="2" | '''{{#if: {{{name|}}}|{{{name}}}|{{PAGENAME}}}}''' | ||
|- | |- | ||
| | |style="text-align: center" colspan="2" | {{#if: {{{imagestyle|}}} | {{#switch: {{{imagestyle}}} | icon={{ItemIcon|icon={{{icon0|none}}}|size=256}} | image=[[File:{{{image0|Invalid_image0_param}}}|frameless|center]] | iconimage={{ItemIcon|icon={{{icon0|none}}}|size=128}} [[File:{{{image0|Invalid_image0_param}}}|frameless|center]] | imageicon=[[File:{{{image0|Invalid_image0_param}}}|frameless|center]] {{ItemIcon|icon={{{icon0|none}}}|size=128}} | iconicon={{ItemIcon|icon={{{icon0|none}}}|size=128}} {{ItemIcon|icon={{{icon1|none}}}|size=128}} | imageimage=[[File:{{{image0|Invalid_image0_param}}}|frameless|center]] [[File:{{{image1|Invalid_image1_param}}}|frameless|center]] | ERROR: INVALID IMAGE STYLE}} | '''ERROR: NO IMAGE STYLE DEFINED'''}} | ||
| {{#if: {{{ | |- | ||
{{#if: {{{sources|}}} | {{!}}- | | '''Mod''' | ||
{{!}} Sources | | {{{mod|'''ERROR: NO MOD SPECIFIED'''}}} | ||
{{!}} {{{sources}}} }}{{#if: {{{oredict|}}} | {{!}}- | {{#if: {{{sources|}}} | <nowiki> </nowiki> | ||
{{!}} OreDict Name | {{!}}- | ||
{{!}} {{{oredict}}} }}{{#if: {{{hungerrestore|}}} | {{!}}- | {{!}} '''Sources''' | ||
{{!}} Hunger Restoration | {{!}} {{{sources}}} }}{{#if: {{{oredict|}}} | <nowiki> </nowiki> | ||
{{!}}- | |||
{{!}} '''OreDict Name''' | |||
{{!}} <code>{{{oredict}}}</code> }}{{#if: {{{hungerrestore|}}} | <nowiki> </nowiki> | |||
{{!}}- | |||
{{!}} '''Hunger Restoration''' | |||
{{!}} {{{hungerrestore}}} }} | {{!}} {{{hungerrestore}}} }} | ||
|}</includeonly><noinclude> | |||
Shows an infobox for resources, such as a copper ingot or wood block. | |||
The following parameters are supported: | |||
{| class="wikitable" | |||
|- | |||
! scope="col"| Parameter | |||
! scope="col"| Required or Optional | |||
! scope="col"| Use | |||
! scope="col"| Default | |||
|- | |||
| name | |||
| Optional | |||
| The title to show at the top of the infobox. | |||
| Page Title | |||
|- | |||
| imagestyle | |||
| Required | |||
| What kind of image(s) to show. Valid options: | |||
* <code>icon</code> | |||
* <code>image</code> | |||
* <code>iconicon</code> | |||
* <code>iconimage</code> | |||
* <code>imageimage</code> | |||
* <code>imageicon</code> | |||
| N/A | |||
|- | |||
| icon0 | |||
| Required for imagestyle of <code>icon</code>, <code>iconicon</code>, <code>iconimage</code>, <code>imageicon</code>. | |||
| The name of the icon to show. Names are defined in [[Module:ItemIconData]] | |||
| N/A | |||
|- | |||
| icon1 | |||
| Required for imagestyle of <code>iconicon</code>. | |||
| The name of the icon to show. Names are defined in [[Module:ItemIconData]] | |||
| N/A | |||
|- | |||
| image0 | |||
| Required for imagestyle of <code>image</code>, <code>imageimage</code>, <code>iconimage</code>, <code>imageicon</code>. | |||
| The filename of the image to show. | |||
| N/A | |||
|- | |||
| image1 | |||
| Required for imagestyle of <code>imageimage</code>. | |||
| The filename of the image to show. | |||
| N/A | |||
|- | |||
| mod | |||
| Required | |||
| The mod that implements this item. | |||
| N/A | |||
|- | |||
| sources | |||
| Optional | |||
| A link to the item/block that gives this resource, if simple. | |||
| (Hidden) | |||
|- | |||
| oredict | |||
| Optional | |||
| The OreDict name of the resource. | |||
| (Hidden) | |||
|- | |||
| hungerrestore | |||
| Optional | |||
| (Only for foods) The amount of hunger, in half-shanks, that this food restores. | |||
| (Hidden) | |||
|} | |} | ||
</noinclude> | |||
Latest revision as of 00:06, 1 February 2022
Shows an infobox for resources, such as a copper ingot or wood block.
The following parameters are supported:
| Parameter | Required or Optional | Use | Default |
|---|---|---|---|
| name | Optional | The title to show at the top of the infobox. | Page Title |
| imagestyle | Required | What kind of image(s) to show. Valid options:
|
N/A |
| icon0 | Required for imagestyle of icon, iconicon, iconimage, imageicon.
|
The name of the icon to show. Names are defined in Module:ItemIconData | N/A |
| icon1 | Required for imagestyle of iconicon.
|
The name of the icon to show. Names are defined in Module:ItemIconData | N/A |
| image0 | Required for imagestyle of image, imageimage, iconimage, imageicon.
|
The filename of the image to show. | N/A |
| image1 | Required for imagestyle of imageimage.
|
The filename of the image to show. | N/A |
| mod | Required | The mod that implements this item. | N/A |
| sources | Optional | A link to the item/block that gives this resource, if simple. | (Hidden) |
| oredict | Optional | The OreDict name of the resource. | (Hidden) |
| hungerrestore | Optional | (Only for foods) The amount of hunger, in half-shanks, that this food restores. | (Hidden) |