/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
color_sourceWhere does this organ inherit it's color from?
dna_blockWith what DNA block do we mutate in mutate_feature() ? For genetics
draw_colorThe color this organ draws with. Updated by bodypart/inherit_color()
external_bodytypesDoes this organ have any bodytypes to pass to it's ownerlimb?
feature_keyDefines what kind of 'organ' we're looking at. Sprites have names like 'm_mothwings_firemoth'. 'mothwings' would then be feature_key
layersSometimes we need multiple layers, for like the back, middle and front of the person
ownerlimbReference to the limb we're inside of
preferenceThe savefile_key of the preference this relates to. Used for the preferences UI.
render_keySimilar to feature key, but overrides it in the case you need more fine control over the iconstate, like with Tails.
sprite_datumSprite datum we use to draw on the bodypart
stored_feature_idStores the dna.features[feature_key], used for external organs that can be surgically removed or inserted.
use_mob_sprite_as_obj_spriteSet to TRUE to use the mob sprite as item sprite

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
inherit_colorGive the organ it's color. Force will override the existing one.
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
override_colorColorizes the limb it's inserted to, if required.
set_spriteAlso give the icon to the obj
transfer_to_limbTransfers the organ to the limb, and to the limb's owner, if it has one.

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

color_source

Where does this organ inherit it's color from?

dna_block

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

draw_color

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

external_bodytypes

Does this organ have any bodytypes to pass to it's ownerlimb?

feature_key

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

layers

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

ownerlimb

Reference to the limb we're inside of

preference

The savefile_key of the preference this relates to. Used for the preferences UI.

render_key

Similar to feature key, but overrides it in the case you need more fine control over the iconstate, like with Tails.

sprite_datum

Sprite datum we use to draw on the bodypart

stored_feature_id

Stores the dna.features[feature_key], used for external organs that can be surgically removed or inserted.

use_mob_sprite_as_obj_sprite

Set to TRUE to use the mob sprite as item sprite

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

inherit_color

Give the organ it's color. Force will override the existing one.

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

override_color

Colorizes the limb it's inserted to, if required.

set_sprite

Also give the icon to the obj

transfer_to_limb

Transfers the organ to the limb, and to the limb's owner, if it has one.