From 986765fecd3e9f7566dbcb4d5121ebce7c102e05 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Tue, 25 Aug 2026 17:33:17 +0000 Subject: [PATCH] Fix Showers Again (#23146) My last PR broke showers because I used the wrong start processing macro, as I discovered while working on gas canisters. This PR fixes showers so that they actually clean again. This time I've tested my PR and attached screenshots to prove it works. While I was at it, I added a simple functionality for showers to automatically turn themselves off after 5 minutes. Ostensibly so that they won't process forever after turned on. Dirty character, showers are off, 4943 processing machines. image Shower turned on, 4944 processing machines. image Character steps into shower, and is cleaned. image verifying shut off time is set. image --- code/game/objects/structures/watercloset.dm | 10 +++++++++- html/changelogs/hellfirejag-fix-showers.yml | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/hellfirejag-fix-showers.yml diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 3afa61428a0..03b1b5071c8 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -143,6 +143,10 @@ var/is_washing = 0 var/list/temperature_settings = list("normal" = 310, "boiling" = T0C+100, "freezing" = T0C) var/datum/looping_sound/showering/soundloop + /// The amount of time a shower will stay on before shutting itself off. + var/leave_on_time = 5 MINUTES + /// The REALTIMEOFDAY at which a shower will turn itself off. + VAR_PRIVATE/shut_off_time = 0 /obj/structure/shower/mechanics_hints(mob/user, distance, is_adjacent) . += ..() @@ -179,7 +183,8 @@ on = !on update_icon() if(on) - START_PROCESSING(SSmachinery, src) + shut_off_time = leave_on_time + REALTIMEOFDAY + START_PROCESSING_MACHINE(src, MACHINERY_PROCESS_SELF) if (M.loc == loc) wash(M) process_heat(M) @@ -273,6 +278,9 @@ /obj/structure/machinery/shower/process() if(!on) return PROCESS_KILL + if (REALTIMEOFDAY > shut_off_time) + on = FALSE + return PROCESS_KILL wash_floor() if(!mobpresent) return diff --git a/html/changelogs/hellfirejag-fix-showers.yml b/html/changelogs/hellfirejag-fix-showers.yml new file mode 100644 index 00000000000..c7328368390 --- /dev/null +++ b/html/changelogs/hellfirejag-fix-showers.yml @@ -0,0 +1,5 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed showers not cleaning things." + - rscadd: "Showers now turn themselves off after 5 minutes to conserve water (and CPU time)"