From bf6e5c257c2aed895136da7cb79476dfaf874017 Mon Sep 17 00:00:00 2001 From: Pinta <68373373+softcerv@users.noreply.github.com> Date: Sun, 19 Jun 2022 13:10:59 -0400 Subject: [PATCH] the deed is done. (#14385) --- code/game/objects/structures/tables_racks.dm | 24 +---------- .../game/objects/structures/tables_racks.dm | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index a78a22968ee..3dcb7ca0934 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -676,8 +676,8 @@ */ /obj/structure/table/optable//SKYRAT EDIT - ICON OVERRIDEN BY AESTHETICS - SEE MODULE - name = "stasis operating table" // SKYRAT EDIT name = "operating table" - desc = "Used for advanced medical procedures. Now comes with built in stasis technology, patented by Cinco: A Family Company!" // SKYRAT EDIT desc = "Used for advanced medical procedures." + name = "operating table" + desc = "Used for advanced medical procedures." icon = 'icons/obj/surgery.dmi' icon_state = "optable" buildstack = /obj/item/stack/sheet/mineral/silver @@ -737,26 +737,6 @@ return TRUE return FALSE -///SKYRAT EDIT: Operating Tables now provide Stasis -/obj/structure/table/optable/proc/chill_out(mob/living/target) - var/freq = rand(24750, 26550) - playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 2, frequency = freq) - target.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) - ADD_TRAIT(target, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC) - target.extinguish_mob() - -/obj/structure/table/optable/proc/thaw_them(mob/living/target) - target.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) - REMOVE_TRAIT(target, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC) - -/obj/structure/table/optable/post_buckle_mob(mob/living/L) - set_patient(L) - chill_out(L) - -/obj/structure/table/optable/post_unbuckle_mob(mob/living/L) - set_patient(null) - thaw_them(L) -///SKYRAT EDIT END /* * Racks */ diff --git a/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm b/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm index 12a9293064e..d4b291763d8 100644 --- a/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm +++ b/modular_skyrat/master_files/code/game/objects/structures/tables_racks.dm @@ -3,3 +3,44 @@ if(!in_range(src, user)) return return attack_hand(user, modifiers) + +//Most of this is code that allows stasis and numbing to work on surgery tables. +/obj/structure/table/optable + /// Is the table able to put patients in stasis? + var/stasis_capable = FALSE + /// Is the Operating table able to preform numbing? + var/numbing_capable = TRUE + /// Is the patient already numbed? + +/// Used to numb a patient and apply stasis to them if enabled. +/obj/structure/table/optable/proc/chill_out(mob/living/target) + var/freq = rand(24750, 26550) + playsound(src, 'sound/effects/spray.ogg', 5, TRUE, 2, frequency = freq) + + if(stasis_capable) + target.apply_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) //Numbing is covered by this. + target.extinguish_mob() + ADD_TRAIT(target, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC) + return + + // If stasis isn't an option, only numbing is applied + ADD_TRAIT(target, TRAIT_NUMBED, src) + +///Used to remove the effects of stasis and numbing when a patient is unbuckled +/obj/structure/table/optable/proc/thaw_them(mob/living/target) + if(stasis_capable) + target.remove_status_effect(/datum/status_effect/grouped/stasis, STASIS_MACHINE_EFFECT) + REMOVE_TRAIT(target, TRAIT_TUMOR_SUPPRESSED, TRAIT_GENERIC) + return + + REMOVE_TRAIT(target, TRAIT_NUMBED, src) + +/obj/structure/table/optable/post_buckle_mob(mob/living/patient) + set_patient(patient) + if(numbing_capable) + chill_out(patient) + +/obj/structure/table/optable/post_unbuckle_mob(mob/living/patient) + set_patient(null) + if(numbing_capable) + thaw_them(patient)