Shiptest 13 - Modules - TypesVar Details - Proc Details

bodypart

Vars

animal_originIf it's a nonhuman bodypart (e.g. monkey)
bleed_damage_minMinimum damage of an incoming attack for it to cause bleeding
bleed_damage_min_bluntMinimum damage of an incoming blunt attack for it to cause bleeding
bleed_thresholdThreshold at which the limb will start bleeding if damaged by sharp items or projectiles
bleed_threshold_bluntThreshold at which the limb will start bleeding if damaged by blunt items
bleedingCurrent limb bleeding, increased when the limb takes brute damage over certain thresholds, decreased through bandages and cauterization
body_damage_coeffMultiplier of the limb's damage that gets applied to the mob
body_partbitflag used to check which clothes cover this bodypart
bodypart_disabledIf disabled, limb is as good as missing.
bodytypeList of bodytypes flags, important for fitting clothing. If you'd like to know if a bodypart is organic, please use is_organic_limb()
bone_statusIs it fine, broken, splinted, or just straight up fucking gone
brute_reductionSubtracted from brute damage taken
burn_reductionSubtracted from burn damage taken
can_be_disabledControls whether bodypart_disabled makes sense or not for this limb.
cremation_progressGradually increases while burning when at full damage, destroys the limb when at 100
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.
dismemberableWhether it can be dismembered with a weapon
dmg_overlay_typethe type of damage overlay (if any) to use when this bodypart is bruised/burned.
draw_colorGreyscale draw color
held_indexAre we a hand? if so, which one!
is_dimorphicIs there a sprite difference between male and female?
is_huskedWhether the limb is husked
is_pseudopartFor limbs that don't really exist, eg chainsaws
last_maxedSo we know if we need to scream if this limb hits max damage
limb_genderDefines what sprite the limb should use if it is also sexually dimorphic.
limb_idThis is effectively the icon_state prefix for limbs.
overlay_icon_stateThe icon state of the limb's overlay, colored with a different color
plaintext_zoneThe body zone of this part in english ("chest", "left arm", etc) without the species attached to it
plantigrade_forcedWhether the clothing being worn forces the limb into being "squished" to plantigrade/standard humanoid compliance
should_draw_greyscaleLimbs need this information as a back-up incase they are generated outside of a carbon (limbgrower)
species_secondary_colorThe color of the limb's overlay
use_damage_colorShould we even use a color?
uses_mutcolorDoes this limb have a greyscale version?

Procs

adjust_bleedingAdjusts bodypart bleeding, value = amount of change, maximum = maximum current bloodloss amount this can modify
can_bandageChecks if the bodypart is viable for bandaging, if it isn't, tells the person trying (if present) what's stopping it
deconstructThis is the MEAT of limb icon code
fix_boneobj/item/bodypart/proc/break_bone_feedback()
generate_icon_keyCalled 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:
on_owner_easylimbwound_trait_gainCalled when TRAIT_EASYLIMBDISABLE is added to the owner.
on_owner_easylimbwound_trait_lossCalled when TRAIT_EASYLIMBDISABLE is removed from the owner.
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.
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.

Var Details

animal_origin

If it's a nonhuman bodypart (e.g. monkey)

bleed_damage_min

Minimum damage of an incoming attack for it to cause bleeding

bleed_damage_min_blunt

Minimum damage of an incoming blunt attack for it to cause bleeding

bleed_threshold

Threshold at which the limb will start bleeding if damaged by sharp items or projectiles

bleed_threshold_blunt

Threshold at which the limb will start bleeding if damaged by blunt items

bleeding

Current limb bleeding, increased when the limb takes brute damage over certain thresholds, decreased through bandages and cauterization

body_damage_coeff

Multiplier of the limb's damage that gets applied to the mob

body_part

bitflag used to check which clothes cover this bodypart

bodypart_disabled

If disabled, limb is as good as missing.

bodytype

List of bodytypes flags, important for fitting clothing. If you'd like to know if a bodypart is organic, please use is_organic_limb()

bone_status

Is it fine, broken, splinted, or just straight up fucking gone

brute_reduction

Subtracted from brute damage taken

burn_reduction

Subtracted from burn damage taken

can_be_disabled

Controls whether bodypart_disabled makes sense or not for this limb.

cremation_progress

Gradually increases while burning when at full damage, destroys the limb when at 100

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.

dismemberable

Whether it can be dismembered with a weapon

dmg_overlay_type

the type of damage overlay (if any) to use when this bodypart is bruised/burned.

draw_color

Greyscale draw color

held_index

Are we a hand? if so, which one!

is_dimorphic

Is there a sprite difference between male and female?

is_husked

Whether the limb is husked

is_pseudopart

For limbs that don't really exist, eg chainsaws

last_maxed

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

limb_gender

Defines what sprite the limb should use if it is also sexually dimorphic.

limb_id

This is effectively the icon_state prefix for limbs.

overlay_icon_state

The icon state of the limb's overlay, colored with a different color

plaintext_zone

The body zone of this part in english ("chest", "left arm", etc) without the species attached to it

plantigrade_forced

Whether the clothing being worn forces the limb into being "squished" to plantigrade/standard humanoid compliance

should_draw_greyscale

Limbs need this information as a back-up incase they are generated outside of a carbon (limbgrower)

species_secondary_color

The color of the limb's overlay

use_damage_color

Should we even use a color?

uses_mutcolor

Does this limb have a greyscale version?

Proc Details

adjust_bleeding

Adjusts bodypart bleeding, value = amount of change, maximum = maximum current bloodloss amount this can modify

can_bandage

Checks if the bodypart is viable for bandaging, if it isn't, tells the person trying (if present) what's stopping it

deconstruct

This is the MEAT of limb icon code

fix_bone

obj/item/bodypart/proc/break_bone_feedback()

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:

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

on_owner_easylimbwound_trait_gain

Called when TRAIT_EASYLIMBDISABLE is added to the owner.

on_owner_easylimbwound_trait_loss

Called when TRAIT_EASYLIMBDISABLE is removed from the 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.

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.