Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions code/modules/pool/pool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
. = ..()
Expand Down Expand Up @@ -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)
Expand All @@ -263,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, "<span class='warning'>The water is freezing cold!</span>")
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(C, TRAIT_RESISTHEAT))
C.adjustFireLoss(5)
to_chat(M, "<span class='danger'>The water is searing hot!</span>")

/obj/structure/pool_ladder/attack_hand(mob/user)
Expand Down