mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Improves Bleeding Feedback + Misc Wound/Organ Decay Tweaks (+ Removes Teeth) (#56056)
This commit is contained in:
@@ -11,10 +11,17 @@
|
||||
|
||||
/datum/status_effect/determined/on_apply()
|
||||
. = ..()
|
||||
owner.visible_message("<span class='danger'>[owner] grits [owner.p_their()] teeth in pain!</span>", "<span class='notice'><b>Your senses sharpen as your body tenses up from the wounds you've sustained!</b></span>", vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
owner.visible_message("<span class='danger'>[owner]'s body tenses up noticeably, gritting against [owner.p_their()] pain!</span>", "<span class='notice'><b>Your senses sharpen as your body tenses up from the wounds you've sustained!</b></span>", \
|
||||
vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/human_owner = owner
|
||||
human_owner.physiology.bleed_mod *= WOUND_DETERMINATION_BLEED_MOD
|
||||
|
||||
/datum/status_effect/determined/on_remove()
|
||||
owner.visible_message("<span class='danger'>[owner]'s body slackens noticeably!</span>", "<span class='warning'><b>Your adrenaline rush dies off, and the pain from your wounds come aching back in...</b></span>", vision_distance=COMBAT_MESSAGE_RANGE)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/human_owner = owner
|
||||
human_owner.physiology.bleed_mod /= WOUND_DETERMINATION_BLEED_MOD
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/limp
|
||||
@@ -50,16 +57,16 @@
|
||||
|
||||
/atom/movable/screen/alert/status_effect/limp
|
||||
name = "Limping"
|
||||
desc = "One or more of your legs has been wounded, slowing down steps with that leg! Get it fixed, or at least splinted!"
|
||||
desc = "One or more of your legs has been wounded, slowing down steps with that leg! Get it fixed, or at least in a sling of gauze!"
|
||||
|
||||
/datum/status_effect/limp/proc/check_step(mob/whocares, OldLoc, Dir, forced)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!owner.client || owner.body_position == LYING_DOWN || !owner.has_gravity() || (owner.movement_type & FLYING) || forced)
|
||||
if(!owner.client || owner.body_position == LYING_DOWN || !owner.has_gravity() || (owner.movement_type & FLYING) || forced || owner.buckled)
|
||||
return
|
||||
var/determined_mod = 1
|
||||
if(owner.has_status_effect(STATUS_EFFECT_DETERMINED))
|
||||
determined_mod = 0.25
|
||||
// less limping while we have determination still
|
||||
var/determined_mod = owner.has_status_effect(STATUS_EFFECT_DETERMINED) ? 0.25 : 1
|
||||
|
||||
if(next_leg == left)
|
||||
owner.client.move_delay += slowdown_left * determined_mod
|
||||
next_leg = right
|
||||
|
||||
@@ -340,6 +340,16 @@
|
||||
/datum/wound/proc/drag_bleed_amount()
|
||||
return
|
||||
|
||||
/**
|
||||
* 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)
|
||||
*/
|
||||
/datum/wound/proc/get_bleed_rate_of_change()
|
||||
if(blood_flow && HAS_TRAIT(victim, TRAIT_BLOODY_MESS))
|
||||
return BLOOD_FLOW_INCREASING
|
||||
return BLOOD_FLOW_STEADY
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
|
||||
+26
-38
@@ -34,10 +34,10 @@
|
||||
|
||||
/datum/wound/burn/handle_process()
|
||||
. = ..()
|
||||
if(strikes_to_lose_limb == 0)
|
||||
if(strikes_to_lose_limb == 0) // we've already hit sepsis, nothing more to do
|
||||
victim.adjustToxLoss(0.5)
|
||||
if(prob(1))
|
||||
victim.visible_message("<span class='danger'>The infection on the remnants of [victim]'s [limb.name] shift and bubble nauseatingly!</span>", "<span class='warning'>You can feel the infection on the remnants of your [limb.name] coursing through your veins!</span>")
|
||||
victim.visible_message("<span class='danger'>The infection on the remnants of [victim]'s [limb.name] shift and bubble nauseatingly!</span>", "<span class='warning'>You can feel the infection on the remnants of your [limb.name] coursing through your veins!</span>", vision_distance = COMBAT_MESSAGE_RANGE)
|
||||
return
|
||||
|
||||
if(victim.reagents)
|
||||
@@ -52,18 +52,22 @@
|
||||
if(limb.current_gauze)
|
||||
limb.seep_gauze(WOUND_BURN_SANITIZATION_RATE)
|
||||
|
||||
if(flesh_healing > 0)
|
||||
if(flesh_healing > 0) // good bandages multiply the length of flesh healing
|
||||
var/bandage_factor = (limb.current_gauze ? limb.current_gauze.splint_factor : 1)
|
||||
flesh_damage = max(0, flesh_damage - 1)
|
||||
flesh_healing = max(0, flesh_healing - bandage_factor) // good bandages multiply the length of flesh healing
|
||||
flesh_healing = max(0, flesh_healing - bandage_factor)
|
||||
|
||||
// if we have little/no infection, the limb doesn't have much burn damage, and our nutrition is good, heal some flesh
|
||||
if(infestation <= WOUND_INFECTION_MODERATE && (limb.burn_dam < 5) && (victim.nutrition >= NUTRITION_LEVEL_FED))
|
||||
flesh_healing += 0.2
|
||||
|
||||
// here's the check to see if we're cleared up
|
||||
if((flesh_damage <= 0) && (infestation <= 1))
|
||||
if((flesh_damage <= 0) && (infestation <= WOUND_INFECTION_MODERATE))
|
||||
to_chat(victim, "<span class='green'>The burns on your [limb.name] have cleared up!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// sanitization is checked after the clearing check but before the rest, because we freeze the effects of infection while we have sanitization
|
||||
// sanitization is checked after the clearing check but before the actual ill-effects, because we freeze the effects of infection while we have sanitization
|
||||
if(sanitization > 0)
|
||||
var/bandage_factor = (limb.current_gauze ? limb.current_gauze.splint_factor : 1)
|
||||
infestation = max(0, infestation - WOUND_BURN_SANITIZATION_RATE)
|
||||
@@ -118,7 +122,7 @@
|
||||
|
||||
/datum/wound/burn/get_examine_description(mob/user)
|
||||
if(strikes_to_lose_limb <= 0)
|
||||
return "<span class='deadsay'><B>[victim.p_their(TRUE)] [limb.name] is completely dead and unrecognizable as organic.</B></span>"
|
||||
return "<span class='deadsay'><B>[victim.p_their(TRUE)] [limb.name] has locked up completely and is non-functional.</B></span>"
|
||||
|
||||
var/list/condition = list("[victim.p_their(TRUE)] [limb.name] [examine_desc]")
|
||||
if(limb.current_gauze)
|
||||
@@ -137,13 +141,13 @@
|
||||
else
|
||||
switch(infestation)
|
||||
if(WOUND_INFECTION_MODERATE to WOUND_INFECTION_SEVERE)
|
||||
condition += ", <span class='deadsay'>with small spots of discoloration along the nearby veins!</span>"
|
||||
condition += ", <span class='deadsay'>with early signs of infection.</span>"
|
||||
if(WOUND_INFECTION_SEVERE to WOUND_INFECTION_CRITICAL)
|
||||
condition += ", <span class='deadsay'>with dark clouds spreading outwards under the skin!</span>"
|
||||
condition += ", <span class='deadsay'>with growing clouds of infection.</span>"
|
||||
if(WOUND_INFECTION_CRITICAL to WOUND_INFECTION_SEPTIC)
|
||||
condition += ", <span class='deadsay'>with streaks of rotten infection pulsating outward!</span>"
|
||||
condition += ", <span class='deadsay'>with streaks of rotten, pulsating infection!</span>"
|
||||
if(WOUND_INFECTION_SEPTIC to INFINITY)
|
||||
return "<span class='deadsay'><B>[victim.p_their(TRUE)] [limb.name] is a mess of char and rot, skin literally dripping off the bone with infection!</B></span>"
|
||||
return "<span class='deadsay'><B>[victim.p_their(TRUE)] [limb.name] is a mess of charred skin and infected rot!</B></span>"
|
||||
else
|
||||
condition += "!"
|
||||
|
||||
@@ -152,7 +156,7 @@
|
||||
/datum/wound/burn/get_scanner_description(mob/user)
|
||||
if(strikes_to_lose_limb == 0)
|
||||
var/oopsie = "Type: [name]\nSeverity: [severity_text()]"
|
||||
oopsie += "<div class='ml-3'>Infection Level: <span class='deadsay'>The infection is total. The bodypart is lost. Amputate or augment limb immediately.</span></div>"
|
||||
oopsie += "<div class='ml-3'>Infection Level: <span class='deadsay'>The bodypart has suffered complete sepsis and must be removed. Amputate or augment limb immediately.</span></div>"
|
||||
return oopsie
|
||||
|
||||
. = ..()
|
||||
@@ -174,15 +178,15 @@
|
||||
. += "\tSurgical debridement, antiobiotics/sterilizers, or regenerative mesh will rid infection. Paramedic UV penlights are also effective.\n"
|
||||
|
||||
if(flesh_damage > 0)
|
||||
. += "Flesh damage detected: Please apply ointment or regenerative mesh to allow recovery.\n"
|
||||
. += "Flesh damage detected: Application of ointment, regenerative mesh, Synthflesh, or ingestion of \"Miner's Salve\" will repair damaged flesh. Good nutrition, rest, and keeping the wound clean can also slowly repair flesh.\n"
|
||||
. += "</div>"
|
||||
|
||||
/*
|
||||
new burn common procs
|
||||
*/
|
||||
|
||||
/// if someone is using ointment on our burns
|
||||
/datum/wound/burn/proc/ointment(obj/item/stack/medical/ointment/I, mob/user)
|
||||
/// if someone is using ointment or mesh on our burns
|
||||
/datum/wound/burn/proc/ointmentmesh(obj/item/stack/medical/I, mob/user)
|
||||
user.visible_message("<span class='notice'>[user] begins applying [I] to [victim]'s [limb.name]...</span>", "<span class='notice'>You begin applying [I] to [user == victim ? "your" : "[victim]'s"] [limb.name]...</span>")
|
||||
if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
return
|
||||
@@ -198,26 +202,6 @@
|
||||
else
|
||||
try_treating(I, user)
|
||||
|
||||
/// if someone is using mesh on our burns
|
||||
/datum/wound/burn/proc/mesh(obj/item/stack/medical/mesh/I, mob/user)
|
||||
if(!I.is_open)
|
||||
to_chat(user, "<span class='warning'>You need to open [I] first.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] begins wrapping [victim]'s [limb.name] with [I]...</span>", "<span class='notice'>You begin wrapping [user == victim ? "your" : "[victim]'s"] [limb.name] with [I]...</span>")
|
||||
if(!do_after(user, (user == victim ? I.self_delay : I.other_delay), target=victim, extra_checks = CALLBACK(src, .proc/still_exists)))
|
||||
return
|
||||
|
||||
limb.heal_damage(I.heal_brute, I.heal_burn)
|
||||
user.visible_message("<span class='green'>[user] applies [I] to [victim].</span>", "<span class='green'>You apply [I] to [user == victim ? "your" : "[victim]'s"] [limb.name].</span>")
|
||||
I.use(1)
|
||||
sanitization += I.sanitization
|
||||
flesh_healing += I.flesh_regeneration
|
||||
|
||||
if(sanitization >= infestation && flesh_healing > flesh_damage)
|
||||
to_chat(user, "<span class='notice'>You've done all you can with [I], now you must wait for the flesh on [victim]'s [limb.name] to recover.</span>")
|
||||
else
|
||||
try_treating(I, user)
|
||||
|
||||
/// Paramedic UV penlights
|
||||
/datum/wound/burn/proc/uv(obj/item/flashlight/pen/paramedic/I, mob/user)
|
||||
if(!COOLDOWN_FINISHED(I, uv_cooldown))
|
||||
@@ -233,9 +217,13 @@
|
||||
|
||||
/datum/wound/burn/treat(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/stack/medical/ointment))
|
||||
ointment(I, user)
|
||||
ointmentmesh(I, user)
|
||||
else if(istype(I, /obj/item/stack/medical/mesh))
|
||||
mesh(I, user)
|
||||
var/obj/item/stack/medical/mesh/mesh_check = I
|
||||
if(!mesh_check.is_open)
|
||||
to_chat(user, "<span class='warning'>You need to open [mesh_check] first.</span>")
|
||||
return
|
||||
ointmentmesh(mesh_check, user)
|
||||
else if(istype(I, /obj/item/flashlight/pen/paramedic))
|
||||
uv(I, user)
|
||||
|
||||
@@ -281,7 +269,7 @@
|
||||
threshold_penalty = 40
|
||||
status_effect_type = /datum/status_effect/wound/burn/severe
|
||||
treatable_by = list(/obj/item/flashlight/pen/paramedic, /obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh)
|
||||
infestation_rate = 0.05 // appx 13 minutes to reach sepsis without any treatment
|
||||
infestation_rate = 0.07 // appx 9 minutes to reach sepsis without any treatment
|
||||
flesh_damage = 12.5
|
||||
scar_keyword = "burnsevere"
|
||||
|
||||
|
||||
@@ -49,6 +49,13 @@
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(victim.loc, victim.dir)
|
||||
victim.add_splatter_floor(get_step(victim.loc, victim.dir))
|
||||
|
||||
/datum/wound/pierce/get_bleed_rate_of_change()
|
||||
if(HAS_TRAIT(victim, TRAIT_BLOODY_MESS))
|
||||
return BLOOD_FLOW_INCREASING
|
||||
if(limb.current_gauze)
|
||||
return BLOOD_FLOW_DECREASING
|
||||
return BLOOD_FLOW_STEADY
|
||||
|
||||
/datum/wound/pierce/handle_process()
|
||||
blood_flow = min(blood_flow, WOUND_SLASH_MAX_BLOODFLOW)
|
||||
|
||||
@@ -57,8 +64,8 @@
|
||||
if(prob(5))
|
||||
to_chat(victim, "<span class='notice'>You feel the [lowertext(name)] in your [limb.name] firming up from the cold!</span>")
|
||||
|
||||
if(victim.reagents.has_reagent(/datum/reagent/toxin/heparin))
|
||||
blood_flow += 0.5 // old herapin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
|
||||
if(HAS_TRAIT(victim, TRAIT_BLOODY_MESS))
|
||||
blood_flow += 0.5 // old heparin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
|
||||
|
||||
if(limb.current_gauze)
|
||||
blood_flow -= limb.current_gauze.absorption_rate * gauzed_clot_rate
|
||||
|
||||
@@ -18,14 +18,12 @@
|
||||
var/initial_flow
|
||||
/// When we have less than this amount of flow, either from treatment or clotting, we demote to a lower cut or are healed of the wound
|
||||
var/minimum_flow
|
||||
/// How fast our blood flow will naturally decrease per tick, not only do larger cuts bleed more faster, they clot slower
|
||||
/// How much our blood_flow will naturally decrease per tick, not only do larger cuts bleed more blood faster, they clot slower (higher number = clot quicker, negative = opening up)
|
||||
var/clot_rate
|
||||
|
||||
/// Once the blood flow drops below minimum_flow, we demote it to this type of wound. If there's none, we're all better
|
||||
var/demotes_to
|
||||
|
||||
/// How much staunching per type (cautery, suturing, bandaging) you can have before that type is no longer effective for this cut NOT IMPLEMENTED
|
||||
var/max_per_type
|
||||
/// The maximum flow we've had so far
|
||||
var/highest_flow
|
||||
|
||||
@@ -84,6 +82,14 @@
|
||||
|
||||
return bleed_amt
|
||||
|
||||
/datum/wound/slash/get_bleed_rate_of_change()
|
||||
if(HAS_TRAIT(victim, TRAIT_BLOODY_MESS))
|
||||
return BLOOD_FLOW_INCREASING
|
||||
if(limb.current_gauze || clot_rate > 0)
|
||||
return BLOOD_FLOW_DECREASING
|
||||
if(clot_rate < 0)
|
||||
return BLOOD_FLOW_INCREASING
|
||||
|
||||
/datum/wound/slash/handle_process()
|
||||
if(victim.stat == DEAD)
|
||||
blood_flow -= max(clot_rate, WOUND_SLASH_DEAD_CLOT_MIN)
|
||||
@@ -96,8 +102,8 @@
|
||||
|
||||
blood_flow = min(blood_flow, WOUND_SLASH_MAX_BLOODFLOW)
|
||||
|
||||
if(victim.reagents.has_reagent(/datum/reagent/toxin/heparin))
|
||||
blood_flow += 0.5 // old herapin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
|
||||
if(HAS_TRAIT(victim, TRAIT_BLOODY_MESS))
|
||||
blood_flow += 0.5 // old heparin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first
|
||||
|
||||
if(limb.current_gauze)
|
||||
if(clot_rate > 0)
|
||||
@@ -254,7 +260,6 @@
|
||||
severity = WOUND_SEVERITY_MODERATE
|
||||
initial_flow = 2
|
||||
minimum_flow = 0.5
|
||||
max_per_type = 3
|
||||
clot_rate = 0.12
|
||||
threshold_minimum = 20
|
||||
threshold_penalty = 10
|
||||
@@ -272,7 +277,6 @@
|
||||
initial_flow = 3.25
|
||||
minimum_flow = 2.75
|
||||
clot_rate = 0.06
|
||||
max_per_type = 4
|
||||
threshold_minimum = 50
|
||||
threshold_penalty = 25
|
||||
demotes_to = /datum/wound/slash/moderate
|
||||
@@ -290,7 +294,6 @@
|
||||
initial_flow = 4.25
|
||||
minimum_flow = 4
|
||||
clot_rate = -0.05 // critical cuts actively get worse instead of better
|
||||
max_per_type = 5
|
||||
threshold_minimum = 80
|
||||
threshold_penalty = 40
|
||||
demotes_to = /datum/wound/slash/severe
|
||||
|
||||
Reference in New Issue
Block a user