Daedalus Dock - Modules - TypesVar Details - Proc Details

organ

Vars

color_sourceWhere does this organ inherit it's color from?
cosmetic_onlyIf the organ is cosmetic only, it loses all organ functionality.
damageTotal damage this organ has sustained Should only ever be modified by applyOrganDamage
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?
external_damage_modifierAmount of damage to take when taking damage from an external source
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
mutcolor_indexWhich index of the mutcolor key list to use. Defaults to 1, so MUTCOLORS_GENERIC_1 if mutcolor_used is MUTCOLORS_KEY_GENERIC
mutcolor_usedSee above
mutcolorsUsed by ORGAN_COLOR_INHERIT_ALL, allows full control of the owner's mutcolors
organ_traitsTraits that are given to the holder of the organ. If you want an effect that changes this, don't add directly to this. Use the add_organ_trait() proc
ownerThe mob that owns this organ.
ownerlimbReference to the limb we're inside of
preferenceThe savefile_key of the preference this relates to. Used for the preferences UI.
prev_damageOrgan variables for determining what we alert the owner with when they pass/clear the damage thresholds
reagent_volThe size of the reagent container
relative_sizeThe relative size of this organ, used for probability to hit.
render_keySimilar to feature key, but overrides it in the case you need more fine control over the iconstate, like with Tails.
severe_cooldowncooldown for severe effects, used for synthetic organ emp effects.
slotThe organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc)
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.
time_of_deathThe world.time of this organ's death
useableWhen you take a bite you cant jam it in for surgery anymore.
visualDo we effect the appearance of our mob. Used to save time in preference code
zoneThe body zone this organ is supposed to inhabit.

Procs

PreRevivalInsertionprocessing_organs must ALWAYS be ordered in the same way as organ_process_order Otherwise life processing breaks down
add_organ_traitAdd a trait to an organ that it will give its owner.
applyOrganDamageAdjusts an organ's damage by the amount "damage_amount", up to a maximum amount, which is by default max damage
attempt_vital_organ_revivalCalled by Insert() if the organ is vital and the target is dead.
before_organ_replacementCalled before organs are replaced in regenerate_organs with new ones
build_cache_keyGenerate 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)
build_overlaysBuild overlays
can_draw_on_bodypartCheck whether we can draw the overlays. You generally don't want lizard snouts to draw over an EVA suit
can_recoverCan this organ be revived from the dead?
check_damage_thresholds
check_failing_thresholdsChecks if an organ should/shouldn't be failing and gives the appropriate organ flag
cut_awayCut an organ away from it's container, but do not remove it from the container physically.
ex_actA little hack to ensure old behavior.
exit_wardrobeUsed as callbacks by object pooling
get_availability
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_scan_resultsCalled by medical scanners to get a simple summary of how healthy the organ is. Returns an empty string if things are fine.
inherit_colorGive the organ it's color. Force will override the existing one.
mutate_featureUpdate our features after something changed our appearance
on_deathThis is on_life() but for when the organ is dead or outside of a mob. Bad name.
on_lifeCalled once every life tick on every organ in a carbon's body NOTE: THIS IS VERY HOT. Be careful what you put in here To give you some scale, if there's 100 carbons in the game, they each have maybe 9 organs So that's 900 calls to this proc every life process. Please don't be dumb Return TRUE to call updatehealth(). Please only call inside of on_life() if it's important.
override_colorColorizes the limb it's inserted to, if required.
remove_organ_traitRemoves a trait from an organ, and by extension, its owner.
setOrganDamageSETS an organ's damage to the amount "damage_amount", and in doing so clears or sets the failing flag, good for when you have an effect that should fix an organ if broken
set_organ_deadSet or unset the organ as failing. Returns TRUE on success.
set_spriteSystem 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
surgically_fixUsed for the fix_organ surgery, lops off some of the maxHealth if the organ was very damaged.
update_organ_traitsUpdates the traits of the organ on the specific organ it is called on. Should be called anytime an organ is given a trait while it is already in a body.

Var Details

color_source

Where does this organ inherit it's color from?

cosmetic_only

If the organ is cosmetic only, it loses all organ functionality.

damage

Total damage this organ has sustained Should only ever be modified by applyOrganDamage

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?

external_damage_modifier

Amount of damage to take when taking damage from an external source

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

mutcolor_index

Which index of the mutcolor key list to use. Defaults to 1, so MUTCOLORS_GENERIC_1 if mutcolor_used is MUTCOLORS_KEY_GENERIC

mutcolor_used

See above

mutcolors

Used by ORGAN_COLOR_INHERIT_ALL, allows full control of the owner's mutcolors

organ_traits

Traits that are given to the holder of the organ. If you want an effect that changes this, don't add directly to this. Use the add_organ_trait() proc

owner

The mob that owns this organ.

ownerlimb

Reference to the limb we're inside of

preference

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

prev_damage

Organ variables for determining what we alert the owner with when they pass/clear the damage thresholds

reagent_vol

The size of the reagent container

relative_size

The relative size of this organ, used for probability to hit.

render_key

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

severe_cooldown

cooldown for severe effects, used for synthetic organ emp effects.

slot

The organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc)

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.

time_of_death

The world.time of this organ's death

useable

When you take a bite you cant jam it in for surgery anymore.

visual

Do we effect the appearance of our mob. Used to save time in preference code

zone

The body zone this organ is supposed to inhabit.

Proc Details

PreRevivalInsertion

processing_organs must ALWAYS be ordered in the same way as organ_process_order Otherwise life processing breaks down

add_organ_trait

Add a trait to an organ that it will give its owner.

applyOrganDamage

Adjusts an organ's damage by the amount "damage_amount", up to a maximum amount, which is by default max damage

attempt_vital_organ_revival

Called by Insert() if the organ is vital and the target is dead.

before_organ_replacement

Called before organs are replaced in regenerate_organs with new ones

build_cache_key

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)

build_overlays

Build overlays

can_draw_on_bodypart

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

can_recover

Can this organ be revived from the dead?

check_damage_thresholds

check_failing_thresholds

Checks if an organ should/shouldn't be failing and gives the appropriate organ flag

cut_away

Cut an organ away from it's container, but do not remove it from the container physically.

ex_act

A little hack to ensure old behavior.

exit_wardrobe

Used as callbacks by object pooling

get_availability

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_scan_results

Called by medical scanners to get a simple summary of how healthy the organ is. Returns an empty string if things are fine.

inherit_color

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

mutate_feature

Update our features after something changed our appearance

on_death

This is on_life() but for when the organ is dead or outside of a mob. Bad name.

on_life

Called once every life tick on every organ in a carbon's body NOTE: THIS IS VERY HOT. Be careful what you put in here To give you some scale, if there's 100 carbons in the game, they each have maybe 9 organs So that's 900 calls to this proc every life process. Please don't be dumb Return TRUE to call updatehealth(). Please only call inside of on_life() if it's important.

override_color

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

remove_organ_trait

Removes a trait from an organ, and by extension, its owner.

setOrganDamage

SETS an organ's damage to the amount "damage_amount", and in doing so clears or sets the failing flag, good for when you have an effect that should fix an organ if broken

set_organ_dead

Set or unset the organ as failing. Returns TRUE on success.

set_sprite

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

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

surgically_fix

Used for the fix_organ surgery, lops off some of the maxHealth if the organ was very damaged.

update_organ_traits

Updates the traits of the organ on the specific organ it is called on. Should be called anytime an organ is given a trait while it is already in a body.