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

organ

Vars

blood_dna_infoThe cached info about the blood this organ belongs to
bodypart_overlayThe overlay datum that actually draws stuff on the limb
bodypart_ownerReference to the limb we're inside of
damageTotal damage this organ has sustained. Should only ever be modified by apply_organ_damage!
dna_blockWith what DNA block do we mutate in mutate_feature() ? For genetics
external_bodyshapesDoes this organ have any bodyshapes to pass to its bodypart_owner?
external_bodytypesDoes this organ have any bodytypes to pass to its bodypart_owner?
failing_descString displayed when the organ has decayed.
failure_timeTime this organ has failed for
food_reagentsFood reagents if the organ is edible
food_tastesOverrides tastes if the organ is edible
foodtype_flagsFoodtypes if the organ is edible
healing_factorHealing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick
maxHealthMaximum damage the organ can take, ever.
organ_effectsStatus Effects that are given to the holder of the organ.
organ_flagsRandom flags that describe this organ
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.
preferenceThe savefile_key of the preference this relates to. Used for the preferences UI.
reagent_volThe size of the reagent container if the organ is edible
restyle_flagsWhich flags does a 'modification tool' need to have to restyle us, if it all possible (located in code/_DEFINES/mobs)
slotThe organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc) Do NOT add slots with matching names to different zones - it will break the organs_slot list!
sprite_accessory_overrideIf not null, overrides the appearance with this sprite accessory datum
use_mob_sprite_as_obj_spriteSet to EXTERNAL_BEHIND, EXTERNAL_FRONT or EXTERNAL_ADJACENT if you want to draw one of those layers as the object sprite. FALSE to use your own This will not work if it doesn't have a limb to generate its icon with
useableWhen set to false, this can't be used in surgeries and such - Honestly a terrible variable.
visualDo we affect the appearance of our mob. Used to save time in preference code
zoneThe body zone this organ is supposed to inhabit.

Procs

add_organ_statusAdd a Status Effect to an organ that it will give its owner.
add_organ_traitAdd a Trait to an organ that it will give its owner.
apply_organ_damageAdjusts an organ's damage by the amount "damage_amount", up to a maximum amount, which is by default max damage. Returns the net change in organ damage.
attempt_feature_restyleRestyles the external organ from a list of valid options
before_organ_replacementCalled before organs are replaced in regenerate_organs with new ones
bodypart_insertInsert an organ into a limb, assume the limb as always detached and include no owner operations here (except the get_bodypart helper here I guess) Give EITHER a limb OR a limb owner
bodypart_removeCalled to remove an organ from a limb. Do not put any mob operations here (except the bodypart_getter at the start) Give EITHER a limb OR a limb_owner
check_damage_thresholds
exit_wardrobeUsed as callbacks by object pooling
forced_removalIn space station videogame, nothing is sacred. If somehow an organ is removed unexpectedly, handle it properly
get_availability
get_greyscale_color_from_draw_colorHere we define how draw_color from the bodypart overlay sets the greyscale colors of organs that use GAGS
get_status_appendixSimilar to get_status_text, but appends the text after the damage report, for additional status info
get_status_textCalled by medical scanners to get a simple summary of how healthy the organ is. Returns an empty string if things are fine.
get_valid_restylesHelper proc to fetch a list of styles a player might want to restyle their features into during the round : returns list("Cabbage" = /datum/sprite_accessory/cabbage)
handle_failing_organsOrgans don't die instantly, and neither should you when you get fucked up
mutate_featureUpdate our features after something changed our appearance
on_attempt_feature_restyleInvoke async so we don't break signals
on_bodypart_insertAdd any limb specific effects you might want here
on_bodypart_removeCalled on limb removal to remove limb specific limb effects or statusses
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
on_surgical_insertionProc that gets called when the organ is surgically inserted by someone. Seem familiar?
on_surgical_removalProc that gets called when the organ is surgically removed by someone, can be used for special effects
organ_failure
remove_organ_statusRemoves a Status Effect from an organ, and by extension, its owner.
remove_organ_traitRemoves a Trait from an organ, and by extension, its owner.
replace_intoTries to replace the existing organ on the passed mob with this one, with special handling for replacing a brain without ghosting target
set_organ_damageSETS 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
setup_bodypart_overlayaccessory_type is optional if you haven't 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
show_on_condensed_scansDetermines if this organ is shown when a user has condensed scans enabled
simple_change_spriteIf you need to change an external_organ for simple one-offs, use this. Pass the accessory type : /datum/accessory/something

