From c6b4eddefb625ef1ef8da45b95631071dfa1e0f8 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Thu, 21 May 2020 13:08:11 -0400 Subject: [PATCH] Fix sinks washing things at a distance --- code/game/objects/structures/watercloset.dm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 78ad49d907..27330786b1 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -387,11 +387,12 @@ playsound(src, 'sound/effects/sink_long.ogg', 75, 1) busy = 1 - sleep(40) + if(!do_after(user, 40, src)) + busy = 0 + to_chat(usr, "You stop washing your hands.") + return busy = 0 - if(!Adjacent(user)) return //Person has moved away from the sink - user.clean_blood() if(ishuman(user)) user:update_inv_gloves() @@ -443,13 +444,12 @@ to_chat(usr, "You start washing \the [I].") busy = 1 - sleep(40) + if(!do_after(user, 40, src)) + busy = 0 + to_chat(usr, "You stop washing \the [I].") + return busy = 0 - if(user.loc != location) return //User has moved - if(!I) return //Item's been destroyed while washing - if(user.get_active_hand() != I) return //Person has switched hands or the item in their hands - O.clean_blood() user.visible_message( \ "[user] washes \a [I] using \the [src].", \