Template:CargoDamage: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
No edit summary
No edit summary
Line 9: Line 9:
| where = Items.name = "{{{1}}}" OR Items.name = "{{{2}}}" OR Items.name = "{{{3}}}" OR Items.name = "{{{4}}}" OR Items.name = "{{{5}}}" OR Items.name = "{{{6}}}"
| where = Items.name = "{{{1}}}" OR Items.name = "{{{2}}}" OR Items.name = "{{{3}}}" OR Items.name = "{{{4}}}" OR Items.name = "{{{5}}}" OR Items.name = "{{{6}}}"
| format = template
| format = template
| template = {{#switch: {{{tabletype}}}|sub = CargoDamage/sub|CargoDamage/row}}
| template = {{#switch: {{{tabletype}}}|sub = CargoDamage/sub|melee=CargoDamage/row|CargoDamage/row}}
| named args = yes
| named args = yes
}}|}
}}|}
</includeonly>
</includeonly>

Revision as of 12:44, 15 November 2021

Documentation

This template is used to display a damage table that reads data from the Items cargo table. Items called this way must have their data set in their respective infoboxes, on their respective pages, for the data to be stored in the cargo table.

Sub Templates

Syntax

{{CargoDamage|tabletype=<melee> or <sub>|item 1|item 2|item 3|item 4|item 5|item 6|width = <custom width, default 50>}}

Important note: unlike most templates, parameters cannot have spaces and/or newlines between them and the separator pipes. So the following won't work, for example: {{CargoDamage| item 1 | item 2 }}

Example

{{CargoDamage|tabletype=melee|Diving Knife|Hardened Diving Knife|Dementonite Diving Knife|Europan Handshake}}

Gives:

Item Afflictions Attack Speed }