/tg/ Station 13 - Modules - Types — Var Details - Proc Details

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.

Vars

keyThe request's mask_key().
masksWhat it made.
mergedalist(direction = /datum/dirt_pixels): each direction's splats merged.
next_partThe next part to read.
next_readThe next of them to look for in SSdirt.sprite_reads.
next_splatThe next splat to rasterise.
next_spriteThe next sprite to read.
part_ownsalist(direction = alist(/datum/dirt_part_source = its pixels there, from dirt_part_own())).
partsThe request's read_parts().
requestWhat it makes.
splat_rastersEach splat's rasters in the request's order, each alist(direction = /datum/dirt_pixels/proc/drawn() of it). For a part, alist(direction = /datum/dirt_pixels).
sprite_pixelsWhat the sprites read cover: alist("cover", "clip" or "cut" = alist(direction = list of TRUE or null per pixel)).
spritesThe request's read_sprites(), read one a piece.
startedWhether its first piece has found its template and set it up.
taur_ownersFor a taur body's pools: alist(direction = what each pixel of the taur canvas shows, from dirt_taur_owners()).
templateThe template, once its turn comes.
template_sourceWhere its template comes from, from SSdirt.template_for(): the template, the job building it, or FALSE. Null for a part's masks that need none.
waitersWeak references to the bodies that drew without the masks while this waited -> DIRT_REDRAW_* flags.
wanted_spritesThe sprite directions its parts or taur body are read from, each list(sheet, state, direction, width), from wanted_reads().

Procs

NewArguments:
canvas_masksReturns the masks for cloth or a part: baked from canvas_runs().
canvas_runsReturns cloth's or a part's runs, once its pieces are made (dirt_shown_runs()): the whole canvas, which the garment's own pixels clip, or on underclothes only the pixels they show.
finishedCaches the masks, or FALSE when they failed, and notes the bodies that waited for them to be drawn again.
held_templateReturns the template it's drawn on once that's built, or null.
limb_masksReturns the masks for skin: each limb's baked from its runs (limb_runs()).
limb_runsReturns skin's runs, once its pieces are made: alist(limb zone = dirt_shown_runs()), for each limb they draw on, each clipped to the pixels its image shows, so nothing floats in the margin past the body, and each limb's overlay draws only on its own limb. The chest's also takes the pixels past the body of the parts drawn under the skin there (a butt in profile), which carry their share in the skin's mess: they're drawn with the chest.
mergeMerges one direction's splats into one mask, the thickest winning each pixel, with the parts drawn under and over the surface (dirt_merge_with_parts()).
most_piecesA piece a sprite direction of its parts or taur body read, then a piece a part read, four rasters a splat, a piece that finds only cached splats left, four merges, a piece a sprite read and the icons. A taur body's after its reads: four canvas reads, three pieces a splat in each direction (the rider's mess on cloth and on skin, then the pools), a piece that finds only cached splats left, four merges and the icons.
next_pieceMakes the next piece of the masks: one sprite direction of its parts or taur body read, one part's pixels read, one splat rasterised in one direction (on a part, in every direction), one direction's splats merged, one sprite worn over or under them read, or the icons. A taur body's pools go by next_taur_piece().
next_taur_pieceMakes the next piece of a taur body's pools, once its states are read (read_wanted_sprite()): what one direction of the taur canvas shows (dirt_taur_owners()), one splat's pools in one direction or the rider's mess they keep clear of (rasterise_taur()), one direction's pools merged, or the icons (taur_masks()).
parts_past_bodyReturns the chest's pixels in each direction with the pixels past the body of the parts drawn under the skin there added: alist(direction = indexes in row-major order).
rasterise_nextRasterises the next splat in the next direction it lacks, at its level there (dirt_part_body_level()), after taking the directions already rasterised at that level on this template from SSdirt.rasters, which cost no piece. Each direction rasterised goes in SSdirt.rasters.
rasterise_partRasterises one splat's field on a part's masks' part, in every direction.
rasterise_taurMakes the next splat's pools in the next direction it lacks, after taking the directions already made on this taur body and rider from SSdirt.rasters, which cost no piece. The rider's mess they keep clear of, the splat at its own level on the rider's cloth and skin, comes from SSdirt.rasters too, as the rider's own masks may have made it; each one made here is a piece of its own. What's made goes in SSdirt.rasters.
read_partReads the pixels a part takes its share on in every direction (dirt_part_own()).
read_spriteAdds a sprite's pixels in every direction to what its kind covers.
read_wanted_spriteReads the next sprite direction the job's parts or taur body are read from that SSdirt.sprite_reads doesn't hold, so the pieces after find them all read: a horse taur draws six states and a part up to three, each read whole in four directions.
taur_masksReturns a taur body's pools as masks on the taur canvas: on skin, each layer's kept to the pixels it shows; on cloth, the whole canvas, which a taur suit's own pixels clip.
waitNotes a body that drew without the masks while this waits, to draw it again once they're made. A body being deleted isn't drawn again.
wanted_readsReturns the sprite directions the request's parts or taur body are read from, each list(sheet, state, direction, width): every state of each in every direction.

Var Details

key

The request's mask_key().

