Yogstation 13 - Modules - TypesVar Details - Proc Details

limb

Vars

bandagedIf we have a bandage on (yoggite)
bodypart_disabledIf disabled, limb is as good as missing.
can_be_disabledControls whether bodypart_disabled makes sense or not for this limb.
current_gauzeIf we have a gauze wrapping currently applied (not including splints)
damage_colorThe colour of damage done to this bodypart
disable_thresholdMultiplied by max_damage it returns the threshold which defines a limb being disabled or not. From 0 to 1. 0 means no disable thru damage
disabled_wound_penaltyWhen this bodypart hits max damage, this number is added to all wound rolls. Obviously only relevant for bodyparts that have damage caps.
generic_bleedstacksHow much generic bleedstacks we have on this bodypart
grasped_byIf something is currently grasping this bodypart and trying to staunch bleeding (see /obj/item/grasp_self)
last_maxedSo we know if we need to scream if this limb hits max damage
limb_idThis is effectively the icon_state prefix for limbs.
limb_overridePrevents resetting of the species_id
scarsThe scars currently afflicting this body part
scars_covered_by_clothesA hat won't cover your face, but a shirt covering your chest will cover your... you know, chest
use_damage_colorShould we even use a color?
wound_damage_multiplierOur current stored wound damage multiplier
wound_resistanceThis number is subtracted from all wound rolls on this bodypart, higher numbers mean more defense, negative means easier to wound
woundsThe wounds currently afflicting this body part

Procs

apply_gauzeapply_gauze() is used to- well, apply gauze to a bodypart
check_woundingcheck_wounding() is where we handle rolling for, selecting, and applying a wound if we meet the criteria
check_wounding_modscheck_wounding_mods() is where we handle the various modifiers of a wound roll
drop_limblimb removal. The "special" argument is used for swapping a limb with a new one without the effects of losing a limb kicking in.
get_mangled_stateget_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_organssince organs aren't actually stored in the bodypart themselves while attached to a person, we have to query the owner for what we should have
get_wound_typeGet whatever wound of the given type is currently attached to this limb, if any
on_owner_nolimbdisable_trait_gainCalled when TRAIT_NOLIMBDISABLE is added to the owner.
on_owner_nolimbdisable_trait_lossCalled when TRAIT_NOLIMBDISABLE is removed from the owner.
on_paralysis_trait_gainCalled when TRAIT_PARALYSIS is added to the limb.
on_paralysis_trait_lossCalled when TRAIT_PARALYSIS is removed from the limb.
painless_wound_rollAllows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds
seep_gauzeseep_gauze() is for when a gauze wrapping absorbs blood or pus from wounds, lowering its absorption capacity.
set_brute_damProc to hook behavior associated to the change of the brute_dam variable's value.
set_burn_damProc to hook behavior associated to the change of the burn_dam variable's value.
set_can_be_disabledProc to change the value of the can_be_disabled variable and react to the event of its change.
set_disabledProc to change the value of the disabled variable and react to the event of its change.
set_ownerProc to change the value of the owner variable and react to the event of its change.
set_stamina_damProc to hook behavior associated to the change of the stamina_dam variable's value.
try_dismembertry_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_woundsupdate_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

bandaged

If we have a bandage on (yoggite)

bodypart_disabled

If disabled, limb is as good as missing.

can_be_disabled

Controls whether bodypart_disabled makes sense or not for this limb.

current_gauze

If we have a gauze wrapping currently applied (not including splints)

damage_color

The colour of damage done to this bodypart

disable_threshold

Multiplied by max_damage it returns the threshold which defines a limb being disabled or not. From 0 to 1. 0 means no disable thru damage

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.

generic_bleedstacks

How much generic bleedstacks we have on this bodypart

grasped_by

If something is currently grasping this bodypart and trying to staunch bleeding (see /obj/item/grasp_self)

last_maxed

So we know if we need to scream if this limb hits max damage

limb_id

This is effectively the icon_state prefix for limbs.

limb_override

Prevents resetting of the species_id

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

use_damage_color

Should we even use a color?

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

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:

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_wounding_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:

check_wounding_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, any innate wound armour from their physiology, 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:

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.

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_FLESH if our skin is broken, BODYPART_MANGLED_BONE if our bone is broken, or BODYPART_MANGLED_BOTH if both are broken and we're up for dismembering

get_organs

since organs aren't actually stored in the bodypart themselves while attached to a person, we have to query the owner for what we should have

get_wound_type

Get whatever wound of the given type is currently attached to this limb, if any

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.

painless_wound_roll

Allows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds

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 fall off and we're left with nothing.

Arguments:

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_owner

Proc to change the value of the owner variable and react to the event of its change.

set_stamina_dam

Proc to hook behavior associated to the change of the stamina_dam variable's value.

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:

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: