Module:Swatches/doc

From Dune: Awakening Community Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Swatches

Module:Swatches

Lists cosmetic swatches from Module:Swatches/data and renders them using Template:SwatchInfobox.

The rendered infobox cards are wrapped in a flex container with the following styling: display:flex; flex-wrap:wrap; overflow-x:auto; align-items:flex-start; gap:1em;

Usage

List all swatches

If no scope is provided, all swatches in the dataset are shown:

{{#invoke:Swatches|list}}

List swatches for a scope page

Scope can be specified to show all swatches that are compatible with at least one item in that scope:

{{#invoke:Swatches|list|scope=<SCOPE>}}

List swatches for an item page

Item can additionally be specified to show only swatches that are compatible with that item:

{{#invoke:Swatches|list|scope=<SCOPE>|item=<ITEM>}}

Parameters

scope (optional)
Compatibility scope to filter swatches. Accepted values:
  • Vehicle
  • Weapon
  • Garment
  • Placeable
item (optional)
Name of item within the specified scope, to further filter swatch compatibility. This must match the item name used in onlyItems tokens in Module:Swatches/data.
{{PAGENAME}} can be used if the page title matches the dataset naming.

Notes

  • Swatch compatibility rules are defined in Module:Swatches/data using the scopes and optional onlyItems fields.
  • If scope is omitted, item is ignored and all swatches are shown.
  • If a swatch uses scopes={"All"}, it will appear for any scope/item filter.