masks

What it made.

merged

alist(direction = /datum/dirt_pixels): each direction's splats merged.

next_part

The next part to read.

next_read

The next of them to look for in SSdirt.sprite_reads.

next_splat

The next splat to rasterise.

next_sprite

The next sprite to read.

part_owns

alist(direction = alist(/datum/dirt_part_source = its pixels there, from dirt_part_own())).

parts

The request's read_parts().

request

What it makes.

splat_rasters

Each splat's rasters in the request's order, each alist(direction = /datum/dirt_pixels/proc/drawn() of it). For a part, alist(direction = /datum/dirt_pixels).

sprite_pixels

What the sprites read cover: alist("cover", "clip" or "cut" = alist(direction = list of TRUE or null per pixel)).

sprites

The request's read_sprites(), read one a piece.

started

Whether its first piece has found its template and set it up.

taur_owners

For a taur body's pools: alist(direction = what each pixel of the taur canvas shows, from dirt_taur_owners()).

template

The template, once its turn comes.

template_source

Where its template comes from, from SSdirt.template_for(): the template, the job building it, or FALSE. Null for a part's masks that need none.

waiters

Weak references to the bodies that drew without the masks while this waited -> DIRT_REDRAW_* flags.

wanted_sprites

The sprite directions its parts or taur body are read from, each list(sheet, state, direction, width), from wanted_reads().

Proc Details

New

Arguments:

canvas_masks

Returns the masks for cloth or a part: baked from canvas_runs().

canvas_runs

Returns cloth's or a part's runs, once its pieces are made (dirt_shown_runs()): the whole canvas, which the garment's own pixels clip, or on underclothes only the pixels they show.

finished

Caches the masks, or FALSE when they failed, and notes the bodies that waited for them to be drawn again.

held_template

Returns the template it's drawn on once that's built, or null.

limb_masks

Returns the masks for skin: each limb's baked from its runs (limb_runs()).

limb_runs

Returns skin's runs, once its pieces are made: alist(limb zone = dirt_shown_runs()), for each limb they draw on, each clipped to the pixels its image shows, so nothing floats in the margin past the body, and each limb's overlay draws only on its own limb. The chest's also takes the pixels past the body of the parts drawn under the skin there (a butt in profile), which carry their share in the skin's mess: they're drawn with the chest.

merge

Merges one direction's splats into one mask, the thickest winning each pixel, with the parts drawn under and over the surface (dirt_merge_with_parts()).

Arguments:

most_pieces

A piece a sprite direction of its parts or taur body read, then a piece a part read, four rasters a splat, a piece that finds only cached splats left, four merges, a piece a sprite read and the icons. A taur body's after its reads: four canvas reads, three pieces a splat in each direction (the rider's mess on cloth and on skin, then the pools), a piece that finds only cached splats left, four merges and the icons.

next_piece

Makes the next piece of the masks: one sprite direction of its parts or taur body read, one part's pixels read, one splat rasterised in one direction (on a part, in every direction), one direction's splats merged, one sprite worn over or under them read, or the icons. A taur body's pools go by next_taur_piece().

Returns:

next_taur_piece

Makes the next piece of a taur body's pools, once its states are read (read_wanted_sprite()): what one direction of the taur canvas shows (dirt_taur_owners()), one splat's pools in one direction or the rider's mess they keep clear of (rasterise_taur()), one direction's pools merged, or the icons (taur_masks()).

Returns:

parts_past_body

Returns the chest's pixels in each direction with the pixels past the body of the parts drawn under the skin there added: alist(direction = indexes in row-major order).

Arguments:

rasterise_next

Rasterises the next splat in the next direction it lacks, at its level there (dirt_part_body_level()), after taking the directions already rasterised at that level on this template from SSdirt.rasters, which cost no piece. Each direction rasterised goes in SSdirt.rasters.

rasterise_part

Rasterises one splat's field on a part's masks' part, in every direction.

Arguments:

rasterise_taur

Makes the next splat's pools in the next direction it lacks, after taking the directions already made on this taur body and rider from SSdirt.rasters, which cost no piece. The rider's mess they keep clear of, the splat at its own level on the rider's cloth and skin, comes from SSdirt.rasters too, as the rider's own masks may have made it; each one made here is a piece of its own. What's made goes in SSdirt.rasters.

read_part

Reads the pixels a part takes its share on in every direction (dirt_part_own()).

Arguments:

read_sprite

Adds a sprite's pixels in every direction to what its kind covers.

Arguments:

read_wanted_sprite

Reads the next sprite direction the job's parts or taur body are read from that SSdirt.sprite_reads doesn't hold, so the pieces after find them all read: a horse taur draws six states and a part up to three, each read whole in four directions.

Returns whether it read one.

taur_masks

Returns a taur body's pools as masks on the taur canvas: on skin, each layer's kept to the pixels it shows; on cloth, the whole canvas, which a taur suit's own pixels clip.

wait

Notes a body that drew without the masks while this waits, to draw it again once they're made. A body being deleted isn't drawn again.

Arguments:

wanted_reads

Returns the sprite directions the request's parts or taur body are read from, each list(sheet, state, direction, width): every state of each in every direction.