[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
+6 -9
View File
@@ -99,12 +99,9 @@
H.emote("scream")
/obj/item/paper/AltClick(mob/living/carbon/user, obj/item/I)
if ( istype(user) )
if( (!in_range(src, user)) || user.stat || user.restrained() )
return
to_chat(user, "<span class='notice'>You fold [src] into the shape of a plane!</span>")
user.temporarilyRemoveItemFromInventory(src)
I = new /obj/item/paperplane(user, src)
user.put_in_hands(I)
else
to_chat(user, "<span class='notice'> You lack the dexterity to fold \the [src]. </span>")
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
to_chat(user, "<span class='notice'>You fold [src] into the shape of a plane!</span>")
user.temporarilyRemoveItemFromInventory(src)
I = new /obj/item/paperplane(user, src)
user.put_in_hands(I)
+3 -3
View File
@@ -128,12 +128,12 @@
if(isobj(O) && proximity)
if(O.obj_flags & UNIQUE_RENAME)
var/penchoice = input(user, "What would you like to edit?", "Rename or change description?") as null|anything in list("Rename","Change description")
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
if(!QDELETED(O) && user.canUseTopic(O, BE_CLOSE))
if(penchoice == "Rename")
var/input = stripped_input(user,"What do you want to name \the [O.name]?", ,"", MAX_NAME_LEN)
var/oldname = O.name
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
if(!QDELETED(O) && user.canUseTopic(O, BE_CLOSE))
if(oldname == input)
to_chat(user, "You changed \the [O.name] to... well... \the [O.name].")
return
@@ -146,7 +146,7 @@
if(penchoice == "Change description")
var/input = stripped_input(user,"Describe \the [O.name] here", ,"", 100)
if(!QDELETED(O) && user.canUseTopic(O, be_close = TRUE))
if(!QDELETED(O) && user.canUseTopic(O, BE_CLOSE))
O.desc = input
to_chat(user, "You have successfully changed \the [O.name]'s description.")
return
+1 -1
View File
@@ -313,7 +313,7 @@
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off.
if (!istype(target) || target.anchored || target.buckled || !Adjacent(user) || !Adjacent(target) || !user.canUseTopic(src, 1) || target == ass || copier_blocked())
if (!istype(target) || target.anchored || target.buckled || !Adjacent(target) || !user.canUseTopic(src, BE_CLOSE) || target == ass || copier_blocked())
return
src.add_fingerprint(user)
if(target == user)