/tg/ Station 13 - Modules - TypesVar Details - Proc Details

mutant

Variant of bodypart_overlay meant to work synchronously with external organs. Gets imprinted upon Insert in on_species_gain

Vars

color_sourceWhere does this organ inherit it's color from?
draw_colorThe color this organ draws with. Updated by bodypart/inherit_color()
feature_keyDefines what kind of 'organ' we're looking at. Sprites have names like 'm_mothwings_firemoth_ADJ'. 'mothwings' would then be feature_key
imprint_on_next_insertionTake on the dna/preference from whoever we're gonna be inserted in
sprite_datumSprite datum we use to draw on the bodypart

Procs

fetch_sprite_datumSprite accessories are singletons, stored list("Big Snout" = instance of /datum/sprite_accessory/snout/big), so here we get that singleton
fetch_sprite_datum_from_nameGet the singleton from the sprite name
generate_icon_cacheGenerate a unique key based on our sprites. So that if we've aleady drawn these sprites, they can be found in the cache and wont have to be drawn again (blessing and curse, but mostly curse)
get_base_icon_stateReturn the BASE icon state of the sprite datum (so not the gender, layer, feature_key)
get_global_feature_listReturn a dumb glob list for this specific feature (called from parse_sprite)
get_imageGet the image we need to draw on the person. Called from get_overlay() which is called from _bodyparts.dm. Limb can be null
get_random_appearanceGrab a random appearance datum (thats not locked)
inherit_colorGive the organ its color. Force will override the existing one.
randomize_appearanceCompletely random image and color generation (obeys what a player can choose from)
randomize_spriteGrab a random sprite
set_appearanceChange our accessory sprite, using the accesssory type. If you need to change the sprite for something, use simple_change_sprite()
set_appearance_from_nameIn a lot of cases, appearances are stored in DNA as the Name, instead of the path. Use set_appearance instead of possible

Var Details

color_source

Where does this organ inherit it's color from?

draw_color

The color this organ draws with. Updated by bodypart/inherit_color()

feature_key

Defines what kind of 'organ' we're looking at. Sprites have names like 'm_mothwings_firemoth_ADJ'. 'mothwings' would then be feature_key

imprint_on_next_insertion

Take on the dna/preference from whoever we're gonna be inserted in

sprite_datum

Sprite datum we use to draw on the bodypart

Proc Details

fetch_sprite_datum

Sprite accessories are singletons, stored list("Big Snout" = instance of /datum/sprite_accessory/snout/big), so here we get that singleton

fetch_sprite_datum_from_name

Get the singleton from the sprite name

generate_icon_cache

Generate a unique key based on our sprites. So that if we've aleady drawn these sprites, they can be found in the cache and wont have to be drawn again (blessing and curse, but mostly curse)

get_base_icon_state

Return the BASE icon state of the sprite datum (so not the gender, layer, feature_key)

get_global_feature_list

Return a dumb glob list for this specific feature (called from parse_sprite)

get_image

Get the image we need to draw on the person. Called from get_overlay() which is called from _bodyparts.dm. Limb can be null

get_random_appearance

Grab a random appearance datum (thats not locked)

inherit_color

Give the organ its color. Force will override the existing one.

randomize_appearance

Completely random image and color generation (obeys what a player can choose from)

randomize_sprite

Grab a random sprite

set_appearance

Change our accessory sprite, using the accesssory type. If you need to change the sprite for something, use simple_change_sprite()

set_appearance_from_name

In a lot of cases, appearances are stored in DNA as the Name, instead of the path. Use set_appearance instead of possible