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. |
| 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) |
| augment_colors | A recolourable finish's colours, "#rrggbb" four times: paint, accent, frame, lights. Null on every other limb. A limb with them carries /datum/element/augment_paint, which draws its paint and glow and keys its icons by them. |
| aux_zone_markings | The same for its aux zone (hands). |
| base_meat_amount | How much meat do we add to butcher_drops when automatically generating them from our species datum? |
| bio_status | Does this part have an internal or external anatomy biostate? Assigned on init based on biological_state |
| 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 |
| blood_dna_info | The cached info about the blood this organ belongs to, set during on_removal() |
| 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_effects | Lazylist of /datum/status_effect/grouped/bodypart_effect types. Instances of this are applied to the carbon when added the limb is attached, and merged with similair limbs |
| bodypart_flags | Random flags that describe this bodypart |
| bodypart_overlays | A list of all bodypart overlays to draw |
| bodypart_textures | A list of all bodypart textures to apply |
| 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() |
| butcher_drop_cache | Init cache for our butcher drops for sanic speed |
| butcher_drops_override | Lazy assoc list of [item type] = [amount] that we drop when butchered. Overrides whatever we would drop normally based on our species datum. |
| butcher_replacement | What skeleton limb, if any, we replace ourselves with when butchered? |
| 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. |
| current_style | The bodypart's currently applied style's name. Only necessary for bodyparts that come in multiple variants, like prosthetics and cyborg bodyparts. |
| 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. |
| 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. |
| grappled_attack_verb_continuous | Continuous tense grapple verb for successful attacks |
| 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_actually_just_invisible | Used for taur limbs that do not get rendered at all |
| 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. |
| keeps_type_name | Set on our limbs whose types name them, which keep that name - tg names every other limb for its limb_id and zone, as "robotic left arm" |
| 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! |
| mangled_state | Mangling state (interior, exterior) of the bodypart |
| marking_key | The part of this limb's icon cache keys standing for the markings it draws, or null for none. See LIMB_MARKING_ICON_KEY. |
| marking_key_alpha | The markings_alpha marking_key was built with. |
| marking_key_aux_markings | The aux_zone_markings list marking_key was built from. |
| marking_key_digitigrade | Whether marking_key was built for a digitigrade limb. |
| marking_key_markings | The markings list marking_key was built from. |
| marking_key_revision | GLOB.body_marking_entry_revision when marking_key was built, -1 until it first is. |
| markings | The /datum/body_marking_entry list this limb draws on its body zone, or null for none. Normally the owner DNA collection's own list for that zone, shared with it and read-only: replace it by assigning another list, never edit it. A detached limb goes on drawing the list it last got. |
| markings_alpha | The alpha our markings are drawn at. A creating update_limb() sets it from the owner's species. |
| max_damage | The maximum brute OR burn damage a bodypart can take. Once we hit this cap, no more damage of either type! |
| muscle_definition | How defined a fitness limb's muscles are drawn, from 0, none, to MUSCLE_DEFINITION_MAX: an overlay on the limb, under its markings. Null until the limb is first set up for an owner (update_limb()'s is_creating), when it takes the definition in the owner's DNA, then kept wherever the limb goes. Only fitness limbs read it. |
| muscle_size | How big this limb's muscles are drawn, a MUSCLE_SIZE_* define: MUSCLE_SIZE_NORMAL is today's sprites. Fixed by its type: each size of a limb is its own subtype, below. Clothing and underwear fitting read it per limb, so each arm and leg can differ. |
| 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 |
| prefix | Set on our limbs whose limb_id does not read as words - tg's name starts with this instead, as "vox primalis left arm" for vox_primalis |
| 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) |
| species_id | ID of a species to use as an override for species-based biological logic, such as what species to pull the meat from, if our limb_id doesn't match |
| 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_attack_verbs_continuous | Continuous tense attack verbs for successful attacks |
| 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. |
| unarmed_grab_damage_bonus | If this limb is used to grab (which is only arms right now), how much additional damage does it deal to the grabbed individual when they fail to escape the grab? |
| unarmed_grab_escape_chance_bonus | If this limb is used to grab (which is only arms right now), how much more difficult is it to escape the grab, before accounting for grab state? Values above 0 is a malus, values below 0 is a bonus. This is less powerful than adjusting grab state. If the arm has both an increased grab level and a chance reduction, it is very hard to escape a grab. |
| unarmed_grab_state_bonus | If this limb is used to grab (which is only arms right now), how much more effective is the limb? Every integer above or below 0 is one effective grab level. Higher is a bonus, lower is a malus. This is more powerful than adjusting grab escape chance. If the arm has both an increased grab level and a chance reduction, it is very hard to escape a grab. |
| unarmed_pummeling_bonus | Multiplier applied to effectiveness and damage when attacking a grabbed target. |
| unarmed_sharpness | The 'sharpness' of the limb. Could indicate claws, teeth or spines. Should default to NONE, or blunt. |
| 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. |
| worn_offsets_species | The species whose worn offsets this limb carries, for a limb drawn in that species' shape whoever made it - see /datum/species/proc/add_worn_offsets |
| wound_damage_multiplier | Our current stored wound damage multiplier |
| wound_resistance | This number is added to the effective wound armor on this body part (as long as it isn't managled externally or internally), higher numbers mean more defense, negative means easier to wound |
| wounds | The wounds currently afflicting this body part |
| zombie_color | The color to multiply the zombie husk sprites by. |
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 | Adds a bodypart overlay to the limb |
| add_bodypart_texture | Adds a bodypart texture to the limb |
| add_bodypart_trait | Add a trait to the bodypart traits list, then applies the trait if necessary |
| add_bodyshape | Add a bodyshape to the bodypart, then synchronize with the owner if necessary |
| add_surgical_state | Add one or multiple surgical states to the bodypart |
| 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 |
| append_base_marking_overlays | Appends this limb's native base markings before height and body textures are applied. |
| apply_custom_marking | Puts a zone drawing on this limb as an overlay of overlay_type, replacing, updating or removing the one it has. |
| 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. |
| 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_augment_finish | Takes a recolourable finish off a limb, if it had one, with its element: its colours go, and its glow and its fit go back to its type's own. |
| clear_ownership | Run all necessary procs to remove a limbs ownership and remove the appropriate signals and traits |
| custom_sprite_icon_file | The icon file this limb draws from: its greyscale sheet when it should draw greyscale, else its static one. |
| dirt_sprite_reads | Returns what this limb's sprites are drawn from as mess reads them (drawn_sheet(), custom_sprite_limb_state()): the limb, then every var those read. A limb that still reads the same (dirt_sprite_unchanged()) draws the same sprites. |
| dirt_sprite_unchanged | Returns whether this limb's sprites are drawn from what they were when dirt_sprite_reads() read it. |
| 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. |
| draw_augment_paint | Draws a recolourable finish's paint and glow into the images get_limb_icon() made: for the limb's own image and its hand's, copies drawing the finish's _paint and _glow states through their colour matrices, added above everything the limb drew (its markings too, which the plates cover where they cover skin). Copies of the limb's images, they keep its layer, height, texture and facing; a leg's are split into the leg's two halves through the masked leg cache (handle_masking()), as draw_muscle_definition() splits definition. |
| draw_muscle_definition | Draws this limb's muscle definition into the images get_limb_icon() made: the definition overlay for the state the limb draws, its size and its step, right above the limb's own image, both halves of a leg's, and so under its markings and everything else on it. It's a copy of the limb's image drawing the overlay, so it's coloured, offset for height and textured as the limb is, and a husk's is toned as the limb is. |
| drawn_sheet | Returns the sheet this limb's own sprite is drawn from, as get_limb_icon() draws it, or null when it draws none of its own: a stump, an invisible limb, or a taur's legs, which its taur body stands in for. |
| drop_limb | Refits the worn clothing of a body a fitness arm, leg or chest above the Normal size comes off, whether lost or swapped for another limb. |
| emp_effect | The actual effect of EMPs on the limb. Allows children to override it however they want |
| fitness_sheet | Returns the sheet this limb draws in place of sheet: its muscle size's sheet when sheet has size sheets and that one
holds the state the limb draws, else sheet itself. Only asked for a limb above the Normal size. |
| forced_removal | In-case someone, somehow only teleports someones limb |
| generate_husk_key | Keys a husked limb by the markings it still draws: grey, but at their own alpha and with their own glow. |
| get_bodypart_damage_state | Gets overlays to apply to the mob when damaged. |
| get_butcher_drops | Returns a lazy assoc list of items dropped when the limb is butchered |
| get_cache_key | Returns a string representing the bodyparts icon cache key |
| get_custom_marking | This limb's custom marking overlay of exactly this type. Hand paint is a subtype of zone paint on the same arm. |
| 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_reported_surgery_state | Returns all surgical states, filtering out stuff which should not be reported |
| 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 |
| handle_masking | This proc serves as a way to ensure that legs layer properly on a mob. To do this, two separate images are created - A low layer one, and a normal layer one. Each of the image will appropriately crop out dirs that are not used on that given layer. |
| help_remove_gauze | Helper for someone helping to remove our gauze |
| huskify_image | Takes in an image and greyscales it to later be recolored to look like a husk |
| is_splinted | Returns TRUE if the limb is splinted with gauze or tape with an effective splint factor |
| is_woundable | Check if a bodypart can be wounded |
| marking_zone_key | Returns the string standing for the markings this limb draws on one zone, in order, with their colours and glow. |
| 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_clean | Called when limb's current owner gets washed |
| 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 | A limb leaving its body takes its private images with it, so a limb put in its place, even one drawn under the same key before the body is drawn again (a species change swaps them so), is drawn from its own sprites. |
| painless_wound_roll | Allows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds |
| paint_copy | Returns a copy of base, one of a limb's own images, drawing state from sheet in matrix, and with block_templates,
an emissive blocker for it: a copy of the limb's own blocker for base, so it sits on the emissive plane as that does. |
| rebuild_marking_icon_key | Builds the part of this limb's icon cache keys standing for the markings it draws, and stamps what it was built from. |
| 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 ITS EFFECT CHANGES |
| remove_biostate | Removes biostate from the limb and ensures surgical states are updated accordingly |
| remove_bodypart_overlay | Removes a bodypart overlay from the limb |
| remove_bodypart_texture | Removes a bodypart texture from the limb |
| remove_bodypart_trait | Remove a trait from the bodypart traits list, then removes the trait if necessary |
| remove_bodyshape | Remove a bodyshape from the bodypart, then synchronize with the owner 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 | seep_gauze() is for when a gauze wrapping absorbs blood or pus from wounds, lowering its absorption capacity. |
| setBleedStacks | Sets our generic bleedstacks |
| set_bio_state_status | Assigns our bio_status to ANATOMY_EXTERIOR or/and ANATOMY_INTERIOR. Used to determine if we as a whole have a interior or exterior biostate, or both. |
| 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_icon_greyscale | |
| set_icon_static | |
| set_initial_damage | Sets the damage of a bodypart when it is created. |
| sync_custom_zone_markings | Applies this limb's zone drawing and, for arms, its hand drawing. |
| try_attach_limb | Refits the worn clothing of a body a fitness arm, leg or chest above the Normal size is attached to: attaching a leg redraws only the uniform and suit, an arm only the gloves, and a chest none of them. |
| 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_augment_skin_sheet | Points a recolourable finish's limb at the skin sheet in its owner's skin ramp: the humanoid one under a mutant colour. |
| 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_icon_dropped | To update the bodypart's icon when not attached to a mob |
| 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_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.
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)
augment_colors 
A recolourable finish's colours, "#rrggbb" four times: paint, accent, frame, lights. Null on every other limb. A limb with them carries /datum/element/augment_paint, which draws its paint and glow and keys its icons by them.
aux_zone_markings 
The same for its aux zone (hands).
base_meat_amount 
How much meat do we add to butcher_drops when automatically generating them from our species datum?
bio_status 
Does this part have an internal or external anatomy biostate? Assigned on init based on biological_state
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
blood_dna_info 
The cached info about the blood this organ belongs to, set during on_removal()
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_effects 
Lazylist of /datum/status_effect/grouped/bodypart_effect types. Instances of this are applied to the carbon when added the limb is attached, and merged with similair limbs
bodypart_flags 
Random flags that describe this bodypart
bodypart_overlays 
A list of all bodypart overlays to draw
bodypart_textures 
A list of all bodypart textures to apply
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()
butcher_drop_cache 
Init cache for our butcher drops for sanic speed
butcher_drops_override 
Lazy assoc list of [item type] = [amount] that we drop when butchered. Overrides whatever we would drop normally based on our species datum.
butcher_replacement 
What skeleton limb, if any, we replace ourselves with when butchered?
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.
current_style 
The bodypart's currently applied style's name. Only necessary for bodyparts that come in multiple variants, like prosthetics and cyborg bodyparts.
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.
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.
grappled_attack_verb_continuous 
Continuous tense grapple verb for successful attacks
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_actually_just_invisible 
Used for taur limbs that do not get rendered at all
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.
keeps_type_name 
Set on our limbs whose types name them, which keep that name - tg names every other limb for its limb_id and zone, as "robotic left arm"
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!
mangled_state 
Mangling state (interior, exterior) of the bodypart
marking_key 
The part of this limb's icon cache keys standing for the markings it draws, or null for none. See LIMB_MARKING_ICON_KEY.
marking_key_alpha 
The markings_alpha marking_key was built with.
marking_key_aux_markings 
The aux_zone_markings list marking_key was built from.
marking_key_digitigrade 
Whether marking_key was built for a digitigrade limb.
marking_key_markings 
The markings list marking_key was built from.
marking_key_revision 
GLOB.body_marking_entry_revision when marking_key was built, -1 until it first is.
markings 
The /datum/body_marking_entry list this limb draws on its body zone, or null for none. Normally the owner DNA collection's own list for that zone, shared with it and read-only: replace it by assigning another list, never edit it. A detached limb goes on drawing the list it last got.
markings_alpha 
The alpha our markings are drawn at. A creating update_limb() sets it from the owner's species.
max_damage 
The maximum brute OR burn damage a bodypart can take. Once we hit this cap, no more damage of either type!
muscle_definition 
How defined a fitness limb's muscles are drawn, from 0, none, to MUSCLE_DEFINITION_MAX: an overlay on the limb, under its markings. Null until the limb is first set up for an owner (update_limb()'s is_creating), when it takes the definition in the owner's DNA, then kept wherever the limb goes. Only fitness limbs read it.
muscle_size 
How big this limb's muscles are drawn, a MUSCLE_SIZE_* define: MUSCLE_SIZE_NORMAL is today's sprites. Fixed by its type: each size of a limb is its own subtype, below. Clothing and underwear fitting read it per limb, so each arm and leg can differ.
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
prefix 
Set on our limbs whose limb_id does not read as words - tg's name starts with this instead, as "vox primalis left arm" for vox_primalis
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)
species_id 
ID of a species to use as an override for species-based biological logic, such as what species to pull the meat from, if our limb_id doesn't match
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_attack_verbs_continuous 
Continuous tense attack verbs for successful attacks
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.
unarmed_grab_damage_bonus 
If this limb is used to grab (which is only arms right now), how much additional damage does it deal to the grabbed individual when they fail to escape the grab?
unarmed_grab_escape_chance_bonus 
If this limb is used to grab (which is only arms right now), how much more difficult is it to escape the grab, before accounting for grab state? Values above 0 is a malus, values below 0 is a bonus. This is less powerful than adjusting grab state. If the arm has both an increased grab level and a chance reduction, it is very hard to escape a grab.
unarmed_grab_state_bonus 
If this limb is used to grab (which is only arms right now), how much more effective is the limb? Every integer above or below 0 is one effective grab level. Higher is a bonus, lower is a malus. This is more powerful than adjusting grab escape chance. If the arm has both an increased grab level and a chance reduction, it is very hard to escape a grab.
unarmed_pummeling_bonus 
Multiplier applied to effectiveness and damage when attacking a grabbed target.
unarmed_sharpness 
The 'sharpness' of the limb. Could indicate claws, teeth or spines. Should default to NONE, or blunt.
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.
worn_offsets_species 
The species whose worn offsets this limb carries, for a limb drawn in that species' shape whoever made it - see /datum/species/proc/add_worn_offsets
wound_damage_multiplier 
Our current stored wound damage multiplier
wound_resistance 
This number is added to the effective wound armor on this body part (as long as it isn't managled externally or internally), higher numbers mean more defense, negative means easier to wound
wounds 
The wounds currently afflicting this body part
zombie_color 
The color to multiply the zombie husk sprites by.
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
Adds a bodypart overlay to the limb
- overlay: The overlay to add. Either an instance of a bodypart overlay or a typepath of a bodypart overlay. If you pass a typepath, the proc will avoid creating duplicates.
- update: Whether to call update procs after adding the overlay. Set this to FALSE if you are adding multiple overlays at once.
Returns the overlay that was added, or null if it was not added.
add_bodypart_texture
Adds a bodypart texture to the limb
- texture: The texture to add. Either an instance of a bodypart texture or a typepath of a bodypart texture. If you pass a typepath, the proc will avoid creating duplicates.
- update: Whether to call update procs after adding the texture. Set this to FALSE if you are adding multiple textures at once.
add_bodypart_trait
Add a trait to the bodypart traits list, then applies the trait if necessary
add_bodyshape
Add a bodyshape to the bodypart, then synchronize with the owner if necessary
add_surgical_state
Add one or multiple surgical states to the bodypart
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
append_base_marking_overlays
Appends this limb's native base markings before height and body textures are applied.
The ordinary limb renderer passes its existing overlay list, preserving native layer order without allocating another list. An editor may request one body or auxiliary zone, omit the separate emissive appearances and replace the live marking opacity while sampling its pixels. No body, custom paint or external-organ overlays are included. A marking draws only the state its drawn_state() answers, and nothing where it has no art: see zone_icon_state().
Consecutive markings of one colour on sheets of one size draw as one appearance, and a zone's glows on one sheet size as one glow, each where its first marking was: see merge_body_marking_run(). Only at full opacity: translucent markings, and the glows fading with them, darken where they overlap, which one blended layer cannot repeat (markings_copy.dm notes the same), so a reduced markings_alpha draws them one by one. So does an editor's single-zone request, which samples them.
Arguments:
- output: The caller-owned list of overlays to their flags to append to. Markings texture like the limb itself.
- zone: A body or auxiliary zone to include, or null for both in native order.
- include_emissive: Whether native emissive appearances accompany the visible markings.
- alpha_override: An explicit visible marking opacity, or null to use markings_alpha.
- image_dir: A facing every appearance keeps whichever way its holder faces, SOUTH for a dropped limb as its own images have, or null to follow the holder.
Returns the same output list.
apply_custom_marking
Puts a zone drawing on this limb as an overlay of overlay_type, replacing, updating or removing the one it has.
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.
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
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
- exposed_wound_bonus- The exposed_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, and add the plain wound_bonus if there is any value to add 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 We add the inherent wound_resistance variable the bodypart has (heads and chests are slightly harder to wound) as an armor bonus unless the limb is mangled, and a small wound bonus if the limb is already disabled Once we have everything, we then check if we have acquired any armor. If so, reduce our value by the percentage value of that armour. If not, we add our exposed_wound_bonus as a final bonus to our roll.
Arguments:
- It's the same ones on /obj/item/bodypart/proc/receive_damage except injury_roll, which is fed to this proc.
clear_augment_finish
Takes a recolourable finish off a limb, if it had one, with its element: its colours go, and its glow and its fit go back to its type's own.
clear_ownership
Run all necessary procs to remove a limbs ownership and remove the appropriate signals and traits
custom_sprite_icon_file
The icon file this limb draws from: its greyscale sheet when it should draw greyscale, else its static one.
dirt_sprite_reads
Returns what this limb's sprites are drawn from as mess reads them (drawn_sheet(), custom_sprite_limb_state()): the limb, then every var those read. A limb that still reads the same (dirt_sprite_unchanged()) draws the same sprites.
dirt_sprite_unchanged
Returns whether this limb's sprites are drawn from what they were when dirt_sprite_reads() read it.
Arguments:
- reads: What dirt_sprite_reads() returned.
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.
draw_augment_paint
Draws a recolourable finish's paint and glow into the images get_limb_icon() made: for the limb's own image and its hand's, copies drawing the finish's _paint and _glow states through their colour matrices, added above everything the limb drew (its markings too, which the plates cover where they cover skin). Copies of the limb's images, they keep its layer, height, texture and facing; a leg's are split into the leg's two halves through the masked leg cache (handle_masking()), as draw_muscle_definition() splits definition.
Anything else the limb lights, like a glowing marking, would light the plates over it in the dark, so then each _paint copy also gets an emissive blocker, a copy of the limb's own. A limb with nothing else lit gets none: only an emissive counts, told by its colour matrix, never the emissive blockers its overlays bring along. The finish's own lights masks, the limb's and its hand's, are never under a _paint pixel, so they stay lit.
Nothing is drawn for a limb get_limb_icon() drew none of its own image for: a stump, an invisible limb, a taur's legs. Nor for a zone whose packed state the sheet doesn't hold: a finish with no lights on a hand has no _glow there.
Arguments:
- images: get_limb_icon()'s images as keys, the limb's own first (on a split leg, its two halves; on an arm, then its hand). Changed in place.
- dropped: Whether they're drawn for the limb lying on its own, which isn't split into leg halves.
draw_muscle_definition
Draws this limb's muscle definition into the images get_limb_icon() made: the definition overlay for the state the limb draws, its size and its step, right above the limb's own image, both halves of a leg's, and so under its markings and everything else on it. It's a copy of the limb's image drawing the overlay, so it's coloured, offset for height and textured as the limb is, and a husk's is toned as the limb is.
No icon is made for it: the overlay is its sheet's own state, the leg halves come from the masked leg cache (handle_masking()) and a husk's tone from husk_toned_sheet().
Nothing is drawn where the definition sheet has no state for what the limb draws: hands, digitigrade legs, and a limb drawn from another sheet, like another species' look. Nor is anything drawn for a limb get_limb_icon() draws none of, like a taur's hidden legs, nor an invisible one.
Arguments:
- images: get_limb_icon()'s images, the limb's own first. Changed in place.
- dropped: Whether they're drawn for the limb lying on its own, which isn't split into leg halves.
drawn_sheet
Returns the sheet this limb's own sprite is drawn from, as get_limb_icon() draws it, or null when it draws none of its own: a stump, an invisible limb, or a taur's legs, which its taur body stands in for.
drop_limb
Refits the worn clothing of a body a fitness arm, leg or chest above the Normal size comes off, whether lost or swapped for another limb.
emp_effect
The actual effect of EMPs on the limb. Allows children to override it however they want
fitness_sheet
Returns the sheet this limb draws in place of sheet: its muscle size's sheet when sheet has size sheets and that one
holds the state the limb draws, else sheet itself. Only asked for a limb above the Normal size.
The size sheets hold every plain limb's states and the digitigrade legs'. A state a size's sheet lacks keeps the limb drawing today's sprite from its own sheet, never a missing state.
Arguments:
- sheet: The greyscale sheet the limb would otherwise draw from.
forced_removal
In-case someone, somehow only teleports someones limb
generate_husk_key
Keys a husked limb by the markings it still draws: grey, but at their own alpha and with their own glow.
get_bodypart_damage_state
Gets overlays to apply to the mob when damaged.
get_butcher_drops
Returns a lazy assoc list of items dropped when the limb is butchered
get_cache_key
Returns a string representing the bodyparts icon cache key
get_custom_marking
This limb's custom marking overlay of exactly this type. Hand paint is a subtype of zone paint on the same arm.
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_reported_surgery_state
Returns all surgical states, filtering out stuff which should not be reported
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
handle_masking
This proc serves as a way to ensure that legs layer properly on a mob. To do this, two separate images are created - A low layer one, and a normal layer one. Each of the image will appropriately crop out dirs that are not used on that given layer.
Arguments:
- limb_overlay - The limb image being masked, not necessarily the original limb image as it could be an overlay on top of it
Returns the list of masked images, or
nullif the limb_overlay didn't exist
help_remove_gauze
Helper for someone helping to remove our gauze
huskify_image
Takes in an image and greyscales it to later be recolored to look like a husk
Then returns a separate image/MA that is the blood overlay for the husk May return multiple if the blood overlay has an emissive associated
is_splinted
Returns TRUE if the limb is splinted with gauze or tape with an effective splint factor
is_woundable
Check if a bodypart can be wounded
marking_zone_key
Returns the string standing for the markings this limb draws on one zone, in order, with their colours and glow.
Arguments:
- zone: body_zone or aux_zone.
- zone_entries: the entries this limb draws there.
Returns:
- string: the owner's cache_key_for_zone() while zone_entries is still the owner's list for that zone, else one built from zone_entries themselves, as for a detached limb, a limb whose owner's markings changed after its last update_limb(), or a limb given entries of its own.
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_clean
Called when limb's current owner gets washed
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
A limb leaving its body takes its private images with it, so a limb put in its place, even one drawn under the same key before the body is drawn again (a species change swaps them so), is drawn from its own sprites.
painless_wound_roll
Allows us to roll for and apply a wound without actually dealing damage. Used for aggregate wounding power with pellet clouds
paint_copy
Returns a copy of base, one of a limb's own images, drawing state from sheet in matrix, and with block_templates,
an emissive blocker for it: a copy of the limb's own blocker for base, so it sits on the emissive plane as that does.
Arguments:
- base: The image copied: its layer, height filter, texture and facing are kept.
- sheet: The sheet
stateis drawn from, or a masked leg half's icon. - state: A finish's packed state,
_ paint or _glow. - matrix: The state's colour matrix (augment_paint_matrix()).
- block_templates: The limb's own emissive blockers, "
" -> blocker, or null for no blocker.
Returns:
- list: The copy, then its blocker if it has one.
rebuild_marking_icon_key
Builds the part of this limb's icon cache keys standing for the markings it draws, and stamps what it was built from.
LIMB_MARKING_ICON_KEY reuses the result until something it describes changes: the marking lists are swapped for others, an entry anywhere is recoloured or its glow toggled (GLOB.body_marking_entry_revision), markings_alpha changes, or the limb turns digitigrade or back. Marking lists are never edited in place, so the same list still holds the same entries in the same order.
Returns:
- string: "[zone]=[entries];[aux zone]=[entries];alpha=[markings_alpha]", a zone without markings left empty and the zone written "digitigrade_[zone]" on a digitigrade limb, or null when the limb draws no markings.
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. exposed_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.
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_biostate
Removes biostate from the limb and ensures surgical states are updated accordingly
remove_bodypart_overlay
Removes a bodypart overlay from the limb
- overlay: The overlay to remove. Either an instance of a bodypart overlay or a typepath of a bodypart overlay. If you pass a typepath, the first overlay of that typepath found will be removed.
- update: Whether to call update procs after removing the overlay. Set this to FALSE if you are removing multiple overlays at once.
remove_bodypart_texture
Removes a bodypart texture from the limb
- texture: The texture to remove. Either an instance of a bodypart texture or a typepath of a bodypart texture. If you pass a typepath, the first texture of that typepath found will be removed.
- update: Whether to call update procs after removing the texture. Set this to FALSE if you are removing multiple textures at once.
remove_bodypart_trait
Remove a trait from the bodypart traits list, then removes the trait if necessary
remove_bodyshape
Remove a bodyshape from the bodypart, then synchronize with the owner 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
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_bio_state_status
Assigns our bio_status to ANATOMY_EXTERIOR or/and ANATOMY_INTERIOR. Used to determine if we as a whole have a interior or exterior biostate, or both.
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_icon_greyscale
This should only be ran by augments, if you don't know what you're doing, you shouldn't be touching this.
A setter for the icon_greyscale variable of the bodypart. Runs through icon_exists() for sanity, and it won't
change anything in the event that the check fails.
Arguments:
- new_icon - The new icon filepath that you want to replace
icon_greyscalewith.
set_icon_static
This should only be ran by augments, if you don't know what you're doing, you shouldn't be touching this.
A setter for the icon_static variable of the bodypart. Runs through icon_exists() for sanity, and it won't
change anything in the event that the check fails.
Arguments:
- new_icon - The new icon filepath that you want to replace
icon_staticwith.
set_initial_damage
Sets the damage of a bodypart when it is created.
sync_custom_zone_markings
Applies this limb's zone drawing and, for arms, its hand drawing.
try_attach_limb
Refits the worn clothing of a body a fitness arm, leg or chest above the Normal size is attached to: attaching a leg redraws only the uniform and suit, an arm only the gloves, and a chest none of them.
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 calculated in update_wounds(), 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
- exposed_wound_bonus: ditto above
update_augment_skin_sheet
Points a recolourable finish's limb at the skin sheet in its owner's skin ramp: the humanoid one under a mutant colour.
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_icon_dropped
To update the bodypart's icon when not attached to a mob
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_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 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)
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