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

modular_aphelion/modules/dirt/code/subsystem.dm

DIRT_MAX_FINISH_ROUNDSThe most rounds finish_all() goes: the bodies a round draws again can ask for masks, which the next round makes.
DIRT_TEMPLATE_CACHE_SIZEHow many templates SSdirt keeps built, besides SSdirt.human_template: about 220 KB each, so about 3.5 MB, and one a queued job holds lives until that job is done. One built again costs about 30 ms, spread over four fires.
DIRT_MASK_CACHE_SIZEHow many masks SSdirt keeps: 0.4-1.2 KB each with its place here, icons aside (measured; the most a skin set on four limbs), so about 0.3 MB. Masks dropped and made again reuse their cached rasters and icons' resource cache entries.
DIRT_RASTER_CACHE_SIZEHow many splats' rasters SSdirt keeps, each one text of under 400 characters under its key: 1.0-1.6 KB each as measured, scratch included, so under 3.3 MB. At about 200 players the live keys (about 6400) outnumber it, so an idle player's old splats are rasterised again when that body's masks are made again.
DIRT_SPRITE_READSHow many whole sprite directions dirt_sprite_pixels() keeps, the ones read most lately: about 1.1 KB each, so under 300 KB. Only SSdirt's pieces read them: a template up to 40, a body's masks a few dozen.
DIRT_SPRITE_FACINGSHow many sprites' facings dirt_sprite_facings() keeps, about 180 bytes each, so under 400 KB: the genital sheets hold about 1200 states parts are read from.
DIRT_RASTER_SEPARATORWhat a cached raster's directions are joined by: drawn() writes only "0" to "o" (ASCII 48 to 111).
/datum/dirt_jobWork SSdirt does a piece at a time (next_piece()), each piece in its own try/catch (make_piece()), so a piece that runtimes drops its job, cached as failed, and can't hold up the jobs after it.
/var/SSdirtMakes the masks mess is drawn with, a piece at a time, in the tick time other subsystems leave over, and keeps the newest of them.
/datum/dirt_template_job/metricThe plain human template dirt_metric() is measured from and underclothes coverage is judged on, built facing south, north and east and kept as SSdirt.human_template.
/datum/bulge_bounded_cache/dirt_recentKeeps the entries asked for most lately: one asked for again goes to the back of the line, so what's most in play stays.
/datum/bulge_bounded_cache/dirt_recent/templatesKeeps the DIRT_TEMPLATE_CACHE_SIZE templates asked for most lately, so the bodies most in play keep theirs.
/datum/bulge_bounded_cache/dirt_recent/sprite_readsKeeps the DIRT_SPRITE_READS sprite directions read most lately: the sprites of the bodies and clothes most in play.
/datum/bulge_bounded_cache/dirt_facingsKeeps the newest DIRT_SPRITE_FACINGS sprites' facings.
/datum/bulge_bounded_cache/dirt_masksKeeps the newest DIRT_MASK_CACHE_SIZE masks.
/datum/bulge_bounded_cache/dirt_rastersKeeps the newest DIRT_RASTER_CACHE_SIZE splats' rasters, each one text: its drawn() in each direction, in dirt_mask_directions() order, joined by DIRT_RASTER_SEPARATOR, empty where it isn't rasterised yet.

Define Details

DIRT_MASK_CACHE_SIZE

How many masks SSdirt keeps: 0.4-1.2 KB each with its place here, icons aside (measured; the most a skin set on four limbs), so about 0.3 MB. Masks dropped and made again reuse their cached rasters and icons' resource cache entries.

DIRT_MAX_FINISH_ROUNDS

The most rounds finish_all() goes: the bodies a round draws again can ask for masks, which the next round makes.

DIRT_RASTER_CACHE_SIZE

How many splats' rasters SSdirt keeps, each one text of under 400 characters under its key: 1.0-1.6 KB each as measured, scratch included, so under 3.3 MB. At about 200 players the live keys (about 6400) outnumber it, so an idle player's old splats are rasterised again when that body's masks are made again.

DIRT_RASTER_SEPARATOR

What a cached raster's directions are joined by: drawn() writes only "0" to "o" (ASCII 48 to 111).

DIRT_SPRITE_FACINGS

How many sprites' facings dirt_sprite_facings() keeps, about 180 bytes each, so under 400 KB: the genital sheets hold about 1200 states parts are read from.

DIRT_SPRITE_READS

How many whole sprite directions dirt_sprite_pixels() keeps, the ones read most lately: about 1.1 KB each, so under 300 KB. Only SSdirt's pieces read them: a template up to 40, a body's masks a few dozen.

DIRT_TEMPLATE_CACHE_SIZE

How many templates SSdirt keeps built, besides SSdirt.human_template: about 220 KB each, so about 3.5 MB, and one a queued job holds lives until that job is done. One built again costs about 30 ms, spread over four fires.