Template:Item infobox: Difference between revisions
forgot a thing |
automatic solution total |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><templatestyles src="Template:Item infobox/styles.css"></templatestyles><!-- | <includeonly><templatestyles src="Template:Item infobox/styles.css"></templatestyles><!-- | ||
-->{{reset solution count}}<!-- | |||
-->{{#invoke:Infobox|main | -->{{#invoke:Infobox|main | ||
Line 6: | Line 8: | ||
|title={{{title|}}} | |title={{{title|}}} | ||
|image={{#if:{{{image|{{{img|}}}}}}|[[File:{{{image|{{{img}}}}}}|250px]]}} | |image={{#if:{{{image|{{{img|}}}}}}|[[File:{{{image|{{{img}}}}}}|250px]]}} | ||
|sections=Main, | |caption={{{caption|}}} | ||
|sections=Main, Food, Processing, Chemical composition, Technical Information | |||
|Main=Categories, Type, Max stack, Size, Meow, Internal Size | |Main=Categories, Type, Max stack, Size, Meow, Internal Size | ||
Line 21: | Line 24: | ||
|Internal Size = {{{internal size|}}} | |Internal Size = {{{internal size|}}} | ||
| | |Food = Edible by: | ||
| | |Edible by: = {{#invoke:Item infobox|generate_edible_by}} | ||
|Solution | |||
|Processing = Grindable, Juiceable | |||
|Grindable = {{#ifeq: {{yesno|{{{grindable|}}}}}|yes|Yes}} | |||
|Grindable_label = {{Tooltip|Grindable|Can be grinded in a grinder.}} | |||
|Juiceable = {{#ifeq: {{yesno|{{{juiceable|}}}}}|yes|Yes}} | |||
|Juiceable_label = {{Tooltip|Juiceable|Can be juiced in a grinder.}} | |||
|Chemical composition=Capacity, Solution | |||
|Capacity = {{{solution capacity|}}} | |||
|Solution = {{#if: {{{solution|}}} | |||
|{{{solution}}}<br><br>'''Total: {{solution count}}u''' | |||
}} | |||
|Solution_class = flat-bullet-list | |||
|Technical Information = ID | |Technical Information = ID | ||
Line 32: | Line 47: | ||
-->[[Category:Items]]</includeonly><noinclude> | -->[[Category:Items]]</includeonly><noinclude> | ||
{{docs|bb= | {{docs|bb= | ||
{{uses lua|Item infobox}} | |||
{{uses template styles}} | {{uses template styles}} | ||
{{template populates categories|Items|<category>}} | {{template populates categories|Items|<category>}} | ||
Line 141: | Line 157: | ||
"suggested": true | "suggested": true | ||
}, | }, | ||
"solution | "solution": { | ||
"label": "Solution composition", | "label": "Solution composition", | ||
"description": "If an item holds a solution, which chemicals it is composed of? List them using a bullet list, each item starting on a new line.", | "description": "If an item holds a solution, which chemicals it is composed of? List them using a bullet list, each item starting on a new line.", | ||
"example": "* | "example": "* {{r|nutriment|6}} * {{r|amatoxin|3}} * {{r|vitamin|4}}", | ||
"type": "string", | "type": "string", | ||
"suggested": true | "suggested": true | ||
Line 153: | Line 169: | ||
"example": "13u", | "example": "13u", | ||
"type": "line", | "type": "line", | ||
"suggested": true | |||
}, | |||
"caption": { | |||
"label": "Image caption", | |||
"type": "line", | |||
"suggested": true | |||
}, | |||
"edible by reptilians": { | |||
"label": "[Food] Edible by reptilians", | |||
"description": "If item is food, whether it's edible by reptilians (lizards).", | |||
"type": "boolean", | |||
"suggested": true, | |||
"autovalue": "0" | |||
}, | |||
"edible by moths": { | |||
"label": "[Food] Edible by moths", | |||
"description": "If item is food, whether it's edible by moth people (moffs).", | |||
"type": "boolean", | |||
"suggested": true, | |||
"autovalue": "0" | |||
}, | |||
"edible by rest": { | |||
"label": "[Food] Edible by everyone else", | |||
"description": "If item is food, whether it's edible by everyone except those in previous \"Edible by X\" parameters.", | |||
"type": "boolean", | |||
"suggested": true, | |||
"autovalue": "0" | |||
}, | |||
"grindable": { | |||
"label": "[Processing] Grindable", | |||
"description": "Can be grinded in a grinder?", | |||
"type": "boolean", | |||
"autovalue": "0", | |||
"suggested": true | |||
}, | |||
"juiceable": { | |||
"label": "[Processing] Juiceable", | |||
"description": "Can be juiced in a grinder?", | |||
"type": "boolean", | |||
"autovalue": "0", | |||
"suggested": true | "suggested": true | ||
} | } | ||
Line 159: | Line 215: | ||
"title", | "title", | ||
"image", | "image", | ||
"caption", | |||
"category 1", | "category 1", | ||
"category 2", | "category 2", | ||
Line 168: | Line 225: | ||
"category 8", | "category 8", | ||
"type", | "type", | ||
"edible by reptilians", | |||
"edible by moths", | |||
"edible by rest", | |||
"grindable", | |||
"juiceable", | |||
"max stack", | "max stack", | ||
"size", | "size", | ||
"internal size", | "internal size", | ||
"solution capacity", | "solution capacity", | ||
"solution | "solution", | ||
"id" | "id" | ||
], | ], |
Latest revision as of 05:52, 4 April 2025
(though on what conditions — consult with the template itself)
- Category:Items
- [[:Category:<category>]]
Template:Item infobox/doc
Infobox templates for roles/jobs.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Infobox title | title | {{PAGENAME}} by default, using the title of the page.
| Line | required |
Image | image img | no description
| File | suggested |
Image caption | caption | no description | Line | suggested |
Category 1 | category 1 category | Item category. If it has multiple, use other category fields. All specified categories will also be added as categories to the page. DO NOT put links are any formatting here.
| Line | suggested |
Category 2 | category 2 | no description | Line | suggested |
Category 3 | category 3 | no description | Line | suggested |
Category 4 | category 4 | no description | Line | suggested |
Category 5 | category 5 | no description | Line | suggested |
Category 6 | category 6 | no description | Line | suggested |
Category 7 | category 7 | no description | Line | suggested |
Category 8 | category 8 | no description | Line | suggested |
Type | type | no description
| Line | suggested |
[Food] Edible by reptilians | edible by reptilians | If item is food, whether it's edible by reptilians (lizards).
| Boolean | suggested |
[Food] Edible by moths | edible by moths | If item is food, whether it's edible by moth people (moffs).
| Boolean | suggested |
[Food] Edible by everyone else | edible by rest | If item is food, whether it's edible by everyone except those in previous "Edible by X" parameters.
| Boolean | suggested |
[Processing] Grindable | grindable | Can be grinded in a grinder?
| Boolean | suggested |
[Processing] Juiceable | juiceable | Can be juiced in a grinder?
| Boolean | suggested |
Max Stack | max stack | no description
| Line | suggested |
Size | size | How big is this item? If it's a predefined size (like 'Large'), use template {{isize|<size>}} to format it. If it's a specific size (like 1x3), specify it as is. If it has multiple sizes (eg a welding tool), specify them in a bullet list (use smaller number first)
| String | suggested |
Internal size | internal size | How big is this item on the inside? Use {{infobox storage grid|grid1|grid2|grid3}} from the ingame YML files to define this.
| Line | suggested |
Solution capacity | solution capacity | If an item can hold a solution, how much can it hold?
| Line | suggested |
Solution composition | solution | If an item holds a solution, which chemicals it is composed of? List them using a bullet list, each item starting on a new line.
| String | suggested |
Item ID | id | Can be found in .yml files. If there are multiple IDs, use a bullet list.
| String | suggested |