/tg/ Station 13 - Modules - TypesVar Details - Proc Details

wound

Vars

a_or_fromneeded for "your arm has a compound fracture" vs "your arm has some third degree burns"
actionspeed_modThe actionspeed modifier we will use in case we are on the arms and have a interaction penalty. Qdelled on destroy.
already_scarredIf we've already tried scarring while removing (remove_wound can be called twice in a del chain, let's be nice to our code yeah?) TODO: make this cleaner
attached_surgeryIf we're operating on this wound and it gets healed, we'll nix the surgery too
base_treat_timeHow long it will take to treat this wound with a standard effective tool, assuming it doesn't need surgery
base_xadone_progress_to_qdelThe base amount of [cryo_progress] required to have ourselves fully healed by cryo. Multiplied against severity.
blood_flowHow much we're contributing to this limb's bleed_rate
can_scarIf this wound can generate a scar.
cryo_progressif you're a lazy git and just throw them in cryo, the wound will go away after accumulating severity * [base_xadone_progress_to_qdel] power
damage_multiplier_penaltyIncoming damage on this limb will be multiplied by this, to simulate tenderness and vulnerability (mostly burns).
default_scar_fileThe default file we take our scar descriptions from, if we fail to get the ideal file.
descThe description shown on the scanners
disablingIf having this wound makes currently makes the parent bodypart unusable
examine_descWhat the limb looks like on a cursory examine
homemade_treat_textImprovised remedies indicated by the first aid analyzer only.
interaction_efficiency_penaltyUsing this limb in a do_after interaction will multiply the length by this duration (arms)
limbThe bodypart we're parented to. Not guaranteed to be non-null, especially after/during removal or if we haven't been applied
limp_chanceIf this wound has a limp_slowdown and is applied to a leg, it has this chance to limp each step
limp_slowdownIf set and this wound is applied to a leg, we take this many deciseconds extra per step on this leg
nameWhat it's named
occur_textThe visible message when this happens
processesIf we need to process each life tick
scar_keywordWhat kind of scars this wound will create description wise once healed
series_threshold_penaltyHow much having this wound will add to all future check_wounding() rolls on this limb, but only for wounds of its own series
severityEither WOUND_SEVERITY_TRIVIAL (meme wounds like stubbed toe), WOUND_SEVERITY_MODERATE, WOUND_SEVERITY_SEVERE, or WOUND_SEVERITY_CRITICAL (or maybe WOUND_SEVERITY_LOSS)
simple_descSimple description, shortened for clarity if defined. Otherwise just takes the normal desc in the analyzer proc.
simple_treat_textSimple analyzer's wound description, which focuses less on the clinical aspect of the wound and more on easily readable treatment instructions.
sound_effectThis sound will be played upon the wound being applied
sound_volumeThe volume of [sound_effect]
status_effect_typeWhat status effect we assign on application
threshold_penaltyHow much having this wound will add to all future check_wounding() rolls on this limb, to allow progression to worse injuries with repeated damage
treat_textThe basic treatment suggested by health analyzers
treat_text_shortEven more basic treatment
treatable_bySpecific items such as bandages or sutures that can try directly treating this wound
treatable_by_grabbedSpecific items such as bandages or sutures that can try directly treating this wound only if the user has the victim in an aggressive grab or higher
treatable_toolsAny tools with any of the flags in this list will be usable to try directly treating this wound
unique_idThe unique ID of our wound for use with [actionspeed_mod]. Defaults to REF(src).
victimWho owns the body part that we're wounding
wound_flagsWhat flags apply to this wound
wound_sourceThe source of how we got the wound, typically a weapon.

Procs

