Template:Item/doc: Difference between revisions

From Space Station 14 Wiki
(more docs)
(→‎Adding links: example fix)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Examples ==
== Examples ==
=== Basic ===
{{tji|item|lv}}
{{tji|item|lv}}


Line 6: Line 7:
{{item|lv}}
{{item|lv}}


=== Custom icon size ===
=== For items without icons ===
{{tji|item|lv|size:64px}}
{{Callout
|Info
|Not all items have their icons uploaded to the wiki. Such items will only have their label displayed.<br>
 
Used here is some abstract item without icon.}}
 
{{tji|item|foldable}}
 
{{gda}}
 
{{item|foldable}}
 
=== Specifying amount of items ===
{{tji|item|steel|25}}


{{gda}}
{{gda}}


{{item|lv|size=64px}}
{{item|steel|25}}
 
More examples
{{collapse
|{{item|steel|-55}}
 
{{item|steel|0}}
 
{{item|steel|0.5}}
 
{{item|steel|1}}
 
{{item|steel|5}}
 
{{item|steel|9}}
 
{{item|steel|10}}
 
{{item|steel|11}}
 
{{item|steel|15}}
 
{{item|steel|19}}
 
{{item|steel|20}}
 
{{item|steel|21}}
 
{{item|steel|25}}
 
{{item|steel|30}}
 
{{item|steel|35}}
 
{{item|steel|999999}}
}}


=== Custom label ===
=== Custom label ===
Line 20: Line 69:
{{item|proto-kinetic accelerator|label=hole-maker}}
{{item|proto-kinetic accelerator|label=hole-maker}}


== A list of all items with icons ==
==== Empty label ====
Contains all items with icons. Updates automatically.  
To remove the label alltogether, pass an empty string to {{c|label}}.
 
{{tji|item|proto-kinetic accelerator|label:}}
 
{{gda}}
 
{{item|proto-kinetic accelerator|label=}}
 
==== Capitalizing the label ====
This makes the first letter of the label uppercase.
 
{{tji|item|proto-kinetic accelerator|capitalize:1}} <br>
{{gray or}} <br>
{{tji|item|proto-kinetic accelerator|cap:1}}
 
{{gda}}
 
{{item|proto-kinetic accelerator|capitalize=1}} <br>
{{gray or}} <br>
{{item|proto-kinetic accelerator|cap=1}}


{{#invoke: Item|generate_item_icons_for_all_items_with_icons|4}}


== Errors ==
=== Custom icon size ===
=== Unknown item with name ===
{{tji|item|lv|size:64px}}
{{tji|item|lorem ipsum honk}}


{{gda}}
{{gda}}


{{item|lorem ipsum honk}}
{{item|lv|size=64px}}


=== No image defined for item with name ===
=== Adding links ===
{{tji|item|foldable}}
{{tji|item|Deckard|link:Guns}}


{{gda}}
{{gda}}


{{item|foldable}}
{{item|Deckard|link = Guns}}
 
{{Callout|Info|Some items have links by default, such as {{item|protolathe}}, so with this option you can override them as you wish.}}
 
== A list of all items with icons ==
See [[Template:Item/doc/list of items with icons]].
 
== A list of all items ==
See [[Template:Item/doc/list_of_items]].
 
== Errors ==
=== Unknown item ===
{{tji|item|lorem ipsum honk}}
 
{{gda}}


<noinclude>[[Category:Template documentation]]</noinclude>
{{item|lorem ipsum honk}}

Latest revision as of 05:13, 4 September 2024

Examples

Basic

{{item|lv}}

LV cable coil

For items without icons

Info
Not all items have their icons uploaded to the wiki. Such items will only have their label displayed.
Used here is some abstract item without icon.

{{item|foldable}}

foldable

Specifying amount of items

{{item|steel|25}}

25 steel

More examples

-55 steel

0 steel

0.5 steel

1 steel

5 steel

9 steel

10 steel

11 steel

15 steel

19 steel

20 steel

21 steel

25 steel

30 steel

35 steel

999999 steel

Custom label

{{item|proto-kinetic accelerator|label=hole-maker}}

hole-maker

Empty label

To remove the label alltogether, pass an empty string to label.

{{item|proto-kinetic accelerator|label=}}

Capitalizing the label

This makes the first letter of the label uppercase.

{{item|proto-kinetic accelerator|capitalize=1}}
or
{{item|proto-kinetic accelerator|cap=1}}

Proto-kinetic accelerator
or
Proto-kinetic accelerator


Custom icon size

{{item|lv|size=64px}}

LV cable coil

Adding links

{{item|Deckard|link=Guns}}

Deckard

Info
Some items have links by default, such as protolathe, so with this option you can override them as you wish.

A list of all items with icons

See Template:Item/doc/list of items with icons.

A list of all items

See Template:Item/doc/list_of_items.

Errors

Unknown item

{{item|lorem ipsum honk}}

Lua error in Module:Item at line 83: item generation failed: no item was found by ID/name 'lorem ipsum honk'.