Merge pull request #17839 from optimumtact/watisgoinon

Fix an antipattern when using canUseTopic
This commit is contained in:
AnturK
2016-05-24 17:46:11 +02:00
7 changed files with 9 additions and 19 deletions
@@ -381,10 +381,10 @@
/obj/structure/closet/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
if(!user.canUseTopic(src, be_close=TRUE))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(opened || !secure || !in_range(src, user))
if(opened || !secure)
return
else
togglelock(user)
+1 -3
View File
@@ -124,11 +124,9 @@
/obj/structure/reflector/AltClick(mob/user)
..()
if(!user.canUseTopic(user))
if(!user.canUseTopic(src, be_close=TRUE))
user << "<span class='warning'>You can't do that right now!</span>"
return
if(!in_range(src, user))
return
else
rotate()