refactoring altclick interaction to allow parent calls without forcing the turf contents stat menu open.

This commit is contained in:
Ghommie
2019-11-29 00:40:16 +01:00
parent 8cec8fa506
commit 3b8aebbbc2
99 changed files with 269 additions and 162 deletions
@@ -526,11 +526,12 @@
to_chat(user, "<span class='warning'>You fail to break out of [src]!</span>")
/obj/structure/closet/AltClick(mob/user)
..()
. = ..()
if(!user.canUseTopic(src, be_close=TRUE) || !isturf(loc))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
return TRUE
togglelock(user)
return TRUE
/obj/structure/closet/CtrlShiftClick(mob/living/user)
if(!HAS_TRAIT(user, TRAIT_SKITTISH))