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

organ

Vars

blood_dna_infoThe cached info about the blood this organ belongs to
bodypart_ownerReference to the limb we're inside of
damageTotal damage this organ has sustained. Should only ever be modified by apply_organ_damage!
failing_descString displayed when the organ has decayed.
failure_timeTime this organ has failed for
food_reagentsFood reagents 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.
reagent_volThe size of the reagent container if the organ is edible
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!
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.
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_status_textCalled by medical scanners to get a simple summary of how healthy the organ is. Returns an empty string if things are fine.
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_mob_insertCalled after the organ is inserted into a mob. Adds Traits, Actions, and Status Effects on the mob in which the organ is impanted. Override this proc to create unique side-effects for inserting your organ. Must be called by overrides.
on_mob_removeCalled after the organ is removed from a mob. Removes Traits, Actions, and Status Effects on the mob in which the organ was impanted. Override this proc to create unique side-effects for removing your organ. Must be called by overrides.
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

Var Details

blood_dna_info

The cached info about the blood this organ belongs to

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!

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

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.

reagent_vol

The size of the reagent container if the organ is edible

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!

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.

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_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.

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_mob_insert

Called after the organ is inserted into a mob. Adds Traits, Actions, and Status Effects on the mob in which the organ is impanted. Override this proc to create unique side-effects for inserting your organ. Must be called by overrides.

on_mob_remove

Called after the organ is removed from a mob. Removes Traits, Actions, and Status Effects on the mob in which the organ was impanted. Override this proc to create unique side-effects for removing your organ. Must be called by overrides.

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