mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Fix sinks washing things at a distance
This commit is contained in:
@@ -387,11 +387,12 @@
|
|||||||
playsound(src, 'sound/effects/sink_long.ogg', 75, 1)
|
playsound(src, 'sound/effects/sink_long.ogg', 75, 1)
|
||||||
|
|
||||||
busy = 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
|
busy = 0
|
||||||
|
|
||||||
if(!Adjacent(user)) return //Person has moved away from the sink
|
|
||||||
|
|
||||||
user.clean_blood()
|
user.clean_blood()
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
user:update_inv_gloves()
|
user:update_inv_gloves()
|
||||||
@@ -443,13 +444,12 @@
|
|||||||
to_chat(usr, "<span class='notice'>You start washing \the [I].</span>")
|
to_chat(usr, "<span class='notice'>You start washing \the [I].</span>")
|
||||||
|
|
||||||
busy = 1
|
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
|
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()
|
O.clean_blood()
|
||||||
user.visible_message( \
|
user.visible_message( \
|
||||||
"<span class='notice'>[user] washes \a [I] using \the [src].</span>", \
|
"<span class='notice'>[user] washes \a [I] using \the [src].</span>", \
|
||||||
|
|||||||
Reference in New Issue
Block a user