the deed is done. (#14385)

This commit is contained in:
Pinta
2022-06-19 10:10:59 -07:00
committed by GitHub
parent 51936d03e1
commit bf6e5c257c
2 changed files with 43 additions and 22 deletions
+2 -22
View File
@@ -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
*/
@@ -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)