adjust_blood_flowUse this to modify blood flow. 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_woundapply_wound() is used once a wound type is instantiated to assign it to a bodypart, and actually come into play.
can_be_applied_toReturns TRUE if we can be applied to the limb.
check_grab_treatmentsReturn TRUE if we have an item that can only be used while aggro grabbed (unhanded aggro grab treatments go in /datum/wound/proc/try_handling). Treatment is still is handled in /datum/wound/proc/treat
drag_bleed_amountUsed when we're being dragged while bleeding, the value we return is how much bloodloss this wound causes from being dragged. Since it's a proc, you can let bandages soak some of the blood
gauze_state_changedSignal proc for if gauze has been applied or removed from our limb.
generate_actionspeed_modifierIf we have no actionspeed_mod, generates a new one with our unique ID, sets actionspeed_mod to it, then returns it.
generate_unique_idGenerates the ID we use for [unique_id], which is also set as our actionspeed mod's ID
get_action_delay_incrementReturns the decisecond increment of any click interactions, assuming our limb is being used.
get_action_delay_multReturns the decisecond multiplier of any click interactions, assuming our limb is being used.
get_bleed_rate_of_changeget_bleed_rate_of_change() is used in /mob/living/carbon/proc/bleed_warn to gauge whether this wound (if bleeding) is becoming worse, better, or staying the same over time
get_desc_intensitySpans [desc] based on our severity.
get_dismember_chance_bonusGets the flat percentage chance increment of a dismember occurring, if a dismember is attempted (requires mangled flesh and bone). returning 15 = +15%.
get_effective_actionspeed_modifierReturns a "adjusted" interaction_efficiency_penalty that will be used for the actionspeed mod.
get_examine_descriptionget_examine_description() is used in carbon/examine and human/examine to show the status of this wound. Useful if you need to show some status like the wound being splinted or bandaged.
get_limb_examine_descriptionReturns what string is displayed when a limb that has sustained this wound is examined (This is examining the LIMB ITSELF, when it's not attached to someone.)
get_pregen_dataReturns our pregen data, which is practically guaranteed to exist, so this proc can safely be used raw. In fact, since it's RETURN_TYPEd to wound_pregen_data, you can even directly access the variables without having to store the value of this proc in a typed variable. Ex. get_pregen_data().wound_series
get_required_biostateReturns the biostate we require to be applied.
get_scanner_descriptionPrints the details about the wound for the wound scanner on simple mode
get_scar_fileGetter proc for our scar_file, in case we might have some custom scar gen logic.
get_scar_keywordGetter proc for our scar_keyword, in case we might have some custom scar gen logic.
get_simple_scanner_descriptionPrints the details about the wound for the wound scanner on complex mode
get_viable_zonesReturns the zones we can be applied to.
get_xadone_progress_to_qdelReturns the amount of [cryo_progress] we need to be qdeleted.
handle_processIf var/processing is TRUE, this is run on each life tick
handle_xadone_progressDoes various actions based on [cryo_progress]. By default, qdeletes the wound past a certain threshold.
item_can_treatReturns TRUE if the item can be used to treat our wounds. Hooks into treat() - only things that return TRUE here may be used there.
limb_essentialReturns TRUE if our limb is the head or chest, FALSE otherwise. Essential in the sense of "we cannot live without it".
modify_desc_before_spanA hook proc used to modify desc before it is spanned via [get_desc_intensity]. Useful for inserting spans yourself.
on_stasisCalled when the patient is undergoing stasis, so that having fully treated a wound doesn't make you sit there helplessly until you think to unbuckle them
on_synthfleshWhen synthflesh is applied to the victim, we call this. No sense in setting up an entire chem reaction system for wounds when we only care for a few chems. Probably will change in the future
on_xadoneCalled from cryoxadone and pyroxadone when they're proc'ing. Wounds will slowly be fixed separately from other methods when these are in effect. crappy name but eh
receive_damageWhen our parent bodypart is hurt.
remove_actionspeed_modifierIf we have an actionspeed_mod, qdels it and sets our ref of it to null.
remove_woundRemove the wound from whatever it's afflicting, and cleans up whatever status effects it had or modifiers it had on interaction times. ignore_limb is used for detachments where we only want to forget the victim
replace_woundreplace_wound() is used when you want to replace the current wound with a new wound, presumably of the same category, just of a different severity (either up or down counts)
second_windAdditional beneficial effects when the wound is gained, in case you want to give a temporary boost to allow the victim to try an escape or last stand
set_blood_flowSets our blood flow
set_disablingProc called to change the variable disabling and react to the event.
set_interaction_efficiency_penaltySetter for [interaction_efficiency_penalty]. Updates the actionspeed of our actionspeed mod.
set_limbProc called to change the variable limb and react to the event.
set_victimSetter for [victim]. Should completely transfer signals, attributes, etc. To the new victim - if there is any, as it can be null.
severity_textReturns what text describes this wound
should_have_actionspeed_modifierReturns TRUE if we have an interaction_efficiency_penalty, and if we are on the arms, FALSE otherwise.
still_existsFor use in do_after callback checks
treatSomeone is using something that might be used for treating the wound on this limb
try_handlingLike try_treating() but for unhanded interactions, used by joint dislocations for manual bodypart chiropractice for example. Ignores thick material checks since you can pop an arm into place through a thick suit unlike using sutures
try_treatingtry_treating() is an intercept run from [/mob/living/carbon/proc/attackby] right after surgeries but before anything else. Return TRUE here if the item is something that is relevant to treatment to take over the interaction.
update_actionspeed_modifierIf we should have an actionspeed_mod, ensures we do and updates its slowdown. Otherwise, ensures we don't have one by qdeleting any existing modifier.
update_inefficienciesUpdates our limping and interaction penalties in accordance with our gauze.
wound_injuryThe immediate negative effects faced as a result of the wound

Var Details

a_or_from

needed for "your arm has a compound fracture" vs "your arm has some third degree burns"

actionspeed_mod

The actionspeed modifier we will use in case we are on the arms and have a interaction penalty. Qdelled on destroy.

already_scarred

If we've already tried scarring while removing (remove_wound can be called twice in a del chain, let's be nice to our code yeah?) TODO: make this cleaner

