Template:Construction

From Against the Storm Official Wiki
Revision as of 16:02, 28 November 2023 by Aeredor (talk | contribs) (Making a new template for construction goods since we use this all over the place)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Overview

A template to populate small, well-aligned tables of construction goods.


Parameters

You may elect to name the parameters explicitly (Planks=) or use them in the order specified in the table:

Parameter Type Description
Planks Number The number of Planks Planks required.
Bricks Number The number of Bricks Bricks required.
Fabric Number The number of Fabric Fabric required.
Parts Number The number of Parts Parts required.

Examples

This table shows all possible values. {{Construction|Planks=12|Bricks=8|Fabric=4|Parts=2}} yields:

12Planks Planks
8Bricks Bricks
4Fabric Fabric
2Parts Parts

Alternatively, you do not have to name the parameters. {{Construction|12|8|4|2} yields the same thing:

12Planks Planks
8Bricks Bricks
4Fabric Fabric
2Parts Parts

You can also mix naming and not-naming to make it easier to write when skipping over building materials. {{Construction|8|Parts=2}} yields:




8Planks Planks
2Parts Parts

Errors

This template does not result in any errors. However, there is no use for a template called without parameters.

{{Construction}}

Yields:

(It's there, but it's a blank table.)

The template also does not prevent you from mixing both named and unnamed parameters, but the result will be confusing to readers.

{{Construction||10|Bricks=12}}

Yields:


10Bricks Bricks
12Bricks Bricks