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

modular_aphelion/modules/fitness/code/garment_fit_queue.dm

GARMENT_FIT_MAX_PIECESThe most pieces a garment fit is made in: its setup, a view for each frame of each direction, and its end.
GARMENT_FIT_MAX_FINISH_ROUNDSThe most rounds finish_all() goes: the bodies a round draws again can find fits to queue, which the next round makes.
/var/SSgarment_fittingMakes the garment fits bodies wait for, a piece at a time, in the tick time other subsystems leave over.
/datum/garment_fit_jobOne garment fit, made a piece at a time (next_piece()): its setup, each view of each direction's frames (fit_garment_view()), and its end, which caches what it made. While it waits, its place in its cache holds the job itself, so a garment drawn meanwhile finds it and waits for it (wait()) rather than queueing it again.
/datum/garment_fit_job/wornA worn item's sprite or glow fitted (fit_worn_icon(), fit_worn_glows()): the icon build_worn_icon() built, or a state of its worn sheet itself. Only a 32x32 sprite with four directions is fitted; an animated one keeps its frame delays, read from its sheet, and isn't fitted where they can't be read, like a generated icon's.
/datum/garment_fit_job/underclothesAn underclothes style's sprite fitted (/datum/sprite_accessory/clothing/proc/fitted_sprite()), as make_appearance() draws it: its state fitted, then cut for a female body. A style whose legs the GAGS digitigrade mask draws is cut and masked first, and the result fitted, legs and all. A state's first frame is fitted.
/datum/garment_fit_job/underclothes/flexAn underclothes style's sprite fitted over flexing pecs (its fit's pec_flex), so the top moves with them: animated as the flex is, each frame fitted to the pecs on that frame of it (garment_pec_flex()) over one fit of the limbs a view, then cut for a female body, all as the still fit is. The frames are drawn over a state of the flex's own sheet, so the sprite keeps its delays and loops as the pecs do. A style whose state is animated itself keeps its still fit.

Define Details

GARMENT_FIT_MAX_FINISH_ROUNDS

The most rounds finish_all() goes: the bodies a round draws again can find fits to queue, which the next round makes.

GARMENT_FIT_MAX_PIECES

The most pieces a garment fit is made in: its setup, a view for each frame of each direction, and its end.