Module:Role/doc: Difference between revisions
From Space Station 14 Wiki
docs |
making changes → also change {{Role}} |
||
Line 18: | Line 18: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Callout|Tip|After you done, also update the auto-suggest list of roles in {{T|Role}}.}} | |||
Value can also be a string. This is used to make abbreviations. Note that abbreviations are only used to lookup roles, they cannot be displayed. | Value can also be a string. This is used to make abbreviations. Note that abbreviations are only used to lookup roles, they cannot be displayed. |
Latest revision as of 03:06, 16 March 2025
Module documentation
|
---|
View or edit this documentation • (about module documentation) |
Uses JSON data
This module uses JSON data pages:
Implements {{Role}}.
How to add/edit/remove a role
Go to the roles JSON file (linked at the top).
Each key is a role name that can be used in the template. These must all be lowercase.
Each value is an object with properties:
{
"display": "[required] display name aka the label that would be displayed, for example: Atmospheric Technician",
"icon": "[optional] icon file name, for example: File:JobIconStationEngineer.png",
"link": "[optional] page name to link to, for example: Station Engineer"
}
Tip
After you done, also update the auto-suggest list of roles in {{Role}}.
Value can also be a string. This is used to make abbreviations. Note that abbreviations are only used to lookup roles, they cannot be displayed.
To make an abbreviation, put the key of another role as a value. For example, to add a an atmosian
abbreviation for an Atmospheric Technician
:
{
"atmosian": "atmospheric technician",
"atmospheric technician": {
"display": "Atmospheric Technician",
"icon": "File:JobIconAtmosphericTechnician.png",
"link": "Atmospheric Technician"
}
}