attached_surgery

If we're operating on this wound and it gets healed, we'll nix the surgery too

base_treat_time

How long it will take to treat this wound with a standard effective tool, assuming it doesn't need surgery

base_xadone_progress_to_qdel

The base amount of [cryo_progress] required to have ourselves fully healed by cryo. Multiplied against severity.

blood_flow

How much we're contributing to this limb's bleed_rate

can_scar

If this wound can generate a scar.

cryo_progress

if you're a lazy git and just throw them in cryo, the wound will go away after accumulating severity * [base_xadone_progress_to_qdel] power

damage_multiplier_penalty

Incoming damage on this limb will be multiplied by this, to simulate tenderness and vulnerability (mostly burns).

default_scar_file

The default file we take our scar descriptions from, if we fail to get the ideal file.

desc

The description shown on the scanners

disabling

If having this wound makes currently makes the parent bodypart unusable

examine_desc

What the limb looks like on a cursory examine

homemade_treat_text

Improvised remedies indicated by the first aid analyzer only.

interaction_efficiency_penalty

Using this limb in a do_after interaction will multiply the length by this duration (arms)

limb

The bodypart we're parented to. Not guaranteed to be non-null, especially after/during removal or if we haven't been applied

limp_chance

If this wound has a limp_slowdown and is applied to a leg, it has this chance to limp each step

limp_slowdown

If set and this wound is applied to a leg, we take this many deciseconds extra per step on this leg

name

What it's named

occur_text

The visible message when this happens

processes

If we need to process each life tick

scar_keyword

What kind of scars this wound will create description wise once healed

series_threshold_penalty

How much having this wound will add to all future check_wounding() rolls on this limb, but only for wounds of its own series

severity

Either WOUND_SEVERITY_TRIVIAL (meme wounds like stubbed toe), WOUND_SEVERITY_MODERATE, WOUND_SEVERITY_SEVERE, or WOUND_SEVERITY_CRITICAL (or maybe WOUND_SEVERITY_LOSS)

