/tg/ Station 13 - Modules - Types

code/modules/unit_tests/~nova/fitness.dm

/datum/unit_test/fitness_sheet_statesEvery fitness limb's sheet holds the states the limb draws, its hand's too: a hand draws from its arm's sheet, so a missing one vanishes. A plain sheet's size sheets are the ones its fitness limbs draw, so a human with skin tones off is drawn at their size from the humanoid ones. A digitigrade leg keeps its plain sheet and draws its size's (fitness_sheet()), where a missing state would leave it drawing today's leg. Each definition step has its overlay for what every limb but a hand or a digitigrade leg draws, at the limb's size and at the Normal size, where a missing one draws nothing.
/datum/unit_test/fitness_definition_follows_limbA limb's muscle definition is its own and goes with it, and a new limb takes its body's: a Muscular, defined arm moved to a plain body draws its definition there, and the arm its old body regrows comes back at the body's size and definition, from its DNA, drawn.
/datum/unit_test/fitted_garmentsGarments fitted to fitness limbs as they're drawn, and the limb changes that fit them again.
/datum/unit_test/fitted_garments/underclothesUnderclothes are fitted to their wearer's fitness limbs as they're drawn, cached apart from a Normal body's, and fitted again when a limb changes: a Muscular arm refits a long-sleeved shirt, and an augment in its place draws it as it is again. A digitigrade body's Muscular leg refits the digitigrade state its underwear draws.
/proc/drawn_underclothesReturns the appearance a test human's only underclothes are drawn as. Their layer also holds what their worn emissives are drawn with (prepare_worn_emissive_overlays()), which has no sprite.
/datum/unit_test/fitted_garments/worn_clothingWorn clothing is fitted to its wearer's fitness limbs as it's drawn, and drawn again when they change, where a limb put on redraws only some slots and a size swap draws nothing: a Muscular arm put on refits a jumpsuit, an augment in its place draws it as it is again, and a muscle size from the preferences refits it. A firesuit's separate glow is fitted with its sprite, and its emissive blocker is the fitted sprite's.
/datum/unit_test/fitted_garments/deferredA garment's first fit to a new fit waits for SSgarment_fitting: the garment is drawn as it is meanwhile, and drawn again, fitted, once the fit is made, a uniform in its slot and underclothes with the body. A size changed while it's worn queues the garment's new fit the same way, and a fit once made is found again whenever the garment is drawn.
/proc/drawn_worn_spriteReturns the sprite a test human's worn item is drawn as in one of its overlay layers: the first appearance drawn there with an icon. The layer also holds what the item's emissives are drawn with (prepare_worn_emissive_overlays()).
/proc/drawn_appearancesReturns every appearance drawn in an overlay layer, each before what it holds.