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

external

System for drawing organs with overlays. These overlays are drawn directly on the bodypart, attached to a person or not Works in tandem with the /datum/sprite_accessory datum to generate sprites Unlike normal organs, we're actually inside a persons limbs at all times

Vars

all_layersConvert the bitflag define into the actual layer define
cache_keyKey of the icon states of all the sprite_datums for easy caching
dna_blockWith what DNA block do we mutate in mutate_feature() ? For genetics
layersSometimes we need multiple layers, for like the back, middle and front of the person
organ_flagsUnremovable is until the features are completely finished
ownerlimbReference to the limb we're inside of
preferenceDefines what kind of 'organ' we're looking at. Sprites have names like 'm_firemoth_mothwings'. 'mothwings' would then be preference
sprite_datumSprite datum we use to draw on the bodypart

Procs

Initializemob_sprite is optional if you havent set sprite_datums for the object, and is used mostly to generate sprite_datums from a persons DNA For _mob_sprite we make a distinction between "Round Snout" and "round". Round Snout is the name of the sprite datum, while "round" would be part of the sprite I'm sorry
bitflag_to_layerConverts a bitflag to the right layer. I'd love to make this a static index list, but byond made an attempt on my life when i did
can_draw_on_bodypartCheck whether we can draw the overlays. You generally don't want lizard snouts to draw over an EVA suit
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)
get_global_feature_listReturn a dumb glob list for this specific feature (called from parse_sprite)
get_overlaysAdd the overlays we need to draw on a person. Called from _bodyparts.dm
get_sprite_datumBecause all the preferences have names like "Beautiful Sharp Snout" we need to get the sprite datum with the actual important info
mutant_bodyparts_layertextThis exists so sprite accessories can still be per-layer without having to include that layer's number in their sprite name, which causes issues when those numbers change.
mutate_featureUpdate our features after something changed our appearance

Var Details

all_layers

Convert the bitflag define into the actual layer define

cache_key

Key of the icon states of all the sprite_datums for easy caching

dna_block

With what DNA block do we mutate in mutate_feature() ? For genetics

layers

Sometimes we need multiple layers, for like the back, middle and front of the person

organ_flags

Unremovable is until the features are completely finished

ownerlimb

Reference to the limb we're inside of

preference

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

sprite_datum

Sprite datum we use to draw on the bodypart

Proc Details

Initialize

mob_sprite is optional if you havent set sprite_datums for the object, and is used mostly to generate sprite_datums from a persons DNA For _mob_sprite we make a distinction between "Round Snout" and "round". Round Snout is the name of the sprite datum, while "round" would be part of the sprite I'm sorry

bitflag_to_layer

Converts a bitflag to the right layer. I'd love to make this a static index list, but byond made an attempt on my life when i did

can_draw_on_bodypart

Check whether we can draw the overlays. You generally don't want lizard snouts to draw over an EVA suit

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)

get_global_feature_list

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

get_overlays

Add the overlays we need to draw on a person. Called from _bodyparts.dm

get_sprite_datum

Because all the preferences have names like "Beautiful Sharp Snout" we need to get the sprite datum with the actual important info

mutant_bodyparts_layertext

This exists so sprite accessories can still be per-layer without having to include that layer's number in their sprite name, which causes issues when those numbers change.

mutate_feature

Update our features after something changed our appearance