TG: Fix for dragging HUD elements into lockers.

Revision: r3635
Author: 	 petethegoat
This commit is contained in:
Erthilo
2012-05-21 20:42:15 +01:00
parent 552fe3040e
commit 03dc270006

View File

@@ -168,6 +168,10 @@
return
/obj/structure/closet/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if(istype(O, /obj/screen) || istype(O, /obj/hud)) //fix for HUD elements making their way into the world -Pete
return
if(O.loc == user)
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis)
return
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
@@ -182,7 +186,7 @@
return
step_towards(O, src.loc)
if(user != O)
user.show_viewers(text("\red [] stuffs [] into []!", user, O, src))
user.show_viewers("\red [user] stuffs [O] into [src]!")
src.add_fingerprint(user)
return