From ec8a35d544b0223f31146a7a7f13807f58c62dc8 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Mon, 9 Mar 2015 19:40:43 +0100 Subject: [PATCH] Pool fixes, sanity checks. Updates pool code so that it doesn't affect ghosts, AI eyes, and silicone, also changes the message to only display on prob(50), to cut down on the message spam --- code/game/machinery/poolcontroller.dm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index 937629589ed..b4131a8437d 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -90,6 +90,14 @@ /obj/machinery/poolcontroller/proc/updateMobs() for(var/turf/simulated/floor/beach/water/W in linkedturfs) //Check for pool-turfs linked to the controller. for(var/mob/M in W) //Check for mobs in the linked pool-turfs. + //Sanity checks, don't affect robuts, AI eyes, and observers + if(isAIEye(M)) + return + if(issilicon(M)) + return + if(isobserver(M)) + return + //End sanity checks, go on switch(temperature) //Apply different effects based on what the temperature is set to. if("scalding") //Burn the mob. M.bodytemperature = min(500, M.bodytemperature + 35) //heat mob at 35k(elvin) per cycle @@ -106,12 +114,14 @@ if("warm") //Gently warm the mob. M.bodytemperature = min(330, M.bodytemperature + 10) //Heats up mobs to just over normal, not enough to burn - M << "The water is quite warm." //Inform the mob it's warm water. + if(prob(50)) //inform the mob of warm water half the time + M << "The water is quite warm." //Inform the mob it's warm water. return if("cool") //Gently cool the mob. M.bodytemperature = max(290, M.bodytemperature - 10) //Cools mobs to just below normal, not enough to burn - M << "The water is chilly." //Inform the mob it's chilly water. + if(prob(50)) //inform the mob of cold water half the time + M << "The water is chilly." //Inform the mob it's chilly water. return /obj/machinery/poolcontroller/proc/miston() //Spawn /obj/effect/mist (from the shower) on all linked pool tiles