simple_desc

Simple description, shortened for clarity if defined. Otherwise just takes the normal desc in the analyzer proc.

simple_treat_text

Simple analyzer's wound description, which focuses less on the clinical aspect of the wound and more on easily readable treatment instructions.

sound_effect

This sound will be played upon the wound being applied

sound_volume

The volume of [sound_effect]

status_effect_type

What status effect we assign on application

threshold_penalty

How much having this wound will add to all future check_wounding() rolls on this limb, to allow progression to worse injuries with repeated damage

treat_text

The basic treatment suggested by health analyzers

treat_text_short

Even more basic treatment

treatable_by

Specific items such as bandages or sutures that can try directly treating this wound

treatable_by_grabbed

Specific items such as bandages or sutures that can try directly treating this wound only if the user has the victim in an aggressive grab or higher

treatable_tools

Any tools with any of the flags in this list will be usable to try directly treating this wound

unique_id

The unique ID of our wound for use with [actionspeed_mod]. Defaults to REF(src).

victim

Who owns the body part that we're wounding

wound_flags

What flags apply to this wound

wound_source

The source of how we got the wound, typically a weapon.

Proc Details

adjust_blood_flow

Use this to modify blood flow. 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_wound

apply_wound() is used once a wound type is instantiated to assign it to a bodypart, and actually come into play.

Arguments:

can_be_applied_to

Returns TRUE if we can be applied to the limb.

check_grab_treatments

Return TRUE if we have an item that can only be used while aggro grabbed (unhanded aggro grab treatments go in /datum/wound/proc/try_handling). Treatment is still is handled in /datum/wound/proc/treat

drag_bleed_amount

Used when we're being dragged while bleeding, the value we return is how much bloodloss this wound causes from being dragged. Since it's a proc, you can let bandages soak some of the blood

gauze_state_changed

Signal proc for if gauze has been applied or removed from our limb.

generate_actionspeed_modifier

If we have no actionspeed_mod, generates a new one with our unique ID, sets actionspeed_mod to it, then returns it.

generate_unique_id

Generates the ID we use for [unique_id], which is also set as our actionspeed mod's ID

get_action_delay_increment

Returns the decisecond increment of any click interactions, assuming our limb is being used.

get_action_delay_mult

Returns the decisecond multiplier of any click interactions, assuming our limb is being used.

get_bleed_rate_of_change

get_bleed_rate_of_change() is used in /mob/living/carbon/proc/bleed_warn to gauge whether this wound (if bleeding) is becoming worse, better, or staying the same over time

Returns BLOOD_FLOW_STEADY if we're not bleeding or there's no change (like piercing), BLOOD_FLOW_DECREASING if we're clotting (non-critical slashes, gauzed, coagulant, etc), BLOOD_FLOW_INCREASING if we're opening up (crit slashes/heparin/nitrous oxide)

get_desc_intensity

Spans [desc] based on our severity.

get_dismember_chance_bonus

Gets the flat percentage chance increment of a dismember occurring, if a dismember is attempted (requires mangled flesh and bone). returning 15 = +15%.

get_effective_actionspeed_modifier

Returns a "adjusted" interaction_efficiency_penalty that will be used for the actionspeed mod.

get_examine_description

get_examine_description() is used in carbon/examine and human/examine to show the status of this wound. Useful if you need to show some status like the wound being splinted or bandaged.

Return the full string line you want to show, note that we're already dealing with the 'warning' span at this point, and that \n is already appended for you in the place this is called from

Arguments:

get_limb_examine_description