Var Details

blood_dna_info

The cached info about the blood this organ belongs to

bodypart_overlay

The overlay datum that actually draws stuff on the limb

bodypart_owner

Reference to the limb we're inside of

damage

Total damage this organ has sustained. Should only ever be modified by apply_organ_damage!

dna_block

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

external_bodyshapes

Does this organ have any bodyshapes to pass to its bodypart_owner?

external_bodytypes

Does this organ have any bodytypes to pass to its bodypart_owner?

failing_desc

String displayed when the organ has decayed.

failure_time

Time this organ has failed for

food_reagents

Food reagents if the organ is edible

food_tastes

Overrides tastes if the organ is edible

foodtype_flags

Foodtypes if the organ is edible

healing_factor

Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick

maxHealth

Maximum damage the organ can take, ever.

organ_effects

Status Effects that are given to the holder of the organ.

organ_flags

Random flags that describe this organ

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.

preference

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

reagent_vol

The size of the reagent container if the organ is edible

restyle_flags

Which flags does a 'modification tool' need to have to restyle us, if it all possible (located in code/_DEFINES/mobs)

slot

The organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc) Do NOT add slots with matching names to different zones - it will break the organs_slot list!

sprite_accessory_override

If not null, overrides the appearance with this sprite accessory datum

use_mob_sprite_as_obj_sprite

Set to EXTERNAL_BEHIND, EXTERNAL_FRONT or EXTERNAL_ADJACENT if you want to draw one of those layers as the object sprite. FALSE to use your own This will not work if it doesn't have a limb to generate its icon with

useable

When set to false, this can't be used in surgeries and such - Honestly a terrible variable.

visual

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

zone

The body zone this organ is supposed to inhabit.

Proc Details

add_organ_status

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

add_organ_trait

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

apply_organ_damage

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

attempt_feature_restyle

Restyles the external organ from a list of valid options

before_organ_replacement

Called before organs are replaced in regenerate_organs with new ones

bodypart_insert

Insert an organ into a limb, assume the limb as always detached and include no owner operations here (except the get_bodypart helper here I guess) Give EITHER a limb OR a limb owner

bodypart_remove

Called to remove an organ from a limb. Do not put any mob operations here (except the bodypart_getter at the start) Give EITHER a limb OR a limb_owner

check_damage_thresholds

exit_wardrobe

Used as callbacks by object pooling

forced_removal

In space station videogame, nothing is sacred. If somehow an organ is removed unexpectedly, handle it properly

get_availability

get_greyscale_color_from_draw_color

Here we define how draw_color from the bodypart overlay sets the greyscale colors of organs that use GAGS

get_status_appendix

Similar to get_status_text, but appends the text after the damage report, for additional status info

get_status_text

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

get_valid_restyles

Helper proc to fetch a list of styles a player might want to restyle their features into during the round : returns list("Cabbage" = /datum/sprite_accessory/cabbage)

handle_failing_organs

Organs don't die instantly, and neither should you when you get fucked up

mutate_feature

Update our features after something changed our appearance

on_attempt_feature_restyle

Invoke async so we don't break signals

on_bodypart_insert

Add any limb specific effects you might want here

on_bodypart_remove

Called on limb removal to remove limb specific limb effects or statusses

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

on_surgical_insertion

Proc that gets called when the organ is surgically inserted by someone. Seem familiar?

on_surgical_removal

Proc that gets called when the organ is surgically removed by someone, can be used for special effects

organ_failure

remove_organ_status

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

remove_organ_trait

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

replace_into

Tries to replace the existing organ on the passed mob with this one, with special handling for replacing a brain without ghosting target

set_organ_damage

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

setup_bodypart_overlay

accessory_type is optional if you haven't 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

show_on_condensed_scans

Determines if this organ is shown when a user has condensed scans enabled

simple_change_sprite

If you need to change an external_organ for simple one-offs, use this. Pass the accessory type : /datum/accessory/something