/tg/ Station 13 - Modules - Types — Proc Details

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_configA 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_fileSanity checks a singular species file.
check_species_filesArguments:
check_species_variantChecks one species' worn icon file and GAGS config on an item.
check_unwired_templateThe 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_subtypeTRUE if any subtype of this has supports_variations_flags set to claim a digi sprite
has_snouted_subtypeTRUE if any subtype of this has supports_variations_flags set to claim a snouted sprite
item_contextEverything the species checks need to know about one item, worked out once and passed down.
loadout_slot_ofThe LOADOUT_ITEM_* key human_update_icons.dm passes to generate_custom_worn_icon() for this item, or null if it has no such slot.
reportFails or sends a notice depending on what the caller passes. A failure is blocking, whereas a notice is not.
runtime_assigned_typesCreates 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_forThe species-wide worn sheet generate_custom_worn_icon() falls back to for this slot, or null if there isn't one.
species_variantsThe constant half of the species table - one row per BODYSHAPE_CUSTOM species that generate_custom_worn_icon() serves.
worn_state_adjustedThe icon_state a uniform draws from while it's rolled down, or null if it can't be adjusted.
worn_state_ofThe icon_state build_worn_icon() draws from.
worn_state_swappedReturns 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:

check_species_file

Sanity checks a singular species file.

Arguments:

check_species_files

Arguments:

check_species_variant

Checks one species' worn icon file and GAGS config on an item.

Arguments:

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:

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:

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:

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_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.