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

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.

Vars

cached_keypart_key(), once built.
facing_layersalist(direction = layer_at() there), once worked out.
guideWhether it's the pecs guide: never drawn, and kept to where the chest shows.
heightPixels down the sheet.
iconThe sheet: an icon file, or an icon made at run time.
kindA DIRT_PART_* define.
organ_slotThe organ slot of the genital it's drawn for, or null for the guide.
state_layersThe layer each state draws at, in step with states, as get_overlay() works it out, custom layering included; or null where no layer is read (the guide, never drawn, lies under everything).
statesThe states drawn, every layer's colour layers together.
topmost_layertop_layer(), worked out with them.
widthPixels across the sheet.

Procs

NewArguments:
layer_atReturns the layer of the topmost image that shows the source in one direction: the least layer number of its states with pixels there (dirt_sprite_facings()). INFINITY when none has (the guide lies under everything). A butt shows its front image facing north and its back image, under the body's skin, the other ways. Worked out once for every direction.
layeredReturns whether the source's images draw at more than one layer, so what it draws over can change with direction.
part_keyReturns what the source draws, as text: sources with the same key take mess on the same pixels.
pixelsReturns the source's pixels in one direction, any opacity counting, every state's together, as indexes in row-major order (dirt_sprite_pixels()): none on a sheet that isn't 32x32. You should NEVER modify the list it returns.
read_layersWorks out layer_at() in every direction, and top_layer().
top_layerReturns the layer of the topmost image the source draws in any direction.
underReturns whether the source draws under a surface in one direction, as its topmost image there does (layer_at()), so its share is drawn in that surface's masks rather than on itself.

Var Details

cached_key

part_key(), once built.

facing_layers

alist(direction = layer_at() there), once worked out.

guide

Whether it's the pecs guide: never drawn, and kept to where the chest shows.

height

Pixels down the sheet.

icon

The sheet: an icon file, or an icon made at run time.

kind

A DIRT_PART_* define.

organ_slot

The organ slot of the genital it's drawn for, or null for the guide.

state_layers

The layer each state draws at, in step with states, as get_overlay() works it out, custom layering included; or null where no layer is read (the guide, never drawn, lies under everything).

states

The states drawn, every layer's colour layers together.

topmost_layer

top_layer(), worked out with them.

width

Pixels across the sheet.

Proc Details

New

Arguments:

layer_at

Returns the layer of the topmost image that shows the source in one direction: the least layer number of its states with pixels there (dirt_sprite_facings()). INFINITY when none has (the guide lies under everything). A butt shows its front image facing north and its back image, under the body's skin, the other ways. Worked out once for every direction.

Arguments:

layered

Returns whether the source's images draw at more than one layer, so what it draws over can change with direction.

part_key

Returns what the source draws, as text: sources with the same key take mess on the same pixels.

pixels

Returns the source's pixels in one direction, any opacity counting, every state's together, as indexes in row-major order (dirt_sprite_pixels()): none on a sheet that isn't 32x32. You should NEVER modify the list it returns.

Arguments:

read_layers

Works out layer_at() in every direction, and top_layer().

top_layer

Returns the layer of the topmost image the source draws in any direction.

under

Returns whether the source draws under a surface in one direction, as its topmost image there does (layer_at()), so its share is drawn in that surface's masks rather than on itself.

Arguments: