clothing_variation_icons 
Checks that supports_variations_flags is being used correctly for clothing items that set it.
Also covers the BODYSHAPE_CUSTOM species (Vox, Vox Primalis, Teshari, Monkey), which aren't gated by any flag - they read worn_icon_vox and friends through generate_custom_worn_icon(), so what gets checked there is the icon files, the greyscale_config_worn_* configs that bake into them, and templates that exist but go unreferenced.
TODO: phasing out the runtime icon_exists() checks for special icons in favor of running CI against them
Procs | |
| check_gags_config | A species GAGS config only renders when there are colours to render it with, and it has to hold the states the item draws. Returns the config datum when it is set and actually live, so callers can compare what it generates from. |
|---|---|
| check_species_file | Sanity checks a singular species file. |
| check_species_files | Arguments: |
| check_species_variant | Checks one species' worn icon file and GAGS config on an item. |
| check_unwired_template | The item has a GAGS template for this species sitting right next to the one it already uses, but nothing points at it. Reported as a notice rather than a failure: this is a backlog, not a broken item. |
| has_digi_subtype | TRUE if any subtype of this has supports_variations_flags set to claim a digi sprite |
| has_snouted_subtype | TRUE if any subtype of this has supports_variations_flags set to claim a snouted sprite |
| item_context | Everything the species checks need to know about one item, worked out once and passed down. |
| loadout_slot_of | The LOADOUT_ITEM_* key human_update_icons.dm passes to generate_custom_worn_icon() for this item, or null if it has no such slot. |
| report | Fails or sends a notice depending on what the caller passes. A failure is blocking, whereas a notice is not. |
| runtime_assigned_types | Creates a blacklist of items that get their variation icons at runtime, so whatever they're compiled with is meaningless. MOD parts get theirs from the theme (mod_theme.dm); the sleeping bag is the same kind of item. There's probably going to be more like this, add as needed when they start failing. |
| species_sheet_for | The species-wide worn sheet generate_custom_worn_icon() falls back to for this slot, or null if there isn't one. |
| species_variants | The constant half of the species table - one row per BODYSHAPE_CUSTOM species that generate_custom_worn_icon() serves. |
| worn_state_adjusted | The icon_state a uniform draws from while it's rolled down, or null if it can't be adjusted. |
| worn_state_of | The icon_state build_worn_icon() draws from. |
| worn_state_swapped | Returns the second icon_state a suit draws from once it's opened up or has its hood raised, or null if it has neither. |
Proc Details
check_gags_config
A species GAGS config only renders when there are colours to render it with, and it has to hold the states the item draws. Returns the config datum when it is set and actually live, so callers can compare what it generates from.
The missing-colours and missing-sprite cases are notices for now because there is a backlog of both - promote them to TEST_FAIL once it is cleared. A config path that does not resolve at all is always a typo, so that one stays a failure.
Arguments:
- item_path: The item typepath being checked.
- context: The item_context() list for this item.
- config_var: Name of the var being checked, for the message.
- config_value: The config typepath the item has assigned.
check_species_file
Sanity checks a singular species file.
Arguments:
- item_path: The item typepath being checked.
- context: The item_context() list for this item.
- var_name: Name of the var holding the file, for the messages.
- icon_value: The file itself.
check_species_files
Arguments:
- item_path: The item typepath being checked.
- icon_state: The icon_state build_worn_icon() draws from.
- variants: species_variants(), built once by Run() since it is the same for every item.
check_species_variant
Checks one species' worn icon file and GAGS config on an item.
Arguments:
- item_path: The item typepath being checked.
- context: The item_context() list for this item.
- variant: One row out of species_variants().
- icon_value: This item's value for the row's icon var.
- config_value: This item's value for the row's greyscale config var.
check_unwired_template
The item has a GAGS template for this species sitting right next to the one it already uses, but nothing points at it. Reported as a notice rather than a failure: this is a backlog, not a broken item.
Arguments:
- item_path: The item typepath being checked.
- context: The item_context() list for this item.
- variant: One row out of species_variants().
- icon_value: This item's value for the row's icon var.
- live_config: TRUE if the species config on this item actually renders.
- species_sheet: The species-wide sheet for this slot, per species_sheet_for().
has_digi_subtype
TRUE if any subtype of this has supports_variations_flags set to claim a digi sprite
has_snouted_subtype
TRUE if any subtype of this has supports_variations_flags set to claim a snouted sprite
item_context
Everything the species checks need to know about one item, worked out once and passed down.
Arguments:
- item_path: The item typepath being checked.
- icon_state: The icon_state build_worn_icon() draws from, per worn_state_of().
loadout_slot_of
The LOADOUT_ITEM_* key human_update_icons.dm passes to generate_custom_worn_icon() for this item, or null if it has no such slot.
Arguments:
- item_path: The item typepath being checked.
report
Fails or sends a notice depending on what the caller passes. A failure is blocking, whereas a notice is not.
runtime_assigned_types
Creates a blacklist of items that get their variation icons at runtime, so whatever they're compiled with is meaningless. MOD parts get theirs from the theme (mod_theme.dm); the sleeping bag is the same kind of item. There's probably going to be more like this, add as needed when they start failing.
species_sheet_for
The species-wide worn sheet generate_custom_worn_icon() falls back to for this slot, or null if there isn't one.
Arguments:
- species_type: The species prototype to read custom_worn_icons off.
- slot: One of LOADOUT_ITEM_HEAD, etc.
species_variants
The constant half of the species table - one row per BODYSHAPE_CUSTOM species that generate_custom_worn_icon() serves.
None of this varies per item, so it is built once. initial() has no by-name form, so the per-item values can't live here: the caller pairs each row with its own spelled-out initial() reads, and the key names the var those reads come from. "suffixes" are the greyscale_config subtype names this repo uses for the species - both spellings are in play, see greyscale_configs.dm. "species" is the prototype whose custom_worn_icons sheet generate_custom_worn_icon() falls back to, or null if it has none.
worn_state_adjusted
The icon_state a uniform draws from while it's rolled down, or null if it can't be adjusted.
worn_state_of
The icon_state build_worn_icon() draws from.
worn_state_swapped
Returns the second icon_state a suit draws from once it's opened up or has its hood raised, or null if it has neither.