From b6cbb3f50571753665d7e02c163cae53d092023f Mon Sep 17 00:00:00 2001
From: Detective Google <48196179+Detective-Google@users.noreply.github.com>
Date: Thu, 13 Feb 2020 00:12:11 -0600
Subject: [PATCH] woo yeah yeah woo
---
code/__DEFINES/components.dm | 2 --
code/modules/pool/pool_controller.dm | 51 ++++++++++++++--------------
code/modules/pool/pool_drain.dm | 4 +++
code/modules/pool/pool_main.dm | 4 ++-
4 files changed, 33 insertions(+), 28 deletions(-)
diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm
index 22e74f58be..0efd5a1f79 100644
--- a/code/__DEFINES/components.dm
+++ b/code/__DEFINES/components.dm
@@ -330,8 +330,6 @@
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
#define COMPONENT_ACTION_BLOCK_TRIGGER 1
-/*******Element signals*******/
-
/*******Non-Signal Component Related Defines*******/
//Redirection component init flags
diff --git a/code/modules/pool/pool_controller.dm b/code/modules/pool/pool_controller.dm
index 9c6d976343..a4a4980180 100644
--- a/code/modules/pool/pool_controller.dm
+++ b/code/modules/pool/pool_controller.dm
@@ -225,31 +225,32 @@
process_reagents()
/obj/machinery/pool/controller/proc/process_pool()
- if(!drained)
- for(var/mob/living/M in mobs_in_pool)
- switch(temperature) //Apply different effects based on what the temperature is set to.
- if(POOL_SCALDING) //Scalding
- M.adjust_bodytemperature(50,0,500)
- if(POOL_WARM) //Warm
- M.adjust_bodytemperature(20,0,360) //Heats up mobs till the termometer shows up
- //Normal temp does nothing, because it's just room temperature water.
- if(POOL_COOL)
- M.adjust_bodytemperature(-20,250) //Cools mobs till the termometer shows up
- if(POOL_FRIGID) //Freezing
- M.adjust_bodytemperature(-60) //cool mob at -35k per cycle, less would not affect the mob enough.
- if(M.bodytemperature <= 50 && !M.stat)
- M.apply_status_effect(/datum/status_effect/freon)
- if(ishuman(M))
- var/mob/living/carbon/human/drownee = M
- if(!drownee || drownee.stat == DEAD)
- return
- if(drownee.resting && !drownee.internal)
- if(drownee.stat != CONSCIOUS)
- drownee.adjustOxyLoss(9)
- else
- drownee.adjustOxyLoss(4)
- if(prob(35))
- to_chat(drownee, "You're drowning!")
+ if(drained)
+ return
+ for(var/mob/living/M in mobs_in_pool)
+ switch(temperature) //Apply different effects based on what the temperature is set to.
+ if(POOL_SCALDING) //Scalding
+ M.adjust_bodytemperature(50,0,500)
+ if(POOL_WARM) //Warm
+ M.adjust_bodytemperature(20,0,360) //Heats up mobs till the termometer shows up
+ //Normal temp does nothing, because it's just room temperature water.
+ if(POOL_COOL)
+ M.adjust_bodytemperature(-20,250) //Cools mobs till the termometer shows up
+ if(POOL_FRIGID) //Freezing
+ M.adjust_bodytemperature(-60) //cool mob at -35k per cycle, less would not affect the mob enough.
+ if(M.bodytemperature <= 50 && !M.stat)
+ M.apply_status_effect(/datum/status_effect/freon)
+ if(ishuman(M))
+ var/mob/living/carbon/human/drownee = M
+ if(!drownee || drownee.stat == DEAD)
+ return
+ if(drownee.resting && !drownee.internal)
+ if(drownee.stat != CONSCIOUS)
+ drownee.adjustOxyLoss(9)
+ else
+ drownee.adjustOxyLoss(4)
+ if(prob(35))
+ to_chat(drownee, "You're drowning!")
/obj/machinery/pool/controller/proc/set_bloody(state)
if(bloody == state)
diff --git a/code/modules/pool/pool_drain.dm b/code/modules/pool/pool_drain.dm
index 2fa89742c0..440cd42cff 100644
--- a/code/modules/pool/pool_drain.dm
+++ b/code/modules/pool/pool_drain.dm
@@ -116,6 +116,10 @@
for(var/i in 1 to min(duration, 100))
L.setDir(turn(L.dir, 90))
sleep(delay)
+ if(QDELETED(L))
+ break
+ if(QDELETED(src))
+ return
whirling_mobs -= L
/obj/machinery/pool/filter
diff --git a/code/modules/pool/pool_main.dm b/code/modules/pool/pool_main.dm
index 9d37bd5fd5..ca1c788c9d 100644
--- a/code/modules/pool/pool_main.dm
+++ b/code/modules/pool/pool_main.dm
@@ -15,7 +15,9 @@
update_icon()
/turf/open/pool/Destroy()
- controller = null
+ if(controller)
+ controller.linked_turfs -= src
+ controller = null
QDEL_NULL(watereffect)
QDEL_NULL(watertop)
return ..()