mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Fixed placing mounted modules in closets
- Fixes placing mounted modules in closets and crates - Removed a couple of colons
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user