bodypart 
Vars | |
| applied_items | Lazylist of category to item applied to this limb |
|---|---|
| attack_type | Type of an attack from this limb does. Arms will do punches, Legs for kicks, and head for bites. (TO ADD: tactical chestbumps) |
| biological_state | A bitfield of biological states, exclusively used to determine which wounds this limb will get, as well as how easily it will happen. Set to BIO_STANDARD_UNJOINTED because most species have both flesh bone and blood in their limbs. |
| bleed_overlay_icon | If we're bleeding, which icon are we displaying on this part |
| body_part | bitflag used to check which clothes cover this bodypart |
| body_zone | BODY_ZONE_CHEST, BODY_ZONE_L_ARM, etc , used for def_zone |
| bodypart_disabled | Controls if the limb is disabled. TRUE means it is disabled (similar to being removed, but still present for the sake of targeted interactions). |
| bodypart_flags | Random flags that describe this bodypart |
| bodypart_overlays | A list of all bodypart overlays to draw |
| bodypart_pain_modifier | Modifier applied to pain that this part feels. |
| bodypart_trait_source | The name of the trait source that the organ gives. Should not be altered during the events of gameplay, and will cause problems if it is. |
| bodypart_traits | Traits that are given to the holder of the part. This does not update automatically on life(), only when the organs are initially generated or inserted! |
| bodyshape | A bitfield of bodyshapes for clothing and other sprite information |
| bodytype | A bitfield of bodytypes for surgery, and misc information |
| brute_dam | The current amount of brute damage the limb has |
| brute_modifier | Brute damage gets multiplied by this on receive_damage() |
| burn_dam | The current amount of burn damage the limb has |
| burn_modifier | Burn damage gets multiplied by this on receive_damage() |
| cached_bleed_rate | Our current bleed rate. Cached, update with refresh_bleed_rate() |
| can_be_disabled | Whether it is possible for the limb to be disabled whatsoever. TRUE means that it is possible. |
| change_exempt_flags | Defines when a bodypart should not be changed. Example: BP_BLOCK_CHANGE_SPECIES prevents the limb from being overwritten on species gain |
| damage_color | Color of the damage overlay |
| disabled_wound_penalty | When this bodypart hits max damage, this number is added to all wound rolls. Obviously only relevant for bodyparts that have damage caps. |
| disabling_threshold_percentage | Handles limb disabling by damage. If 0 (0%), a limb can't be disabled via damage. If 1 (100%), it is disabled at max limb damage. Anything between is the percentage of damage against maximum limb damage needed to disable the limb. |
| dismember_by_hp | If true, we will use [hp_percent_to_dismemberable] even if we are dismemberable via wounds. Useful for things with extreme wound resistance. |
| dmg_overlay_type | the type of damage overlay (if any) to use when this bodypart is bruised/burned. |
| draw_color | The actual color a limb is drawn as, set by /proc/update_limb() |
| embedded_objects | List of obj/item's embedded inside us. Managed by embedded components, do not modify directly |
| feature_offsets | List of the above datums which have actually been instantiated, managed automatically |
| generic_bleedstacks | How much generic bleedstacks we have on this bodypart |
| grappled_attack_verb | if we have a special attack verb for hitting someone who is grappled by us, it goes here. |
| grasped_by | If something is currently grasping this bodypart and trying to staunch bleeding (see /obj/item/hand_item/self_grasp) |
| held_index | are we a hand? if so, which one! |
| hp_percent_to_dismemberable | In the case we dont have dismemberable features, or literally cant get wounds, we will use this percent to determine when we can be dismembered. Compared to our ABSOLUTE maximum. Stored in decimal; 0.8 = 80%. |
| husk_color | The color to multiply the greyscaled husk sprites by. Can be null. Old husk sprite chest color is #A6A6A6 |
| husk_type | The type of husk for building an iconstate |
| icon_greyscale | The icon for Organic limbs using greyscale |
| icon_husk | The icon for husked limbs |
| icon_invisible | The icon for invisible limbs |
| icon_static | The icon for non-greyscale limbs |
| is_dimorphic | Is there a sprite difference between male and female? |
| is_emissive | If this limb should have emissive overlays |
| is_husked | Whether the bodypart (and the owner) is husked. |
| is_invisible | Whether the bodypart (and the owner) is invisible through invisibleman trait. |
| last_maxed | So we know if we need to scream if this limb hits max damage |
| last_received_pain_type | The last type of pain we received. Determines what type of pain we're recieving. |
| limb_id | The ID of a species used to generate the icon. Needs to match the icon_state portion in the limbs file! |
| max_damage | The maximum brute OR burn damage a bodypart can take. Once we hit this cap, no more damage of either type! |
| min_pain | The min amount of pain this limb can experience |
| owner | The mob that "owns" this limb DO NOT MODIFY DIRECTLY. Use update_owner() |
| pain | The amount of pain this limb is experiencing (A bit for default) |
| plaintext_zone | The body zone of this part in english ("chest", "left arm", etc) without the species attached to it |
| robotic_emp_paralyze_damage_percent_threshold | get_damage() / total_damage must surpass this to allow our limb to be disabled, even temporarily, by an EMP. |
| scarrable | If this limb can be scarred. |
| scars | The scars currently afflicting this body part |
| scars_covered_by_clothes | A hat won't cover your face, but a shirt covering your chest will cover your... you know, chest |
| should_draw_greyscale | Limbs need this information as a back-up incase they are generated outside of a carbon (limbgrower) |
| stump_typepath | Typepath of this limb as a stump |
| surgery_state | What state is the bodypart in for determining surgery availability |
| texture_bodypart_overlay | A potential texturing overlay to put on the limb |
| unarmed_attack_effect | what visual effect is used when this limb is used to strike someone. |
| unarmed_attack_sound | Sounds when this bodypart is used in an umarmed attack |
| unarmed_attack_verbs | the verbs used for an unarmed attack when using this limb, such as arm.unarmed_attack_verbs = list("punch") |
| unarmed_damage_high | Highest possible punch damage this bodypart can ive. |
| unarmed_damage_low | Lowest possible punch damage this bodypart can give. If this is set to 0, unarmed attacks will always miss. |
| unarmed_effectiveness | Determines the accuracy bonus, armor penetration and knockdown probability. |
| variable_color | An "override" color that can be applied to ANY limb, greyscale or not. |
| wound_damage_multiplier | Our current stored wound damage multiplier |
| wound_modifier | This number is a multiplier applied on incoming "effective damage" for wound calculations. |
| wound_resistance | This number is subtracted from all wound rolls on this bodypart, higher numbers mean more defense, negative means easier to wound |
| wounds | The wounds currently afflicting this body part |
Procs | |
| _embed_object | INTERNAL PROC, DO NOT USE Properly sets us up to manage an inserted embeded object |
| _unembed_object | INTERNAL PROC, DO NOT USE Cleans up any attachment we have to the embedded object, removes it from our list |
| add_biostate | Adds biostate to the limb and ensures surgical states are updated accordingly |
| add_bodypart_overlay | Add a bodypart overlay and call the appropriate update procs |
| add_bodypart_trait | Add a trait to the bodypart traits list, then applies the trait if necessary |
| add_surgical_state | Add one or multiple surgical states to the bodypart |
| adjust_bleed_stacks | Modifies our generic bleedstacks. You must use this to change the variable Takes the amount to adjust by, and the lowest amount we're allowed to have post adjust |
| apply_item | Inserts an item into the applied items list for this bodypart |
| apply_ownership | Apply ownership of a limb to someone, giving the appropriate traits, updates and signals |
| attempt_feature_restyle | Asks the external organs inside the limb if they can restyle |
| can_attach_limb | Checks if you can attach a limb, returns TRUE if you can. |
| can_be_grasped | If TRUE, the owner of this bodypart can try grabbing it to slow bleeding, as well as various other effects. |
| change_appearance | A multi-purpose setter for all things immediately important to the icon and iconstate of the limb. |
| change_appearance_into | Like change appearance, but passing it a bodypart will change the appearance to that of the bodypart. |
| check_for_frankenstein | Checks if a limb qualifies as a BODYPART_IMPLANTED |
| check_for_injuries | Called when a bodypart is checked for injuries. |
| check_wounding | check_wounding() is where we handle rolling for, selecting, and applying a wound if we meet the criteria |
| check_woundings_mods | check_wounding_mods() is where we handle the various modifiers of a wound roll |
| clear_ownership | Run all necessary procs to remove a limbs ownership and remove the appropriate signals and traits |
| dismember | Remove target limb from it's owner, with side effects. |
| drop_limb | limb removal. The "special" argument is used for swapping a limb with a new one without the effects of losing a limb kicking in. |
| forced_removal | In-case someone, somehow only teleports someones limb |
| generate_husk_key | Generates a cache key specifically for husks |
| generate_icon_key | Called from update_body_parts() these procs handle the limb icon cache. the limb icon cache adds an icon_render_key to a human mob, it represents: |
| get_bio_state_status | Returns a bitflag using ANATOMY_EXTERIOR or ANATOMY_INTERIOR. Used to determine if we as a whole have a interior or exterior biostate, or both. |
| get_bodypart_damage_state | Gets overlays to apply to the mob when damaged. |
| get_cache_key | Returns a string representing the bodyparts icon cache key |
| get_external_description | Returns the generic description of our BIO_EXTERNAL feature(s), prioritizing certain ones over others. Returns error on failure. |
| get_internal_description | Returns the generic description of our BIO_INTERNAL feature(s), prioritizing certain ones over others. Returns error on failure. |
| get_limb_icon | Generates an /image for the limb to be used as an overlay |
| get_mangled_state | get_mangled_state() is relevant for flesh and bone bodyparts, and returns whether this bodypart has mangled skin, mangled bone, or both (or neither i guess) |
| get_modified_pain | Gets our bodypart's effective pain (pain * pain modifiers). |
| get_soon_dismember_message | Returns what message is displayed when the bodypart is on the cusp of being dismembered. |
| get_splint_factor | Get how splinted this bodypart is based on applied items |
| get_surgery_examine | Returns surgery examine information for this bodypart |
| get_surgery_self_check | Returns surgery self-check information for this bodypart |
| get_wound_threshold_of_wound_type | A simple proc that gets the best wound to fit the criteria laid out, then returns its wound threshold. |
| get_wound_type | Get whatever wound of the given type is currently attached to this limb, if any |
| help_remove_gauze | Helper for someone helping to remove our gauze |
| in_dismemberable_state | Returns if our current mangling status allows us to be dismembered. Requires both no exterior/mangled exterior and no interior/mangled interior. Checks if the bodypart is in a state ready to be dismembered |
| on_adding | Called on addition of a bodypart |
| on_attempt_feature_restyle | Invoke async so we dont break signals |
| on_attempt_feature_restyle_mob | Someone used a restyling thingymajigga on our limb owner |
| on_gain_pain_effects | Effects on this bodypart has when pain is gained. |
| on_lose_pain_effects | Effects on this bodypart has when pain is lost and some time passes without any pain gain. |
| on_owner_nolimbdisable_trait_gain | Called when TRAIT_NOLIMBDISABLE is added to the owner. |
| on_owner_nolimbdisable_trait_loss | Called when TRAIT_NOLIMBDISABLE is removed from the owner. |
| on_paralysis_trait_gain | Called when TRAIT_PARALYSIS is added to the limb. |
| on_paralysis_trait_loss | Called when TRAIT_PARALYSIS is removed from the limb. |
| on_removal | Called on removal of a bodypart. |
| pain_feedback | Feedback messages from this limb when it is sustaining pain. |
| receive_damage | #receive_damage |
| refresh_bleed_rate | Refresh the cache of our rate of bleeding sans any modifiers ANYTHING ADDED TO THIS PROC NEEDS TO CALL IT WHEN IT'S EFFECT CHANGES |
| remove_biostate | Removes biostate from the limb and ensures surgical states are updated accordingly |
| remove_bodypart_overlay | Remove a bodypart overlay and call the appropriate update procs |
| remove_bodypart_trait | Remove a trait from the bodypart traits list, then removes the trait if necessary |
| remove_surgical_state | Remove one or multiple surgical states from the bodypart |
| replace_limb | Try to attach this bodypart to a mob, while replacing one if it exists, does nothing if it fails. Returns TRUE on success, FALSE on failure. |
| reset_appearance | Resets the base appearance of a limb to it's default values. |
| seep_gauze | Attempts to use up some of gauze applied If we use up all of the gauze, it is deleted |
| set_bleed_stacks | Sets our generic bleedstacks |
| set_brute_dam | Proc to hook behavior associated to the change of the brute_dam variable's value. |
| set_burn_dam | Proc to hook behavior associated to the change of the burn_dam variable's value. |
| set_can_be_disabled | Proc to change the value of the can_be_disabled variable and react to the event of its change. |
| set_disabled | Proc to change the value of the disabled variable and react to the event of its change. |
| set_initial_damage | Sets the damage of a bodypart when it is created. |
| try_attach_limb | Attach src to target mob if able, returns FALSE if it fails to. |
| try_dismember | try_dismember() is used, once we've confirmed that a flesh and bone bodypart has both the skin and bone mangled, to actually roll for it |
| update_bodypart_damage_state | Updates an organ's brute/burn states for use by update_damage_overlays(). Returns TRUE if state changed (IE, an update is needed) |
| update_owner | Proc to change the value of the owner variable and react to the event of its change. |
| update_surgical_state | Called when surgical state changes so we can react to it |
| update_wounds | update_wounds() is called whenever a wound is gained or lost on this bodypart, as well as if there's a change of some kind on a bone wound possibly changing disabled status |
Var Details
applied_items 
Lazylist of category to item applied to this limb
attack_type 
Type of an attack from this limb does. Arms will do punches, Legs for kicks, and head for bites. (TO ADD: tactical chestbumps)
biological_state 
A bitfield of biological states, exclusively used to determine which wounds this limb will get, as well as how easily it will happen. Set to BIO_STANDARD_UNJOINTED because most species have both flesh bone and blood in their limbs.
bleed_overlay_icon 
If we're bleeding, which icon are we displaying on this part
body_part 
bitflag used to check which clothes cover this bodypart
body_zone 
BODY_ZONE_CHEST, BODY_ZONE_L_ARM, etc , used for def_zone
bodypart_disabled 
Controls if the limb is disabled. TRUE means it is disabled (similar to being removed, but still present for the sake of targeted interactions).
bodypart_flags 
Random flags that describe this bodypart
bodypart_overlays 
A list of all bodypart overlays to draw
bodypart_pain_modifier 
Modifier applied to pain that this part feels.
Even if this is set to 0, pain is still tracked, it just won't have any per-limb effects.
bodypart_trait_source 
The name of the trait source that the organ gives. Should not be altered during the events of gameplay, and will cause problems if it is.
bodypart_traits 
Traits that are given to the holder of the part. This does not update automatically on life(), only when the organs are initially generated or inserted!
bodyshape 
A bitfield of bodyshapes for clothing and other sprite information
bodytype 
A bitfield of bodytypes for surgery, and misc information
brute_dam 
The current amount of brute damage the limb has
brute_modifier 
Brute damage gets multiplied by this on receive_damage()
burn_dam 
The current amount of burn damage the limb has
burn_modifier 
Burn damage gets multiplied by this on receive_damage()
cached_bleed_rate 
Our current bleed rate. Cached, update with refresh_bleed_rate()
can_be_disabled 
Whether it is possible for the limb to be disabled whatsoever. TRUE means that it is possible.
change_exempt_flags 
Defines when a bodypart should not be changed. Example: BP_BLOCK_CHANGE_SPECIES prevents the limb from being overwritten on species gain
damage_color 
Color of the damage overlay
disabled_wound_penalty 
When this bodypart hits max damage, this number is added to all wound rolls. Obviously only relevant for bodyparts that have damage caps.
disabling_threshold_percentage 
Handles limb disabling by damage. If 0 (0%), a limb can't be disabled via damage. If 1 (100%), it is disabled at max limb damage. Anything between is the percentage of damage against maximum limb damage needed to disable the limb.
dismember_by_hp 
If true, we will use [hp_percent_to_dismemberable] even if we are dismemberable via wounds. Useful for things with extreme wound resistance.
dmg_overlay_type 
the type of damage overlay (if any) to use when this bodypart is bruised/burned.
draw_color 
The actual color a limb is drawn as, set by /proc/update_limb()
embedded_objects 
List of obj/item's embedded inside us. Managed by embedded components, do not modify directly
feature_offsets 
List of the above datums which have actually been instantiated, managed automatically
generic_bleedstacks 
How much generic bleedstacks we have on this bodypart
grappled_attack_verb 
if we have a special attack verb for hitting someone who is grappled by us, it goes here.
grasped_by 
If something is currently grasping this bodypart and trying to staunch bleeding (see /obj/item/hand_item/self_grasp)
held_index 
are we a hand? if so, which one!
hp_percent_to_dismemberable 
In the case we dont have dismemberable features, or literally cant get wounds, we will use this percent to determine when we can be dismembered. Compared to our ABSOLUTE maximum. Stored in decimal; 0.8 = 80%.
husk_color 
The color to multiply the greyscaled husk sprites by. Can be null. Old husk sprite chest color is #A6A6A6
husk_type 
The type of husk for building an iconstate
icon_greyscale 
The icon for Organic limbs using greyscale
icon_husk 
The icon for husked limbs
icon_invisible 
The icon for invisible limbs
icon_static 
The icon for non-greyscale limbs
is_dimorphic 
Is there a sprite difference between male and female?
is_emissive 
If this limb should have emissive overlays
is_husked 
Whether the bodypart (and the owner) is husked.
is_invisible 
Whether the bodypart (and the owner) is invisible through invisibleman trait.
last_maxed 
So we know if we need to scream if this limb hits max damage
last_received_pain_type 
The last type of pain we received. Determines what type of pain we're recieving.
limb_id 
The ID of a species used to generate the icon. Needs to match the icon_state portion in the limbs file!
max_damage 
The maximum brute OR burn damage a bodypart can take. Once we hit this cap, no more damage of either type!
min_pain 
The min amount of pain this limb can experience
owner 
The mob that "owns" this limb DO NOT MODIFY DIRECTLY. Use update_owner()
pain 
The amount of pain this limb is experiencing (A bit for default)
plaintext_zone 
The body zone of this part in english ("chest", "left arm", etc) without the species attached to it
robotic_emp_paralyze_damage_percent_threshold 
get_damage() / total_damage must surpass this to allow our limb to be disabled, even temporarily, by an EMP.
scarrable 
If this limb can be scarred.
scars 
The scars currently afflicting this body part
scars_covered_by_clothes 
A hat won't cover your face, but a shirt covering your chest will cover your... you know, chest
should_draw_greyscale 
Limbs need this information as a back-up incase they are generated outside of a carbon (limbgrower)
stump_typepath 
Typepath of this limb as a stump
surgery_state 
What state is the bodypart in for determining surgery availability
texture_bodypart_overlay 
A potential texturing overlay to put on the limb
unarmed_attack_effect 
what visual effect is used when this limb is used to strike someone.
unarmed_attack_sound 
Sounds when this bodypart is used in an umarmed attack
unarmed_attack_verbs 
the verbs used for an unarmed attack when using this limb, such as arm.unarmed_attack_verbs = list("punch")
unarmed_damage_high 
Highest possible punch damage this bodypart can ive.
unarmed_damage_low 
Lowest possible punch damage this bodypart can give. If this is set to 0, unarmed attacks will always miss.
unarmed_effectiveness 
Determines the accuracy bonus, armor penetration and knockdown probability.
variable_color 
An "override" color that can be applied to ANY limb, greyscale or not.
wound_damage_multiplier 
Our current stored wound damage multiplier
wound_modifier 
This number is a multiplier applied on incoming "effective damage" for wound calculations.
wound_resistance 
This number is subtracted from all wound rolls on this bodypart, higher numbers mean more defense, negative means easier to wound
wounds 
The wounds currently afflicting this body part
Proc Details
_embed_object
INTERNAL PROC, DO NOT USE Properly sets us up to manage an inserted embeded object
_unembed_object
INTERNAL PROC, DO NOT USE Cleans up any attachment we have to the embedded object, removes it from our list
add_biostate
Adds biostate to the limb and ensures surgical states are updated accordingly
add_bodypart_overlay
Add a bodypart overlay and call the appropriate update procs
add_bodypart_trait
Add a trait to the bodypart traits list, then applies the trait if necessary
add_surgical_state
Add one or multiple surgical states to the bodypart
adjust_bleed_stacks
Modifies our generic bleedstacks. You must use this to change the variable Takes the amount to adjust by, and the lowest amount we're allowed to have post adjust
apply_item
Inserts an item into the applied items list for this bodypart
Note: Forcemoves the item to the bodypart's contents when called!
Arguments:
- applying_item - The item to apply
- category - The category of item being applied (e.g. LIMB_ITEM_GAUZE). If null, defaults to the REF of the applying_item
- override - If TRUE, will force the application of the item even if an item of the same category is already applied
Returns TRUE if the item was successfully applied Returns FALSE if the item was not applied (e.g. an item of the same category is already applied and override is FALSE)
apply_ownership
Apply ownership of a limb to someone, giving the appropriate traits, updates and signals
attempt_feature_restyle
Asks the external organs inside the limb if they can restyle
can_attach_limb
Checks if you can attach a limb, returns TRUE if you can.
can_be_grasped
If TRUE, the owner of this bodypart can try grabbing it to slow bleeding, as well as various other effects.
change_appearance
A multi-purpose setter for all things immediately important to the icon and iconstate of the limb.
change_appearance_into
Like change appearance, but passing it a bodypart will change the appearance to that of the bodypart.
check_for_frankenstein
Checks if a limb qualifies as a BODYPART_IMPLANTED
check_for_injuries
Called when a bodypart is checked for injuries.
check_wounding
check_wounding() is where we handle rolling for, selecting, and applying a wound if we meet the criteria
We generate a "score" for how woundable the attack was based on the damage and other factors discussed in /obj/item/bodypart/proc/check_woundings_mods, then go down the list from most severe to least severe wounds in that category. We can promote a wound from a lesser to a higher severity this way, but we give up if we have a wound of the given type and fail to roll a higher severity, so no sidegrades/downgrades
Arguments:
- woundtype- Either WOUND_BLUNT, WOUND_SLASH, WOUND_PIERCE, or WOUND_BURN based on the attack type.
- damage- How much damage is tied to this attack, since wounding potential scales with damage in an attack (see: WOUND_DAMAGE_EXPONENT)
- wound_bonus- The wound_bonus of an attack
- bare_wound_bonus- The bare_wound_bonus of an attack
check_woundings_mods
check_wounding_mods() is where we handle the various modifiers of a wound roll
A short list of things we consider: any armor a human target may be wearing, and if they have no wound armor on the limb, if we have a bare_wound_bonus to apply, plus the plain wound_bonus We also flick through all of the wounds we currently have on this limb and add their threshold penalties, so that having lots of bad wounds makes you more liable to get hurt worse Lastly, we add the inherent wound_resistance variable the bodypart has (heads and chests are slightly harder to wound), and a small bonus if the limb is already disabled
Arguments:
- It's the same ones on /obj/item/bodypart/proc/receive_damage
clear_ownership
Run all necessary procs to remove a limbs ownership and remove the appropriate signals and traits
dismember
Remove target limb from it's owner, with side effects.
drop_limb
limb removal. The "special" argument is used for swapping a limb with a new one without the effects of losing a limb kicking in.
forced_removal
In-case someone, somehow only teleports someones limb
generate_husk_key
Generates a cache key specifically for husks
generate_icon_key
Called from update_body_parts() these procs handle the limb icon cache. the limb icon cache adds an icon_render_key to a human mob, it represents:
- Gender, if applicable
- The ID of the limb
- Draw color, if applicable These procs only store limbs as to increase the number of matching icon_render_keys This cache exists because drawing 6/7 icons for humans constantly is quite a waste See RemieRichards on irc.rizon.net #coderbus (RIP remie :sob:)
get_bio_state_status
Returns a bitflag using ANATOMY_EXTERIOR or ANATOMY_INTERIOR. Used to determine if we as a whole have a interior or exterior biostate, or both.
get_bodypart_damage_state
Gets overlays to apply to the mob when damaged.
get_cache_key
Returns a string representing the bodyparts icon cache key
get_external_description
Returns the generic description of our BIO_EXTERNAL feature(s), prioritizing certain ones over others. Returns error on failure.
get_internal_description
Returns the generic description of our BIO_INTERNAL feature(s), prioritizing certain ones over others. Returns error on failure.
get_limb_icon
Generates an /image for the limb to be used as an overlay
get_mangled_state
get_mangled_state() is relevant for flesh and bone bodyparts, and returns whether this bodypart has mangled skin, mangled bone, or both (or neither i guess)
Dismemberment for flesh and bone requires the victim to have the skin on their bodypart destroyed (either a critical cut or piercing wound), and at least a hairline fracture (severe bone), at which point we can start rolling for dismembering. The attack must also deal at least 10 damage, and must be a brute attack of some kind (sorry for now, cakehat, maybe later)
Returns: BODYPART_MANGLED_NONE if we're fine, BODYPART_MANGLED_EXTERIOR if our skin is broken, BODYPART_MANGLED_INTERIOR if our bone is broken, or BODYPART_MANGLED_BOTH if both are broken and we're up for dismembering
get_modified_pain
Gets our bodypart's effective pain (pain * pain modifiers).
Returns our effective pain.
get_soon_dismember_message
Returns what message is displayed when the bodypart is on the cusp of being dismembered.
get_splint_factor
Get how splinted this bodypart is based on applied items
Multiplier applied to maluses, so lower = better
get_surgery_examine
Returns surgery examine information for this bodypart
get_surgery_self_check
Returns surgery self-check information for this bodypart
get_wound_threshold_of_wound_type
A simple proc that gets the best wound to fit the criteria laid out, then returns its wound threshold.
Args:
- wounding_type: The wounding_type, e.g. WOUND_BLUNT, WOUND_SLASH to force onto the mob. Can be a list of wounding_types.
- severity: The severity that will be considered.
- return_value_if_no_wound: If no wound is found, we will return this instead. (It is reccomended to use named args for this one, as its unclear what it is without)
- wound_source: The theoretical source of the wound. Nullable.
Returns: return_value_if_no_wound if no wound is found - if one IS found, the wound threshold for that wound.
get_wound_type
Get whatever wound of the given type is currently attached to this limb, if any
help_remove_gauze
Helper for someone helping to remove our gauze
in_dismemberable_state
Returns if our current mangling status allows us to be dismembered. Requires both no exterior/mangled exterior and no interior/mangled interior. Checks if the bodypart is in a state ready to be dismembered
Differs from can_dismember in that this says "we can be dismembered, just not right now"
on_adding
Called on addition of a bodypart
on_attempt_feature_restyle
Invoke async so we dont break signals
on_attempt_feature_restyle_mob
Someone used a restyling thingymajigga on our limb owner
on_gain_pain_effects
Effects on this bodypart has when pain is gained.
amount - amount of pain gained
on_lose_pain_effects
Effects on this bodypart has when pain is lost and some time passes without any pain gain.
amount - amount of pain lost
on_owner_nolimbdisable_trait_gain
Called when TRAIT_NOLIMBDISABLE is added to the owner.
on_owner_nolimbdisable_trait_loss
Called when TRAIT_NOLIMBDISABLE is removed from the owner.
on_paralysis_trait_gain
Called when TRAIT_PARALYSIS is added to the limb.
on_paralysis_trait_loss
Called when TRAIT_PARALYSIS is removed from the limb.
on_removal
Called on removal of a bodypart.
pain_feedback
Feedback messages from this limb when it is sustaining pain.
healing_pain - if TRUE, the bodypart has gone some time without recieving pain, and is healing.
receive_damage
#receive_damage
called when a bodypart is taking damage Damage will not exceed max_damage using this proc, and negative damage cannot be used to heal Returns TRUE if damage icon states changes
Args:
- brute - The amount of brute damage dealt.
- burn - The amount of burn damage dealt.
- blocked - The amount of damage blocked by armor.
- update_health - Whether to update the owner's health from receiving the hit.
- required_bodytype - A bodytype flag requirement to get this damage (ex: BODYTYPE_ORGANIC)
- wound_bonus - Additional bonus chance to get a wound.
- bare_wound_bonus - Additional bonus chance to get a wound if the bodypart is naked.
- sharpness - Flag on whether the attack is edged or pointy
- attack_direction - The direction the bodypart is attacked from, used to send blood flying in the opposite direction.
- damage_source - The source of damage, typically a weapon.
refresh_bleed_rate
Refresh the cache of our rate of bleeding sans any modifiers ANYTHING ADDED TO THIS PROC NEEDS TO CALL IT WHEN IT'S EFFECT CHANGES
remove_biostate
Removes biostate from the limb and ensures surgical states are updated accordingly
remove_bodypart_overlay
Remove a bodypart overlay and call the appropriate update procs
remove_bodypart_trait
Remove a trait from the bodypart traits list, then removes the trait if necessary
remove_surgical_state
Remove one or multiple surgical states from the bodypart
replace_limb
Try to attach this bodypart to a mob, while replacing one if it exists, does nothing if it fails. Returns TRUE on success, FALSE on failure.
reset_appearance
Resets the base appearance of a limb to it's default values.
seep_gauze
Attempts to use up some of gauze applied If we use up all of the gauze, it is deleted
Arguments:
- seep_amt - How much absorption capacity we're removing from our current bandages (think, how much blood or pus are we soaking up this tick?)
Return TRUE if we successfully used up some gauze Return FALSE if we had no gauze to use up
set_bleed_stacks
Sets our generic bleedstacks
set_brute_dam
Proc to hook behavior associated to the change of the brute_dam variable's value.
set_burn_dam
Proc to hook behavior associated to the change of the burn_dam variable's value.
set_can_be_disabled
Proc to change the value of the can_be_disabled variable and react to the event of its change.
set_disabled
Proc to change the value of the disabled variable and react to the event of its change.
set_initial_damage
Sets the damage of a bodypart when it is created.
try_attach_limb
Attach src to target mob if able, returns FALSE if it fails to.
try_dismember
try_dismember() is used, once we've confirmed that a flesh and bone bodypart has both the skin and bone mangled, to actually roll for it
Mangling is described in the above proc, /obj/item/bodypart/proc/get_mangled_state. This simply makes the roll for whether we actually dismember or not using how damaged the limb already is, and how much damage this blow was for. If we have a critical bone wound instead of just a severe, we add +10% to the roll. Lastly, we choose which kind of dismember we want based on the wounding type we hit with. Note we don't care about all the normal mods or armor for this
Arguments:
- wounding_type: Either WOUND_BLUNT, WOUND_SLASH, or WOUND_PIERCE, basically only matters for the dismember message
- wounding_dmg: The damage of the strike that prompted this roll, higher damage = higher chance
- wound_bonus: Not actually used right now, but maybe someday
- bare_wound_bonus: ditto above
update_bodypart_damage_state
Updates an organ's brute/burn states for use by update_damage_overlays(). Returns TRUE if state changed (IE, an update is needed)
update_owner
Proc to change the value of the owner variable and react to the event of its change.
update_surgical_state
Called when surgical state changes so we can react to it
update_wounds
update_wounds() is called whenever a wound is gained or lost on this bodypart, as well as if there's a change of some kind on a bone wound possibly changing disabled status
Covers tabulating the damage multipliers we have from wounds (burn specifically), as well as deleting our gauze wrapping if we don't have any wounds that can use bandaging
Arguments:
- replaced- If true, this is being called from the remove_wound() of a wound that's being replaced, so the bandage that already existed is still relevant, but the new wound hasn't been added yet