organ
Vars | |
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. |
Procs | |
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 |
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
- check_damage_thresholds
- input: mob/organ_owner (a mob, the owner of the organ we call the proc on)
- output: returns a message should get displayed.
- description: By checking our current damage against our previous damage, we can decide whether we've passed an organ threshold.
- If we have, send the corresponding threshold message to the owner, if such a message exists.
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_availability
-
returns whether the species should innately have this organ.
-
regenerate organs works with generic organs, so we need to get whether it can accept certain organs just by what this returns.
-
This is set to return true or false, depending on if a species has a trait that would nulify the purpose of the organ.
-
For example, lungs won't be given if you have NO_BREATH, stomachs check for NO_HUNGER, and livers check for NO_METABOLISM.
-
If you want a carbon to have a trait that normally blocks an organ but still want the organ. Attach the trait to the organ using the organ_traits var
-
Arguments:
-
owner_species - species, needed to return the mutant slot as true or false. stomach set to null means it shouldn't have one.
-
owner_mob - for more specific checks, like nightmares.
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
-
organ_failure
-
generic proc for handling dying organs
-
Arguments:
-
seconds_per_tick - seconds since last tick
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