/tg/ Station 13 - Modules - Types

modular_aphelion/modules/custom_sprites/code/appendages.dm

/proc/custom_hair_appendage_nameAn appendage name as saved: tags, stray angle brackets, backslashes and control characters removed, spaces collapsed, at most CUSTOM_SPRITE_MAX_APPENDAGE_NAME characters. Null when nothing is left.
/proc/custom_hair_appendage_viewsAn appendage's painted views, re-encoded canonically. Unreadable and empty views are left out.
/proc/custom_hair_appendages_validateA drawing's appendages as they are saved, keyed "1", "2", "3" in order, or null when none are left.
/proc/custom_hair_appendages_validate_strictStrictly validates a style file's appendages, as custom_style_validate_drawing() does its views. Nothing is salvaged, and messages never repeat uploaded text.
/proc/custom_hair_appendages_exportAppendages in export form: every view and emission setting spelled out, keyed as saved. Null without any.
/proc/custom_hair_try_on_mask_rowsWhere a try-on hat's hair mask keeps and trims paint on the hair canvas: per view, height rows, top row first, of eight hex digits. Each digit is four pixels, the leftmost in its high bit: set where the mask keeps paint, clear where it trims. That's a quarter of a character a pixel, and the window sends these with every rebuild. The mask is lowered by the hairstyle's y_offset and carried upward as its top row, as it is on the paint itself. Cached.
/proc/custom_hair_try_on_viewsA try-on hat as the hair canvas shows it, per view: its worn sprite placed against paint drawn lift = list(x, z) off the tile. Data URLs, cached.
/proc/custom_hair_try_on_ui_dataThe window's Try on hats for a hair canvas height tall, drawn lift off the tile, over a hairstyle lifted y_offset. The window crops its "Hats that cover it" chips from the front views itself: BYOND exports an icon smaller than a tile padded out to 32 by 32.
/proc/custom_hair_try_on_imageThe hat a try-on puts on the preview: its worn sprite on the head layer, placed as the body places head items.
/datum/custom_sprite_editorThe hair editor's appendage layers and Try on hat. One draft and its window. This base type is the character preferences context: it is bound to its owner, slot and saved drawing, and saves to the character.