mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
burn wounds, for real this time (#20542)
* burn wounds * user feedback * ready for review * sean review * Apply suggestions from code review Co-authored-by: Farie82 <farie82@users.noreply.github.com> * surgery fix * other repair methods * GDN review * health scanner feedback * Update code/game/objects/items/devices/scanners.dm Co-authored-by: Nathan Winters <100448493+CinnamonSnowball@users.noreply.github.com> * bodyscanner print out * Update code/game/machinery/adv_med.dm --------- Co-authored-by: Farie82 <farie82@users.noreply.github.com> Co-authored-by: Nathan Winters <100448493+CinnamonSnowball@users.noreply.github.com>
This commit is contained in:
co-authored by
Farie82
Nathan Winters
parent
7293b7ecbd
commit
e6085895c1
@@ -304,6 +304,7 @@
|
||||
if(prob(25))
|
||||
E.mend_fracture()
|
||||
E.fix_internal_bleeding()
|
||||
E.fix_burn_wound()
|
||||
|
||||
return
|
||||
if(H.stat != DEAD)
|
||||
|
||||
@@ -318,16 +318,19 @@
|
||||
status = "battered"
|
||||
if(40 to INFINITY)
|
||||
status = "mangled"
|
||||
if(brutedamage > 0 && burndamage > 0)
|
||||
if(brutedamage > 0 && (burndamage > 0 || LB.status & ORGAN_BURNT))
|
||||
status += " and "
|
||||
|
||||
switch(burndamage)
|
||||
if(0.1 to 10)
|
||||
status += "numb"
|
||||
if(10 to 40)
|
||||
status += "blistered"
|
||||
if(40 to INFINITY)
|
||||
status += "peeling away"
|
||||
if(LB.status & ORGAN_BURNT)
|
||||
status += "critically burnt"
|
||||
else
|
||||
switch(burndamage)
|
||||
if(0.1 to 10)
|
||||
status += "numb"
|
||||
if(10 to 40)
|
||||
status += "blistered"
|
||||
if(40 to INFINITY)
|
||||
status += "peeling away"
|
||||
|
||||
if(LB.status & ORGAN_MUTATED)
|
||||
status = "weirdly shapen"
|
||||
|
||||
@@ -5,17 +5,13 @@
|
||||
set_stat(CONSCIOUS)
|
||||
return
|
||||
|
||||
var/total_burn = 0
|
||||
var/total_brute = 0
|
||||
var/total_limb_damage = 0
|
||||
|
||||
for(var/obj/item/organ/external/O in bodyparts) //hardcoded to streamline things a bit
|
||||
total_brute += O.brute_dam //calculates health based on organ brute and burn
|
||||
total_burn += O.burn_dam
|
||||
for(var/obj/item/organ/external/O in bodyparts) /// sums up all the damage of all the limbs
|
||||
total_limb_damage += O.get_damage()
|
||||
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_limb_damage
|
||||
|
||||
if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD * 2) && stat == DEAD)
|
||||
become_husk(BURN)
|
||||
update_stat("updatehealth([reason])")
|
||||
med_hud_set_health()
|
||||
|
||||
@@ -102,6 +98,9 @@
|
||||
take_overall_damage(0, amount, updating_health, used_weapon = damage_source)
|
||||
else
|
||||
heal_overall_damage(0, -amount, updating_health, FALSE, robotic)
|
||||
|
||||
if(((maxHealth - getFireLoss()) < HEALTH_THRESHOLD_DEAD * 2) && stat == DEAD)
|
||||
become_husk(BURN)
|
||||
// brainless default for now
|
||||
return STATUS_UPDATE_HEALTH
|
||||
|
||||
|
||||
@@ -187,6 +187,9 @@
|
||||
else if(!E.properly_attached)
|
||||
wound_flavor_text["[E.limb_name]"] = "[p_their(TRUE)] [E.name] is barely attached!\n"
|
||||
|
||||
else if(E.status & ORGAN_BURNT)
|
||||
wound_flavor_text["[E.limb_name]"] = "[p_their(TRUE)] [E.name] is badly burnt!\n"
|
||||
|
||||
if(E.open)
|
||||
if(E.is_robotic())
|
||||
msg += "<b>The maintenance hatch on [p_their()] [ignore_limb_branding(E.limb_name)] is open!</b>\n"
|
||||
|
||||
@@ -686,7 +686,7 @@
|
||||
// Use the dead health doll as the base, since we have proper "healthy" overlays now
|
||||
healthdoll.icon_state = "healthdoll_DEAD"
|
||||
for(var/obj/item/organ/external/O in bodyparts)
|
||||
var/damage = O.burn_dam + O.brute_dam
|
||||
var/damage = O.get_damage()
|
||||
var/comparison = (O.max_damage/5)
|
||||
var/icon_num = 0
|
||||
if(damage)
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
var/obj/item/organ/internal/I = pick(E.internal_organs)
|
||||
custom_pain("You feel broken bones moving in your [E.name]!")
|
||||
I.receive_damage(rand(3,5))
|
||||
if((E.status & ORGAN_BURNT) && !(E.status & ORGAN_SALVED))
|
||||
custom_pain("You feel the skin sloughing off the burn on your [E.name]!")
|
||||
E.germ_level++
|
||||
|
||||
|
||||
//handle_stance()
|
||||
handle_grasp()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icobase = 'icons/mob/human_races/r_golem.dmi'
|
||||
|
||||
species_traits = list(NO_BLOOD, NO_HAIR, NOT_SELECTABLE)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT, TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_NOFIRE, TRAIT_CHUNKYFINGERS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS, TRAIT_XENO_IMMUNE)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT, TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_NOFIRE, TRAIT_CHUNKYFINGERS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS, TRAIT_XENO_IMMUNE, TRAIT_BURN_WOUND_IMMUNE)
|
||||
inherent_biotypes = MOB_HUMANOID | MOB_MINERAL
|
||||
dies_at_threshold = TRUE
|
||||
speed_mod = 2
|
||||
@@ -111,7 +111,7 @@
|
||||
name = "Plasma Golem"
|
||||
skinned_type = /obj/item/stack/ore/plasma
|
||||
//Can burn and takes damage from heat
|
||||
inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_CHUNKYFINGERS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS) //no RESISTHEAT, NOFIRE
|
||||
inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_CHUNKYFINGERS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS, TRAIT_BURN_WOUND_IMMUNE) //no RESISTHEAT, NOFIRE
|
||||
golem_colour = rgb(170, 51, 221)
|
||||
info_text = "As a <span class='danger'>Plasma Golem</span>, you burn easily. Be careful, if you get hot enough while burning, you'll blow up!"
|
||||
heatmod = 0 //fine until they blow up
|
||||
@@ -288,7 +288,7 @@
|
||||
golem_colour = rgb(158, 112, 75)
|
||||
skinned_type = /obj/item/stack/sheet/wood
|
||||
//Can burn and take damage from heat
|
||||
inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_CHUNKYFINGERS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS)
|
||||
inherent_traits = list(TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_CHUNKYFINGERS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS, TRAIT_BURN_WOUND_IMMUNE)
|
||||
inherent_biotypes = MOB_ORGANIC | MOB_HUMANOID | MOB_PLANT
|
||||
armor = 30
|
||||
burn_mod = 1.25
|
||||
@@ -559,7 +559,7 @@
|
||||
prefix = "Bananium"
|
||||
special_names = null
|
||||
unarmed_type = /datum/unarmed_attack/golem/bananium
|
||||
inherent_traits = list(TRAIT_RESISTHEAT, TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_NOFIRE, TRAIT_CHUNKYFINGERS, TRAIT_CLUMSY, TRAIT_COMIC_SANS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT, TRAIT_NOBREATH, TRAIT_RESISTCOLD, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_NOFIRE, TRAIT_CHUNKYFINGERS, TRAIT_CLUMSY, TRAIT_COMIC_SANS, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_NOPAIN, TRAIT_NO_BONES, TRAIT_STURDY_LIMBS, TRAIT_BURN_WOUND_IMMUNE)
|
||||
var/last_honk = 0
|
||||
var/honkooldown = 0
|
||||
var/last_banana = 0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//language = "Clatter"
|
||||
|
||||
species_traits = list(NO_BLOOD, NO_HAIR)
|
||||
inherent_traits = list(TRAIT_RADIMMUNE, TRAIT_NOHUNGER)
|
||||
inherent_traits = list(TRAIT_RADIMMUNE, TRAIT_NOHUNGER, TRAIT_BURN_WOUND_IMMUNE)
|
||||
inherent_biotypes = MOB_HUMANOID | MOB_MINERAL
|
||||
forced_heartattack = TRUE // Plasmamen have no blood, but they should still get heart-attacks
|
||||
skinned_type = /obj/item/stack/sheet/mineral/plasma // We're low on plasma, R&D! *eyes plasmaman co-worker intently*
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
for(var/obj/item/organ/external/E in H.bodyparts)
|
||||
E.mend_fracture()
|
||||
E.fix_internal_bleeding()
|
||||
E.fix_burn_wound(update_health = FALSE)
|
||||
M.SetEyeBlind(0)
|
||||
M.cure_nearsighted(null, FALSE)
|
||||
M.cure_blind(null, FALSE)
|
||||
|
||||
@@ -1310,7 +1310,7 @@
|
||||
else
|
||||
for(var/obj/item/organ/external/E in M.bodyparts)
|
||||
if(prob(25)) // Each tick has a 25% chance of repearing a bone.
|
||||
if(E.status & (ORGAN_INT_BLEEDING | ORGAN_BROKEN | ORGAN_SPLINTED)) //I can't just check for !E.status
|
||||
if(E.status & (ORGAN_INT_BLEEDING | ORGAN_BROKEN | ORGAN_SPLINTED | ORGAN_BURNT)) //I can't just check for !E.status
|
||||
to_chat(M, "<span class='notice'>You feel a burning sensation in your [E.name] as it straightens involuntarily!</span>")
|
||||
E.rejuvenate() //Repair it completely.
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
if(!owner)
|
||||
if(!owner || ((status & ORGAN_BURNT) && !(status & ORGAN_SALVED)))
|
||||
if(is_preserved())
|
||||
return
|
||||
// Maybe scale it down a bit, have it REALLY kick in once past the basic infection threshold
|
||||
|
||||
@@ -146,6 +146,8 @@
|
||||
if(HAS_TRAIT(owner, TRAIT_STURDY_LIMBS))
|
||||
limb_flags |= CANNOT_DISMEMBER
|
||||
|
||||
if(HAS_TRAIT(owner, TRAIT_BURN_WOUND_IMMUNE))
|
||||
limb_flags |= CANNOT_BURN
|
||||
|
||||
/obj/item/organ/external/replaced(mob/living/carbon/human/target)
|
||||
owner = target
|
||||
@@ -191,6 +193,8 @@
|
||||
|
||||
// See if bones need to break
|
||||
check_fracture(brute)
|
||||
// see if we need to inflict severe burns
|
||||
check_for_burn_wound(burn)
|
||||
// Threshold needed to have a chance of hurting internal bits with something sharp
|
||||
#define LIMB_SHARP_THRESH_INT_DMG 5
|
||||
// Threshold needed to have a chance of hurting internal bits
|
||||
@@ -364,9 +368,6 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(trace_chemicals[chemID] <= 0)
|
||||
trace_chemicals.Remove(chemID)
|
||||
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
perma_injury = 0
|
||||
|
||||
if(..())
|
||||
if(owner.germ_level > germ_level && infection_check())
|
||||
//Open wounds can become infected
|
||||
@@ -447,6 +448,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(damage > 15 && local_damage > 30 && prob(damage))
|
||||
cause_internal_bleeding()
|
||||
|
||||
/obj/item/organ/external/proc/check_for_burn_wound(damage)
|
||||
if(is_robotic())
|
||||
return
|
||||
if(burn_dam >= min_broken_damage && prob(damage * max(owner.bodytemperature / BODYTEMP_HEAT_DAMAGE_LIMIT, 1)))
|
||||
cause_burn_wound()
|
||||
|
||||
// new damage icon system
|
||||
// returns just the brute/burn damage code
|
||||
/obj/item/organ/external/proc/damage_state_text()
|
||||
@@ -657,7 +664,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken", "fracture", "hairline fracture")
|
||||
perma_injury = brute_dam
|
||||
|
||||
// Fractures have a chance of getting you out of restraints
|
||||
if(prob(25))
|
||||
@@ -672,7 +678,6 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
status &= ~ORGAN_BROKEN
|
||||
status &= ~ORGAN_SPLINTED
|
||||
perma_injury = 0
|
||||
if(owner)
|
||||
owner.handle_splints()
|
||||
return TRUE
|
||||
@@ -689,7 +694,18 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(is_robotic())
|
||||
return
|
||||
status &= ~ORGAN_INT_BLEEDING
|
||||
perma_injury = 0
|
||||
|
||||
/obj/item/organ/external/proc/cause_burn_wound()
|
||||
if(is_robotic() || (limb_flags & CANNOT_BURN) || (status & ORGAN_BURNT))
|
||||
return
|
||||
status |= ORGAN_BURNT
|
||||
perma_injury = min_broken_damage
|
||||
|
||||
/obj/item/organ/external/proc/fix_burn_wound(update_health = TRUE)
|
||||
status &= ~ORGAN_BURNT
|
||||
perma_injury = max(perma_injury - min_broken_damage, 0)
|
||||
if(update_health)
|
||||
owner.updatehealth("burn wound")
|
||||
|
||||
/obj/item/organ/external/robotize(company, make_tough = FALSE, convert_all = TRUE)
|
||||
..()
|
||||
@@ -733,7 +749,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
status &= ~ORGAN_MUTATED
|
||||
|
||||
/obj/item/organ/external/proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
|
||||
return max(brute_dam + burn_dam, perma_injury)
|
||||
|
||||
/obj/item/organ/external/proc/has_infected_wound()
|
||||
if(germ_level > INFECTION_LEVEL_ONE)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/obj/item/organ/external/affected = target.get_organ(user.zone_selected)
|
||||
if(!(affected.status & ORGAN_DEAD))
|
||||
if(!(affected.status & ORGAN_DEAD) && !(affected.status & ORGAN_BURNT))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
|
||||
if(!(affected.status & ORGAN_DEAD))
|
||||
if(!(affected.status & ORGAN_DEAD) && !(affected.status & ORGAN_BURNT))
|
||||
to_chat(user, "<span class='warning'>The [affected] seems to already be in fine condition!")
|
||||
return SURGERY_BEGINSTEP_SKIP
|
||||
|
||||
@@ -200,6 +200,7 @@
|
||||
|
||||
if(mitocholide)
|
||||
affected.status &= ~ORGAN_DEAD
|
||||
affected.fix_burn_wound()
|
||||
affected.germ_level = 0
|
||||
target.update_body()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user