From 5f356787fe804bcfe0f2210d13b027efdc5ae5a7 Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Mon, 11 Mar 2024 23:09:56 +0300 Subject: [PATCH] Update watercloset.dm --- code/game/objects/structures/watercloset.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index fd15b428e9..3f87f2c31a 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -212,7 +212,8 @@ var/watertemp = "normal" //freezing, normal, or boiling var/mobpresent = 0 //true if there is a mob on the shower's loc, this is to ease process() var/is_washing = 0 - var/last_sound = 0 + + COOLDOWN_DECLARE(last_sound) /obj/structure/machinery/shower/Initialize() . = ..() @@ -380,8 +381,9 @@ /obj/structure/machinery/shower/process() if(!on) return - if(world.time > last_sound + 80) - last_sound = world.time + + if(COOLDOWN_FINISHED(src, last_sound)) + COOLDOWN_START(src, last_sound, 8 SECONDS) playsound(src, "gurgle", 25, FALSE) wash_floor() if(!mobpresent) return