Merge pull request #4533 from VOREStation/pol-mecha

Two interface QoL changes (closets and mechs)
This commit is contained in:
Anewbe
2018-01-15 01:31:29 -06:00
committed by GitHub
2 changed files with 23 additions and 9 deletions

View File

@@ -127,12 +127,16 @@
else
src.toggle(user)
/obj/structure/closet/secure_closet/AltClick()
..()
verb_togglelock()
/obj/structure/closet/secure_closet/verb/verb_togglelock()
set src in oview(1) // One square distance
set category = "Object"
set name = "Toggle Lock"
if(!usr.canmove || usr.stat || usr.restrained()) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) // Don't use it if you're not able to! Checks for stuns, ghost and restrain
return
if(ishuman(usr) || isrobot(usr))