bodypart
Vars | |
any_existing_wound_can_mangle_our_exterior | If false, no wound that can be applied to us can mangle our exterior. Used for determining if we should use [hp_percent_to_dismemberable] instead of normal dismemberment. |
---|---|
any_existing_wound_can_mangle_our_interior | If false, no wound that can be applied to us can mangle our interior. Used for determining if we should use [hp_percent_to_dismemberable] instead of normal dismemberment. |
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_damage_coeff | A mutiplication of the burn and brute damage that the limb's stored damage contributes to its attached mob's overall wellbeing. |
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_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 |
color_overrides | An assoc list of priority (as a string because byond) -> color, used to override draw_color. |
cremation_progress | Gradually increases while burning when at full damage, destroys the limb when at 100 |
current_gauze | If we have a gauze wrapping currently applied (not including splints) |
damage_overlay_color | a color (optionally matrix) for the damage overlays to give the limb |
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. |
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_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 |
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! |
owner | The mob that "owns" this limb DO NOT MODIFY DIRECTLY. Use update_owner() |
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) |
speed_modifier | A speed modifier we apply to the owner when attached, if any. Positive numbers make it move slower, negative numbers make it move faster. |
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. |
use_alternate_dismemberment_calc_even_if_mangleable | If true, we will use [hp_percent_to_dismemberable] even if we are dismemberable via wounds. Useful for things with extreme wound resistance. |
wound_damage_multiplier | Our current stored wound damage multiplier |
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_bodypart_overlay | Add a bodypart overlay and call the appropriate update procs |
adjustBleedStacks | 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_gauze | apply_gauze() is used to- well, apply gauze to a 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. |
check_for_frankenstein | Checks if a limb qualifies as a BODYPART_IMPLANTED |
check_for_injuries | Called when a bodypart is checked for injuries. |
check_series_wounding_mods | Should return an assoc list of (wound_series -> penalty). Will be used in determining series-specific penalties for wounding. |
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 its owner, with side effects. |
dismemberable_by_total_damage | Returns TRUE if our total percent damage is more or equal to our dismemberable percentage, but FALSE if a wound can cause us to be dismembered. |
dismemberable_by_wound | Returns if our current mangling status allows us to be dismembered. Requires both no exterior/mangled exterior and no interior/mangled interior. |
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. |
emp_effect | The actual effect of EMPs on the limb. Allows children to override it however they want |
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_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_bleed_rate | Returns our bleed rate, taking into account laying down and grabbing the limb |
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 |
on_adding | Called on addition of a bodypart |
on_attempt_feature_restyle | Invoke async so we don't break signals |
on_attempt_feature_restyle_mob | Someone used a restyling thingymajigga on our limb owner |
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. |
painless_wound_roll | Allows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds |
receive_damage | #receive_damage |
recolor_bodypart_overlays | Loops through all of the bodypart's external organs and update's their color. |
refresh_bleed_rate | Refresh the cache of our rate of bleeding sans any modifiers ANYTHING ADDED TO THIS PROC NEEDS TO CALL IT WHEN ITS EFFECT CHANGES |
remove_bodypart_overlay | Remove a bodypart overlay and call the appropriate update procs |
replace_limb | Try to attach this bodypart to a mob, while replacing one if it exists, does nothing if it fails. |
reset_appearance | Resets the base appearance of a limb to it's default values. |
seep_gauze | seep_gauze() is for when a gauze wrapping absorbs blood or pus from wounds, lowering its absorption capacity. |
setBleedStacks | 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_owner | Proc to change the value of the owner variable and react to the event of its change. |
update_wound_theory | Updates our "can be theoretically dismembered by wounds" variables by iterating through all wound static data. |
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
any_existing_wound_can_mangle_our_exterior
If false, no wound that can be applied to us can mangle our exterior. Used for determining if we should use [hp_percent_to_dismemberable] instead of normal dismemberment.
any_existing_wound_can_mangle_our_interior
If false, no wound that can be applied to us can mangle our interior. Used for determining if we should use [hp_percent_to_dismemberable] instead of normal dismemberment.
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_damage_coeff
A mutiplication of the burn and brute damage that the limb's stored damage contributes to its attached mob's overall wellbeing.
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_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
color_overrides
An assoc list of priority (as a string because byond) -> color, used to override draw_color.
cremation_progress
Gradually increases while burning when at full damage, destroys the limb when at 100
current_gauze
If we have a gauze wrapping currently applied (not including splints)
damage_overlay_color
a color (optionally matrix) for the damage overlays to give the limb
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.
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_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
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!
owner
The mob that "owns" this limb DO NOT MODIFY DIRECTLY. Use update_owner()
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)
speed_modifier
A speed modifier we apply to the owner when attached, if any. Positive numbers make it move slower, negative numbers make it move faster.
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.
use_alternate_dismemberment_calc_even_if_mangleable
If true, we will use [hp_percent_to_dismemberable] even if we are dismemberable via wounds. Useful for things with extreme wound resistance.
wound_damage_multiplier
Our current stored wound damage multiplier
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_bodypart_overlay
Add a bodypart overlay and call the appropriate update procs
adjustBleedStacks
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_gauze
apply_gauze() is used to- well, apply gauze to a bodypart
As of the Wounds 2 PR, all bleeding is now bodypart based rather than the old bleedstacks system, and 90% of standard bleeding comes from flesh wounds (the exception is embedded weapons). The same way bleeding is totaled up by bodyparts, gauze now applies to all wounds on the same part. Thus, having a slash wound, a pierce wound, and a broken bone wound would have the gauze applying blood staunching to the first two wounds, while also acting as a sling for the third one. Once enough blood has been absorbed or all wounds with the ACCEPTS_GAUZE flag have been cleared, the gauze falls off.
Arguments:
- gauze- Just the gauze stack we're taking a sheet from to apply here
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.
check_for_frankenstein
Checks if a limb qualifies as a BODYPART_IMPLANTED
check_for_injuries
Called when a bodypart is checked for injuries.
Modifies the check_list list with the resulting report of the limb's status.
check_series_wounding_mods
Should return an assoc list of (wound_series -> penalty). Will be used in determining series-specific penalties for wounding.
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
- wound_clothing- If this should damage clothing.
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 its owner, with side effects.
dismemberable_by_total_damage
Returns TRUE if our total percent damage is more or equal to our dismemberable percentage, but FALSE if a wound can cause us to be dismembered.
dismemberable_by_wound
Returns if our current mangling status allows us to be dismembered. Requires both no exterior/mangled exterior and no interior/mangled interior.
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.
emp_effect
The actual effect of EMPs on the limb. Allows children to override it however they want
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_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_bleed_rate
Returns our bleed rate, taking into account laying down and grabbing the limb
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
on_adding
Called on addition of a bodypart
on_attempt_feature_restyle
Invoke async so we don't break signals
on_attempt_feature_restyle_mob
Someone used a restyling thingymajigga on our limb owner
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.
painless_wound_roll
Allows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds
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. wound_clothing - If this should damage clothing. 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.
recolor_bodypart_overlays
Loops through all of the bodypart's external organs and update's their color.
refresh_bleed_rate
Refresh the cache of our rate of bleeding sans any modifiers ANYTHING ADDED TO THIS PROC NEEDS TO CALL IT WHEN ITS EFFECT CHANGES
remove_bodypart_overlay
Remove a bodypart overlay and call the appropriate update procs
replace_limb
Try to attach this bodypart to a mob, while replacing one if it exists, does nothing if it fails.
reset_appearance
Resets the base appearance of a limb to it's default values.
seep_gauze
seep_gauze() is for when a gauze wrapping absorbs blood or pus from wounds, lowering its absorption capacity.
The passed amount of seepage is deducted from the bandage's absorption capacity, and if we reach a negative absorption capacity, the bandages falls off and we're left with nothing.
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?)
setBleedStacks
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_owner
Proc to change the value of the owner
variable and react to the event of its change.
update_wound_theory
Updates our "can be theoretically dismembered by wounds" variables by iterating through all wound static data.
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