Module:Swatches/data/doc

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

This is the documentation page for Module:Swatches/data

Module:Swatches/data

Dataset of cosmetic swatches.

Schema

The dataset is a table keyed by swatch name. Each key represents the display name of a swatch. The key is case-preserving and used directly for display and sorting.

Each value is a table with the following fields:

image
string
File name of the swatch preview image.
link (optional)
string
Wiki page name to link the swatch title and image to.
If omitted, the image is displayed without a link.
colors
string[4]
Array of 4 hex color strings, with the main color ordered first, then continuing clockwise.
Examples:
#000000
#ffffff
scopes (optional)
string[]
Compatibility scopes for the swatch. All values must be lowercase.
If omitted, the swatch applies to all scopes.
Valid values:
vehicle
weapon
garment
placeable
onlyClasses (optional)
string[]
Specific classes that the swatch applies to, in the form of <scope>:<class>.
scope must be lowercase and must match one of the valid scope values.
class is case-preserving and used directly for display.
If present, the swatch applies only to the specified classes.
If omitted, the swatch applies to all classes within its specified scopes.
Examples:
vehicle:Scout Ornithopter
weapon:Rapiers
garment:Stillsuits