Cryo can only heal burn wounds (#19418)

* Update cryo.dm

* only burns

* does stuff
This commit is contained in:
SapphicOverload
2023-07-10 18:56:45 -04:00
committed by GitHub
parent cc50a0b861
commit a95d37cee3
4 changed files with 17 additions and 11 deletions

View File

@@ -116,6 +116,8 @@ GLOBAL_LIST_INIT(global_all_wound_types, list(/datum/wound/blunt/critical, /datu
#define MANGLES_BONE (1<<3)
/// If this wound marks the limb as being allowed to have gauze applied
#define ACCEPTS_GAUZE (1<<4)
/// If this wound can be healed by cryoxadone
#define ACCEPTS_CRYO (1<<5)
// ~scar persistence defines
// The following are the order placements for persistent scar save formats

View File

@@ -324,6 +324,8 @@
/// 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
/datum/wound/proc/on_xadone(power)
if(!(wound_flags & ACCEPTS_CRYO))
return
cryo_progress += power
if(cryo_progress > 66 * severity)
qdel(src)

View File

@@ -10,7 +10,7 @@
wound_type = WOUND_BURN
processes = TRUE
sound_effect = 'sound/effects/wounds/sizzle1.ogg'
wound_flags = (FLESH_WOUND | ACCEPTS_GAUZE)
wound_flags = (FLESH_WOUND | ACCEPTS_GAUZE | ACCEPTS_CRYO)
treatable_by = list(/obj/item/stack/medical/ointment, /obj/item/stack/medical/mesh) // sterilizer and alcohol will require reagent treatments, coming soon

View File

@@ -209,16 +209,18 @@
robotic_limb_damage += limb.get_damage(stamina=FALSE)
if(mob_occupant.health >= mob_occupant.getMaxHealth() - robotic_limb_damage) // Don't bother with fully healed people. Now takes robotic limbs into account.
if(C)
if(C.all_wounds)
var/has_cryo_wound = FALSE
if(C && C.all_wounds)
for(var/datum/wound/wound as anything in C.all_wounds)
if(wound.wound_flags & ACCEPTS_CRYO)
if(!treating_wounds) // if we have wounds and haven't already alerted the doctors we're only dealing with the wounds, let them know
treating_wounds = TRUE
playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors.
var/msg = "Patient vitals fully recovered, continuing automated wound treatment."
var/msg = "Patient vitals fully recovered, continuing automated burn treatment."
radio.talk_into(src, msg, radio_channel)
else // otherwise if we were only treating wounds and now we don't have any, turn off treating_wounds so we can boot 'em out
treating_wounds = FALSE
has_cryo_wound = TRUE
break
treating_wounds = has_cryo_wound
if(!treating_wounds)
on = FALSE
update_icon()