Fixed placing mounted modules in closets

- Fixes placing mounted modules in closets and crates
- Removed a couple of colons
This commit is contained in:
Loganbacca
2015-01-16 11:43:45 +13:00
parent 2e0a3e4597
commit 780b1fb096
3 changed files with 11 additions and 3 deletions

View File

@@ -191,7 +191,8 @@
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
var/obj/item/weapon/grab/G = W
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
if(istype(W,/obj/item/tk_grab))
return 0
if(istype(W, /obj/item/weapon/weldingtool))
@@ -206,6 +207,8 @@
return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
usr.drop_item()
if(W)
W.loc = src.loc

View File

@@ -66,12 +66,15 @@
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(src.large)
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
src.MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
user << "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>"
user << "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>"
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_item()
if(W)
W.loc = src.loc

View File

@@ -70,6 +70,8 @@
if(opened)
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_item()
if(W)
W.loc = src.loc