organ

Vars | |
damage | Total damage this organ has sustained Should only ever be modified by applyOrganDamage |
---|---|
healing_factor | Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick |
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. |
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 |
slot | The organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc) |
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. |
Procs | |
add_organ_trait | Add a trait to an organ that it will give its owner. |
add_to_limb | Adds the organ to a bodypart, used in transfer_to_limb() |
applyOrganDamage | Adjusts an organ's damage by the amount "damage_amount", up to a maximum amount, which is by default max damage |
before_organ_replacement | Called before organs are replaced in regenerate_organs with new ones |
check_damage_thresholds | |
exit_wardrobe | Used as callbacks by object pooling |
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. |
organ_failure | |
remove_from_limb | Removes the organ from the limb, placing it into nullspace. |
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 |
transfer_to_limb | Transfers the organ to the limb, and to the limb's owner, if it has one. This is done on drop_limb(). |
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. |
Var Details
damage

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

Healing factor and decay factor function on % of maxhealth, and do not work by applying a static number per tick
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.
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
slot

The organ slot this organ is supposed to inhabit. This should be unique by type. (Lungs, Appendix, Stomach, etc)
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
add_organ_trait
Add a trait to an organ that it will give its owner.
add_to_limb
Adds the organ to a bodypart, used in transfer_to_limb()
applyOrganDamage
Adjusts an organ's damage by the amount "damage_amount", up to a maximum amount, which is by default max damage
before_organ_replacement
Called before organs are replaced in regenerate_organs with new ones
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
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_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.
organ_failure
-
organ_failure
-
generic proc for handling dying organs
-
Arguments:
-
delta_time - seconds since last tick
remove_from_limb
Removes the organ from the limb, placing it into nullspace.
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
transfer_to_limb
Transfers the organ to the limb, and to the limb's owner, if it has one. This is done on drop_limb().
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.