From a95d37cee382200b06bd40aa469b8f18f955c695 Mon Sep 17 00:00:00 2001 From: SapphicOverload <93578146+SapphicOverload@users.noreply.github.com> Date: Mon, 10 Jul 2023 18:56:45 -0400 Subject: [PATCH] Cryo can only heal burn wounds (#19418) * Update cryo.dm * only burns * does stuff --- code/__DEFINES/wounds.dm | 4 +++- code/datums/wounds/_wounds.dm | 2 ++ code/datums/wounds/burns.dm | 2 +- .../components/unary_devices/cryo.dm | 20 ++++++++++--------- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/code/__DEFINES/wounds.dm b/code/__DEFINES/wounds.dm index 08cb5191b830..993626c99500 100644 --- a/code/__DEFINES/wounds.dm +++ b/code/__DEFINES/wounds.dm @@ -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 @@ -150,4 +152,4 @@ GLOBAL_LIST_INIT(global_all_wound_types, list(/datum/wound/blunt/critical, /datu #define BLOOD_FLOW_INCREASING 1 /// How often can we annoy the player about their bleeding? This duration is extended if it's not serious bleeding -#define BLEEDING_MESSAGE_BASE_CD 10 SECONDS \ No newline at end of file +#define BLEEDING_MESSAGE_BASE_CD 10 SECONDS diff --git a/code/datums/wounds/_wounds.dm b/code/datums/wounds/_wounds.dm index ff76b566b175..5f72f9dc924c 100644 --- a/code/datums/wounds/_wounds.dm +++ b/code/datums/wounds/_wounds.dm @@ -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) diff --git a/code/datums/wounds/burns.dm b/code/datums/wounds/burns.dm index a01f39a23c83..984e7b462740 100644 --- a/code/datums/wounds/burns.dm +++ b/code/datums/wounds/burns.dm @@ -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 diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 457b22944185..19a3c017abca 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -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) - 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." - 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 + 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 + playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors. + var/msg = "Patient vitals fully recovered, continuing automated burn treatment." + radio.talk_into(src, msg, radio_channel) + has_cryo_wound = TRUE + break + treating_wounds = has_cryo_wound if(!treating_wounds) on = FALSE update_icon()