From bb38c9d38de27446eab2ec6702cdd93308bc2f97 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Fri, 25 Feb 2022 12:54:45 -0600 Subject: [PATCH 1/3] Some fixes for pools --- code/modules/pool/pool.dm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm index 0677154e877b..25acae2637c5 100644 --- a/code/modules/pool/pool.dm +++ b/code/modules/pool/pool.dm @@ -133,6 +133,8 @@ Place a pool filter somewhere in the pool if you want people to be able to modif var/obj/item/clothing/CS = F.wear_suit if (CS.clothing_flags & THICKMATERIAL) zap -- + if(zap > 0) + zap = 3 - zap // 1 is higher severity emp than 2 if(zap > 0) user.emp_act(zap) user.emote("scream") //Chad coders use M.say("*scream") @@ -197,6 +199,7 @@ GLOBAL_LIST_EMPTY(pool_filters) var/desired_temperature = 300 //Room temperature var/current_temperature = 300 //current temp var/preset_reagent_type = null //Set this if you want your pump to start filled with a given reagent. SKEWIUM POOL SKEWIUM POOL! + var/temp_rate = 0.5 /obj/machinery/pool_filter/examine(mob/user) . = ..() @@ -237,9 +240,13 @@ GLOBAL_LIST_EMPTY(pool_filters) if(!LAZYLEN(pool) || !is_operational()) return //No use having one of these processing for no reason is there? use_power(idle_power_usage) - var/delta = (current_temperature > desired_temperature) ? -0.5 : 0.5 - current_temperature += delta - current_temperature = clamp(current_temperature, T0C, desired_temperature) + if (current_temperature > desired_temperature) + current_temperature -= temp_rate + current_temperature = max(desired_temperature, current_temperature) + else if (current_temperature < desired_temperature) + current_temperature += temp_rate + current_temperature = min(desired_temperature, current_temperature) + var/trans_amount = reagents.total_volume / pool.len //Split up the reagents equally. for(var/turf/open/indestructible/sound/pool/water as() in pool) if(reagents.reagent_list.len) From aa6cffeb77a1db535a717845c17a706467ec15d4 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Fri, 25 Feb 2022 13:00:00 -0600 Subject: [PATCH 2/3] Fixes pools damaging heat resistant people and breaking thermodynamics --- code/modules/pool/pool.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm index 25acae2637c5..22d541c58f35 100644 --- a/code/modules/pool/pool.dm +++ b/code/modules/pool/pool.dm @@ -270,12 +270,13 @@ GLOBAL_LIST_EMPTY(pool_filters) var/mob/living/carbon/C = M if(current_temperature <= 283.5) //Colder than 10 degrees is going to make you very cold if(iscarbon(M)) - C.adjust_bodytemperature(-80, 80) + C.adjust_bodytemperature(-80, current_temperature) to_chat(M, "The water is freezing cold!") else if(current_temperature >= 308.5) //Hotter than 35 celsius is going to make you burn up if(iscarbon(M)) - C.adjust_bodytemperature(35, 0, 500) - M.adjustFireLoss(5) + C.adjust_bodytemperature(35, 0, current_temperature) + if(!HAS_TRAIT(L, TRAIT_RESISTHEAT)) + L.adjustFireLoss(5) to_chat(M, "The water is searing hot!") /obj/structure/pool_ladder/attack_hand(mob/user) From 7a3981f1d901998a0042ca3e4180826693018693 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Fri, 25 Feb 2022 14:08:23 -0600 Subject: [PATCH 3/3] Copy and paste bad --- code/modules/pool/pool.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/pool/pool.dm b/code/modules/pool/pool.dm index 22d541c58f35..64e8cf80c994 100644 --- a/code/modules/pool/pool.dm +++ b/code/modules/pool/pool.dm @@ -275,8 +275,8 @@ GLOBAL_LIST_EMPTY(pool_filters) else if(current_temperature >= 308.5) //Hotter than 35 celsius is going to make you burn up if(iscarbon(M)) C.adjust_bodytemperature(35, 0, current_temperature) - if(!HAS_TRAIT(L, TRAIT_RESISTHEAT)) - L.adjustFireLoss(5) + if(!HAS_TRAIT(C, TRAIT_RESISTHEAT)) + C.adjustFireLoss(5) to_chat(M, "The water is searing hot!") /obj/structure/pool_ladder/attack_hand(mob/user)