Merge pull request #5409 from Citadel-Station-13/upstream-merge-35456

[MIRROR] [s] Fixes altclick exploits
This commit is contained in:
CitadelStationBot
2018-02-11 09:43:09 -06:00
committed by GitHub
60 changed files with 653 additions and 672 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)