Returns what string is displayed when a limb that has sustained this wound is examined (This is examining the LIMB ITSELF, when it's not attached to someone.)

get_pregen_data

Returns our pregen data, which is practically guaranteed to exist, so this proc can safely be used raw. In fact, since it's RETURN_TYPEd to wound_pregen_data, you can even directly access the variables without having to store the value of this proc in a typed variable. Ex. get_pregen_data().wound_series

get_required_biostate

Returns the biostate we require to be applied.

get_scanner_description

Prints the details about the wound for the wound scanner on simple mode

get_scar_file

Getter proc for our scar_file, in case we might have some custom scar gen logic.

get_scar_keyword

Getter proc for our scar_keyword, in case we might have some custom scar gen logic.

get_simple_scanner_description

Prints the details about the wound for the wound scanner on complex mode

get_viable_zones

Returns the zones we can be applied to.

get_xadone_progress_to_qdel

Returns the amount of [cryo_progress] we need to be qdeleted.

handle_process

If var/processing is TRUE, this is run on each life tick

handle_xadone_progress

Does various actions based on [cryo_progress]. By default, qdeletes the wound past a certain threshold.

item_can_treat

Returns TRUE if the item can be used to treat our wounds. Hooks into treat() - only things that return TRUE here may be used there.

limb_essential

Returns TRUE if our limb is the head or chest, FALSE otherwise. Essential in the sense of "we cannot live without it".

modify_desc_before_span

A hook proc used to modify desc before it is spanned via [get_desc_intensity]. Useful for inserting spans yourself.

on_stasis

Called when the patient is undergoing stasis, so that having fully treated a wound doesn't make you sit there helplessly until you think to unbuckle them

on_synthflesh

When synthflesh is applied to the victim, we call this. No sense in setting up an entire chem reaction system for wounds when we only care for a few chems. Probably will change in the future

on_xadone

Called from cryoxadone and pyroxadone when they're proc'ing. Wounds will slowly be fixed separately from other methods when these are in effect. crappy name but eh

receive_damage

When our parent bodypart is hurt.

remove_actionspeed_modifier

If we have an actionspeed_mod, qdels it and sets our ref of it to null.

remove_wound

Remove the wound from whatever it's afflicting, and cleans up whatever status effects it had or modifiers it had on interaction times. ignore_limb is used for detachments where we only want to forget the victim

replace_wound

replace_wound() is used when you want to replace the current wound with a new wound, presumably of the same category, just of a different severity (either up or down counts)

Arguments:

second_wind

Additional beneficial effects when the wound is gained, in case you want to give a temporary boost to allow the victim to try an escape or last stand

set_blood_flow

Sets our blood flow

set_disabling

Proc called to change the variable disabling and react to the event.

set_interaction_efficiency_penalty

Setter for [interaction_efficiency_penalty]. Updates the actionspeed of our actionspeed mod.

set_limb

Proc called to change the variable limb and react to the event.

set_victim

Setter for [victim]. Should completely transfer signals, attributes, etc. To the new victim - if there is any, as it can be null.

severity_text

Returns what text describes this wound

should_have_actionspeed_modifier

Returns TRUE if we have an interaction_efficiency_penalty, and if we are on the arms, FALSE otherwise.

still_exists

For use in do_after callback checks

treat

Someone is using something that might be used for treating the wound on this limb

try_handling

Like try_treating() but for unhanded interactions, used by joint dislocations for manual bodypart chiropractice for example. Ignores thick material checks since you can pop an arm into place through a thick suit unlike using sutures

try_treating

try_treating() is an intercept run from [/mob/living/carbon/proc/attackby] right after surgeries but before anything else. Return TRUE here if the item is something that is relevant to treatment to take over the interaction.

This proc leads into /datum/wound/proc/treat and probably shouldn't be added onto in children types. You can specify what items or tools you want to be intercepted with var/list/treatable_by and var/treatable_tool, then if an item fulfills one of those requirements and our wound claims it first, it goes over to treat() and treat_self().

Arguments:

update_actionspeed_modifier

If we should have an actionspeed_mod, ensures we do and updates its slowdown. Otherwise, ensures we don't have one by qdeleting any existing modifier.

update_inefficiencies

Updates our limping and interaction penalties in accordance with our gauze.

wound_injury

The immediate negative effects faced as a result of the wound