Fix sinks washing things at a distance

This commit is contained in:
Aronai Sieyes
2020-05-21 13:08:11 -04:00
parent 3237ae96d7
commit c6b4eddefb

View File

@@ -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, "<span class='notice'>You stop washing your hands.</span>")
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, "<span class='notice'>You start washing \the [I].</span>")
busy = 1
sleep(40)
if(!do_after(user, 40, src))
busy = 0
to_chat(usr, "<span class='notice'>You stop washing \the [I].</span>")
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( \
"<span class='notice'>[user] washes \a [I] using \the [src].</span>", \