modular_aphelion/modules/dirt/code/parts.dm 
| DIRT_PART_FIELDS | How many parts' fields dirt_part_field() keeps, packed: a few hundred bytes each, so under 128 KB. |
|---|---|
| /datum/dirt_part_source | A part's sprite as mess reads it: the images a genital draws in the layers the reference generator draws that part from (dirt_part_layers()), their colour layers' states taken together, or the plain pecs' shape a human chest without breasts takes its mess in (dirt_pecs_guide()). A mess aimed at the part's zone takes its share on these pixels (dirt_part_own()). Made once and never changed. |
| /proc/dirt_parts_key | Returns parts' keys as one line of text, to key masks by: each with where it draws against a surface in each direction, when one is given. |
| /proc/dirt_body_parts_key | Returns a body's parts as one line of text, with what they're drawn for and at what layers, to tell when a change to them may shape its mess otherwise. |
| /proc/dirt_part_layers | Returns the layers mess reads a kind of genital from, as the reference generator draws it (its own parts take every one): the butt's front and back (ADJ) images, every other kind's front image alone. You should NEVER modify it. |
| /proc/dirt_part_kind | Returns what a genital is drawn as for mess: a DIRT_PART_* define, or null for one that takes no share (the anus, the womb). The breasts organ is pecs when it's built from a pecs accessory. |
| /proc/dirt_part_zone | Returns the zone whose shots a kind of part takes a share of: the chest for breasts and pecs, the butt for the butt, the groin for the rest. |
| /proc/dirt_part_rounded | Returns whether a kind of part is rounded, so its mess follows its form in lobes (dirt_lobe_rasterise()) and the body's own mess leaves its pixels out: every kind but the penis, which takes a bead behind its tip. |
| /proc/dirt_part_body_level | Returns the level of a splat's mess on the body where parts take a share of it: down by 2 where a penis, testicles or vulva does, else by 1 where any part does, never under 1. A part takes a share in a direction where it has pixels. The top level stays: the body keeps its glaze, still off the rounded parts' pixels, and the parts draw theirs at DIRT_PART_MAX_LEVEL. |
| /proc/dirt_part_own | Returns the pixels a part takes its share on in one direction, as indexes in row-major order: its own. The pecs guide keeps to where the chest shows. The vulva, too small for a lobe of its own, also takes the ring of visible pixels round them (the body's, and the parts') when it lies on skin, but never on cloth. |
| /proc/dirt_part_field | Returns one splat's mess on a part's pixels, which keeps every piece where it merges with others: lobes on a rounded part, a bead behind the tip on the penis. Its fields have levels 1 to DIRT_PART_MAX_LEVEL, so a splat past it draws at it. A field rests on its arguments alone, and every mask its splat is on draws it again, so the newest DIRT_PART_FIELDS are kept, packed. |
| /proc/dirt_part_rasterise | Returns mess on a part too small to round, the penis: a bead just behind its tip (its pixel farthest from where it
joins the body) with a highlight and a grey underside, the tip itself translucent (over the whole end it read as a
white cap); at levels 2 and 3 a run back from the tip and a drop or two along the part; a translucent fringe inside
it. Drawn from the "part:aimed_ |
| /proc/dirt_part_fringe | Lays a part's translucent fringe: film on each of the part's pixels beside its solid mess, up, down or across, that holds none yet. |
| /proc/dirt_part_index | Returns a pixel's index on a 32x32 canvas, or null off it. |
| /proc/dirt_lobes | Returns a rounded part's lobes, each a list of indexes in row-major order: each side of DIRT_PART_MIDLINE where the view shows both (front or back, the vulva excepted), else the whole part. A lobe under 4 px holds none. |
| /proc/dirt_lobe_rasterise | Returns mess following a rounded part's form (breasts, pecs, the butt, testicles, the vulva), from the
"lobe:aimed_ |
| /proc/dirt_lobe_shape | Returns a lobe's shape: list(its indexes, TRUE on each of its pixels, alist(row = list(leftmost column, rightmost column)), its rows from the top). |
| /proc/dirt_lobe_row_at | Returns the row a fraction of the way down a lobe, 0 its top and 1 its bottom, not rounded. |
| /datum/dirt_lobe_raster | One rounded part's mess while dirt_lobe_rasterise() lays it: each pixel's role so far and the highlights. |
| /proc/dirt_pecs_guide | Returns the source of the plain pecs' shape a human chest without breasts takes mess in, an undrawn guide (Muscular pecs and breasts are the breasts organ, drawn), or null for any other chest. You should NEVER modify it. |
| /proc/dirt_part_drawn | Returns the source a genital is drawn as now, its organ slot filled in and each state's layer read from its image, or null while it draws none: hidden (dirt_shown()), a device drawn in its place, a bulge look drawn for it, no sprite in the layers mess reads it from (a taur's penis draws only behind the body), or a kind that takes no share. |
| /proc/dirt_body_parts | Returns the parts a body draws that take mess, lowest drawn first: the pecs guide if its chest takes one, then each genital drawn (dirt_part_drawn()). |
| /proc/cmp_dirt_parts_drawn | Sorts parts lowest drawn first: the higher layer number draws under. |
| /proc/dirt_surface_parts | Returns the parts a surface's splats reach, lowest drawn first: those on a zone one of the splats is on. Where each draws against the surface is worked out in each direction (/datum/dirt_part_source/proc/under()). |
| /proc/dirt_split_parts | Returns parts split by where they draw against a surface in one direction: list(those under it, whose share is drawn in its masks, those over it, whose share is drawn on themselves). |
| /proc/dirt_part_source_of | Returns a genital's images as a part source, every layer's colour layers' states together with the layer each draws at, or null when none draws a sprite. Emissives and texture holders are left out. |
| /proc/dirt_container_over | Returns a container of a baked mess image just over a genital's or a taur body's images: at the layer and offsets of the last sprite among them, the one drawn over the others, kept together. It isn't nested in that sprite: the sprite is coloured, which its overlays would take, and a filter on it doesn't reach them. |
Define Details
DIRT_PART_FIELDS 
How many parts' fields dirt_part_field() keeps, packed: a few hundred bytes each, so under 128 KB.