/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

alphaAlpha value associated to the overlay, to be inherited from the parent limb.
cache_key_extra_informationAdditional information we might want to add to the cache_key, stored into a list. Should only ever contain strings.
color_sourceWhere does this organ inherit its color from?
draw_colorThe color this organ draws with. Updated by bodypart/inherit_color()
emissive_eligibility_by_color_indexAn associative list of color indexes (i.e. "1") to boolean that says whether or not that color should get an emissive overlay. Can be null.
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
last_built_icon_statesA simple cache of what the last icon_states built were. It's really only there to help with debugging what's happening.
modsuit_affectedWhether or not this overlay can be affected by MODsuit-related procs.
overlay_indexes_to_colorA simple list of indexes to color (as we don't want to color emissives, MOD overlays or inner ears)
sprite_datumSprite datum we use to draw on the bodypart

Procs

add_emissivesHelper proc to add the appropriate emissives to the overlays, based on the preferences.
build_emissive_eligibilityBuilds emissive_eligibility_by_layer from the input list of three booleans. Will not do anything if the given argument is null.
build_icon_stateHelper to generate the icon_state for the bodypart_overlay we're trying to draw.
color_imagesColors the given overlays list. Limb can be null. This is different from the base procs as it allows for multiple overlays to be colored at once. Useful for matrixed color mutant bodyparts.
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_color_layer_namesReturns the color_layer_names of the sprite_datum associated with our datum. Mainly here so that it can be overriden elsewhere to have other effects.
get_feature_key_for_overlayHelper to fetch the feature_key of the bodypart_overlay, so that it can be overriden in the cases where feature_key is not what we want to use here.
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_imagesGet the images we need to draw on the person. Called from get_overlay() which is called from _bodyparts.dm. limb can be null. This is different from the base procs as it allows for multiple overlays to be generated for one bodypart_overlay. Useful for matrixed color mutant bodyparts.
get_random_appearanceGrab a random appearance datum (thats not locked)
get_singular_imageHelper to generate one individual image for a multi-image overlay. Very similar to get_image(), just a little simplified.
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_dnaAllows us to set the appearance from data that's located within the provided DNA, for a little more control over what exactly is displayed.
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
set_modsuit_statusHelper to set the MOD-related info on the overlay, useful for MODsuit overlays.

Var Details

alpha

Alpha value associated to the overlay, to be inherited from the parent limb.

cache_key_extra_information

Additional information we might want to add to the cache_key, stored into a list. Should only ever contain strings.

color_source

Where does this organ inherit its color from?

draw_color

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

emissive_eligibility_by_color_index

An associative list of color indexes (i.e. "1") to boolean that says whether or not that color should get an emissive overlay. Can be null.

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

last_built_icon_states

A simple cache of what the last icon_states built were. It's really only there to help with debugging what's happening.

modsuit_affected

Whether or not this overlay can be affected by MODsuit-related procs.

overlay_indexes_to_color

A simple list of indexes to color (as we don't want to color emissives, MOD overlays or inner ears)

sprite_datum

Sprite datum we use to draw on the bodypart

Proc Details

add_emissives

Helper proc to add the appropriate emissives to the overlays, based on the preferences.

Arguments:

build_emissive_eligibility

Builds emissive_eligibility_by_layer from the input list of three booleans. Will not do anything if the given argument is null.

build_icon_state

Helper to generate the icon_state for the bodypart_overlay we're trying to draw.

Arguments:

color_images

Colors the given overlays list. Limb can be null. This is different from the base procs as it allows for multiple overlays to be colored at once. Useful for matrixed color mutant bodyparts.

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_color_layer_names

Returns the color_layer_names of the sprite_datum associated with our datum. Mainly here so that it can be overriden elsewhere to have other effects.

get_feature_key_for_overlay

Helper to fetch the feature_key of the bodypart_overlay, so that it can be overriden in the cases where feature_key is not what we want to use here.

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_images

Get the images we need to draw on the person. Called from get_overlay() which is called from _bodyparts.dm. limb can be null. This is different from the base procs as it allows for multiple overlays to be generated for one bodypart_overlay. Useful for matrixed color mutant bodyparts.

get_random_appearance

Grab a random appearance datum (thats not locked)

get_singular_image

Helper to generate one individual image for a multi-image overlay. Very similar to get_image(), just a little simplified.

Arguments:

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_dna

Allows us to set the appearance from data that's located within the provided DNA, for a little more control over what exactly is displayed.

Arguments:

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

set_modsuit_status

Helper to set the MOD-related info on the overlay, useful for MODsuit overlays.

Arguments: