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:
Charlie
2023-04-14 15:58:38 +02:00
committed by GitHub
co-authored by Farie82 Nathan Winters
parent 7293b7ecbd
commit e6085895c1
22 changed files with 107 additions and 47 deletions
+11 -8
View File
@@ -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*