[s] Fixes altclick exploits

This commit is contained in:
ShizCalev
2018-02-10 22:06:12 -05:00
committed by CitadelStationBot
parent 7f7bea7468
commit f4685cfe01
60 changed files with 660 additions and 129 deletions
+2 -5
View File
@@ -310,10 +310,7 @@
..()
/obj/item/stack/AltClick(mob/living/user)
if(!istype(user) || !user.canUseTopic(src))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
if(is_cyborg)
return
@@ -324,7 +321,7 @@
var/min = 0
var/max = get_amount()
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as num)
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount() || !user.canUseTopic(src))
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount() || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
else
change_stack(user,stackmaterial)