organ ![code/modules/surgery/organs/_organ.dm 1](git.png)
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_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 |
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 ![code/modules/surgery/organs/_organ.dm 11](git.png)
The cached info about the blood this organ belongs to
bodypart_overlay ![code/modules/surgery/organs/external/_visual_organs.dm 8](git.png)
The overlay datum that actually draws stuff on the limb
bodypart_owner ![code/modules/surgery/organs/_organ.dm 9](git.png)
Reference to the limb we're inside of
damage ![code/modules/surgery/organs/_organ.dm 27](git.png)
Total damage this organ has sustained. Should only ever be modified by apply_organ_damage!
dna_block ![code/modules/surgery/organs/external/_visual_organs.dm 13](git.png)
With what DNA block do we mutate in mutate_feature() ? For genetics
external_bodyshapes ![code/modules/surgery/organs/external/_visual_organs.dm 22](git.png)
Does this organ have any bodyshapes to pass to its bodypart_owner?
external_bodytypes ![code/modules/surgery/organs/external/_visual_organs.dm 20](git.png)
Does this organ have any bodytypes to pass to its bodypart_owner?
failing_desc ![code/modules/surgery/organs/_organ.dm 68](git.png)
String displayed when the organ has decayed.
failure_time ![code/modules/surgery/organs/_organ.dm 57](git.png)
Time this organ has failed for
food_reagents ![code/modules/surgery/organs/_organ.dm 48](git.png)
Food reagents if the organ is edible
food_tastes ![code/modules/surgery/organs/_organ.dm 52](git.png)
Overrides tastes if the organ is edible
foodtype_flags ![code/modules/surgery/organs/_organ.dm 50](git.png)
Foodtypes if the organ is edible
healing_factor ![code/modules/surgery/organs/_organ.dm 29](git.png)
Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick
maxHealth ![code/modules/surgery/organs/_organ.dm 22](git.png)
Maximum damage the organ can take, ever.
organ_effects ![code/modules/surgery/organs/_organ.dm 66](git.png)
Status Effects that are given to the holder of the organ.
organ_flags ![code/modules/surgery/organs/_organ.dm 20](git.png)
Random flags that describe this organ
organ_traits ![code/modules/surgery/organs/_organ.dm 64](git.png)
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 ![code/modules/surgery/organs/_organ.dm 7](git.png)
The mob that owns this organ.
preference ![code/modules/surgery/organs/external/_visual_organs.dm 11](git.png)
The savefile_key of the preference this relates to. Used for the preferences UI.
reagent_vol ![code/modules/surgery/organs/_organ.dm 54](git.png)
The size of the reagent container if the organ is edible
restyle_flags ![code/modules/surgery/organs/external/_visual_organs.dm 25](git.png)
Which flags does a 'modification tool' need to have to restyle us, if it all possible (located in code/_DEFINES/mobs)
slot ![code/modules/surgery/organs/_organ.dm 18](git.png)
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 ![code/modules/surgery/organs/external/_visual_organs.dm 30](git.png)
If not null, overrides the appearance with this sprite accessory datum
use_mob_sprite_as_obj_sprite ![code/modules/surgery/organs/external/_visual_organs.dm 17](git.png)
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 ![code/modules/surgery/organs/_organ.dm 45](git.png)
When set to false, this can't be used in surgeries and such - Honestly a terrible variable.
visual ![code/modules/surgery/organs/_organ.dm 59](git.png)
Do we affect the appearance of our mob. Used to save time in preference code
zone ![code/modules/surgery/organs/_organ.dm 13](git.png)
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_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
-
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