modular_aphelion/modules/dirt/code/worn.dm 
| DIRT_COVERAGE_READS | How many sprites' coverage of a zone dirt_sprite_zone_pixels() keeps: a few dozen numbers each. |
|---|---|
| /proc/dirt_mess_garment | Returns the worn item a shot at a zone lands on, or null for the skin: the outermost of the head, mask, suit and uniform slots whose body_parts_covered includes the zone's part (the chest for the chest, stomach and back; the groin for the groin and butt; the legs for the thighs). The face is covered when the mouth is, by the item covering it. Underclothes never count: they aren't items. Through a wall portal only the uniform counts, while it's drawn: the relay copies it and no suit (lower_body_only()), so a coat over the lower body leaves the shot to what the relay shows under it. A skirt the relay leaves out (wall_relay_skips_uniform()) leaves it to the underclothes or the skin. |
| /proc/dirt_zone_cover_flags | Returns the body_parts_covered flag each zone below the face lies under: list(zone = flag). You should NEVER modify it. |
| /proc/dirt_mess_surface | Returns the carrier a shot at a zone lands on, and the underclothes it lands on: list(/datum/component/dirtiness, a DIRT_UNDERCLOTHES_* define or null). The outermost garment over the zone takes it (dirt_mess_garment()), else the underclothes that cover it, held by the person, else the skin. |
| /proc/dirt_mess_inset_image | Returns an image drawing cloth's baked mess over a garment, kept to the garment's own pixels by BLEND_INSET_OVERLAY inside the worn KEEP_TOGETHER wrapper build_worn_icon() makes. It floats, and on a garment drawn on the body's own tile it isn't offset, so the bulge redraws it over its cloth too (bulge_over_cloth()). |
| /proc/dirt_worn_shift | Returns where a worn garment's wrapper has its wearer's own tile, as list(pixels right, pixels up): build_worn_icon() centres the wrapper on the garment's worn dimensions, then moves it by its worn offsets, so masks drawn on the body go back by both. list(0, 0) for a 32x32 garment without offsets; list(16, 0) for a 64x32 taur suit, moved 16 px left. |
| /proc/dirt_taur_fitted | Returns whether a garment is drawn on its wearer's taur body as a taur suit: a sprite spanning the 64x32 taur canvas, the body's own tile in its middle, which takes the taur body's pools. |
| /proc/dirt_cover_layers | Returns the overlays_standing slots whose sprites cover skin mess, so it fades out beside them: the underclothes and the garments. You should NEVER modify it. |
| /proc/dirt_cover_sprites | Returns the sprites a body draws over its skin, from what it wears: list(list(icon, icon state), ...), in dirt_cover_layers() order. |
| /proc/dirt_sprites_key | Returns sprites as one line of text, to key masks by and to tell outfits apart. |
| /proc/dirt_underclothes_worn | Returns the underclothes a body draws, each its own surface: alist(DIRT_UNDERCLOTHES_* define = its /datum/sprite_accessory/clothing), as get_underwear_overlays() picks them. |
| /proc/dirt_underclothes_sprites | Returns a body's underclothes as drawn, lowest first: list(list(DIRT_UNDERCLOTHES_* define, icon, icon state, accessory name), ...). Each is drawn as get_underwear_overlays() draws it, fitted to the body, a revealing loincloth with its flap cut away while the bulge cuts it (bulge_cut_worn()), and they stack by their accessories' layers, then in that proc's order. |
| /proc/cmp_dirt_underclothes_drawn | Sorts underclothes from dirt_underclothes_sprites() lowest first: the higher layer number draws under. |
| /proc/dirt_underclothes_key | Returns the key a person's mess on one piece of underclothes is kept under: the slot and the accessory, so it stays with that piece while it's off. |
| /proc/dirt_underclothes_on | Returns which underclothes a shot at a zone lands on, or null for the skin. Each piece is judged by its sprite against the zone's pixels on the plain human template (dirt_human_zone_pixels()), so every body is judged on the human shape and nothing waits on its own template. |
| /proc/dirt_underclothes_by_rules | Returns which underclothes a shot at a zone lands on before the human template is built: the topmost piece covering it by the rules underclothes follow elsewhere, or null. Underwear covers the groin and butt, an undershirt or bra the chest, and an undershirt the stomach and back too. A piece also covers what it hides (dirt_underclothes_hides()). |
| /proc/dirt_underclothes_hides | Returns whether the underclothes rules say a piece hides a zone outright: an undershirt that hides the groin (a corset, a leotard) the groin and butt, underwear that hides the breasts (a one-piece swimsuit) the chest. |
| /proc/dirt_zone_underclothes | Returns the kinds of underclothes that belong on each zone, in the order they take a tied shot there: list(zone = list of DIRT_UNDERCLOTHES_* defines). You should NEVER modify it. |
| /proc/dirt_sprite_zone_pixels | Returns which of a zone's pixels a sprite covers, read at those pixels only, facing the way that shows the zone. Kept for each sprite and zone, the oldest dropped past DIRT_COVERAGE_READS. A sprite that isn't 32x32 covers none. You should NEVER modify the list it returns. |
| /proc/dirt_zone_facing | Returns the direction a zone is judged from, the one that shows it: north for the back and butt, south for the rest. |
| /proc/dirt_human_zone_pixels | Returns a zone's pixels on the plain human template, facing the way that shows it (dirt_zone_facing()): the body pixels whose limb, angle and height lie in one of the zone's aim areas (dirt_aim_zones()). Null until SSdirt has built that direction of the template in the background (/datum/controller/subsystem/dirt/proc/human_surface()). Each zone is read once a round. You should NEVER modify the list it returns. |
| /proc/dirt_zone_layer | Returns the layer of the surface a shot at a zone would land on: the garment's over it, DIRT_UNDERCLOTHES_LAYER where underclothes take it, else DIRT_SKIN_LAYER. |
| /proc/dirt_slot_layer | Returns the layer a worn slot's garment draws at, which its mess lies on, against which parts draw over or under it. |
| /datum/dirt_drawing | What one surface's masks are made from and drawn with: a garment's cloth, one of a person's underclothes, or a part. A request is made when the surface's splats or what it's drawn on change, never on a draw. |
| /proc/dirt_slot_redraw | Returns what to draw again on a body for an item in a slot: a DIRT_REDRAW_* flag, or NONE. |
Define Details
DIRT_COVERAGE_READS 
How many sprites' coverage of a zone dirt_sprite_zone_pixels() keeps: a few dozen numbers each.