modular_aphelion/modules/dirt/code/masks.dm 
| DIRT_MASK_SOLID | How much of a pixel a role's run covers, out of 255 (dirt_role_runs()). Haze is film at half. |
|---|---|
| /datum/dirt_splat | One shot's mark: a variant of a zone's mess at a level. More shots on the zone raise the level; past the top one, another splat starts. |
| /datum/dirt_mask_request | What a surface's masks are made from: the body they're drawn on and the splats on it. Requests with the same mask_key() share their masks, so bodies drawn from the same sprites with the same splats draw the same icons. A request is made once and never changed: it keeps copies of the splats, so a splat that levels up or lands while its masks wait in the queue changes neither the key nor what's drawn under it. |
| /datum/dirt_masks | A surface's masks: its mess baked into four-direction RGBA icons (dirt_baked_icon()), registered in the resource cache, each drawn as it is (dirt_mess_baked_image()). |
| /datum/dirt_mask_job | Makes a request's masks a piece at a time (next_piece()). While it waits, SSdirt.mask_jobs holds it under its key, so a body asking meanwhile waits for it (wait()) rather than queueing it again. |
| /proc/dirt_cover_fades | Returns how near a mask's pixels lie to what's worn over them, where they fade out: alist(index = 1 beside it, or 2 one pixel further), for the pixels drawn that it leaves bare. Steps are up, down and across. |
| /proc/dirt_mask_directions | Returns the directions a mask is made in, in the order its pieces go. You should NEVER modify it. |
| /proc/dirt_thickness_code | Returns the code a thickness packs as in /datum/dirt_pixels/proc/drawn(), from 0: its place among the thicknesses packed so far this round. A mask's thicknesses come from a handful of values. |
| /proc/dirt_packed_thicknesses | Returns the thicknesses packed so far, indexed by their code + 1 (dirt_thickness_code()). You should NEVER modify it. |
| /proc/dirt_pixels_from_drawn | Returns a mask made again from its drawn pixels. |
| /proc/dirt_drawn_indexes | Returns the indexes of a mask's drawn pixels, in row-major order. |
| /proc/dirt_drawn_roles | Returns the roles runs are drawn in, one to a pixel, in the order they're baked: haze is film at half (dirt_role_runs()). You should NEVER modify it. |
| /proc/dirt_shown_runs | Returns a surface's runs, as dirt_role_runs() lays them: alist(DIRT_ROLE_* define = alist(direction = runs)). |
| /proc/dirt_baked_icon | Returns runs baked into one four-direction RGBA icon on a blank state, registered in the resource cache as bulge_register_icon() registers an icon built at run time, or null when they draw nothing. Each run is one DrawBox() in its role's tint colour, at the tint's alpha times the run's level, rounded to 8 bits. |
| /proc/dirt_runs_key | Returns an MD5 of what runs draw, the same for runs that draw the same pixels: each role's runs in each direction, in a fixed order, with their levels. |
| /proc/dirt_role_runs | Adds a mask's horizontal runs in one direction to each role's: list(icon y, first icon x, last icon x, level). A run is a role's pixels side by side in one row at one level, how much of each pixel it covers out of 255: DIRT_MASK_SOLID, or DIRT_MASK_HALF for haze, drawn as film. A pixel beside what's worn over it keeps a share of its level: its fade ring over DIRT_FADE_RINGS + 1. |
| /proc/dirt_add_run | Adds one run to a role's in one direction. |
Define Details
DIRT_MASK_SOLID 
How much of a pixel a role's run covers, out of 255 (dirt_role_runs()). Haze is film at half.