Alt-click-toggles now do proper checks

Such as if you're near the thing, conscious, alive etc.

Fixes #9238
This commit is contained in:
kingofkosmos
2015-05-18 20:22:04 +03:00
parent 099627ca06
commit 494403969e
5 changed files with 34 additions and 8 deletions
@@ -351,8 +351,8 @@
/obj/structure/closet/AltClick(var/mob/user)
..()
if(user.stat || !user.canmove || user.restrained() || broken)
user << "<span class='notice'>You can't do that right now.</span>"
if(!user.canUseTopic(user) || broken)
user << "<span class='warning'>You can't do that right now!</span>"
return
if(src.opened || !secure || !in_range(src, user))
return