[s] Ports "Fixes PDA TK exploits"

This commit is contained in:
Ghommie
2019-06-19 03:08:44 +02:00
parent 6c54c21d9c
commit df9c4fd1f4
+8 -4
View File
@@ -173,10 +173,14 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/MouseDrop(obj/over_object, src_location, over_location) /obj/item/pda/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr var/mob/M = usr
if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src)) if((M == over) && usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return attack_self(M) return attack_self(M)
return ..() return ..()
/obj/item/pda/attack_self_tk(mob/user)
to_chat(user, "<span class='warning'>The PDA's capacitive touch screen doesn't seem to respond!</span>")
return
/obj/item/pda/interact(mob/user) /obj/item/pda/interact(mob/user)
if(!user.IsAdvancedToolUser()) if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>") to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
@@ -382,7 +386,7 @@ GLOBAL_LIST_EMPTY(PDAs)
var/mob/living/U = usr var/mob/living/U = usr
//Looking for master was kind of pointless since PDAs don't appear to have one. //Looking for master was kind of pointless since PDAs don't appear to have one.
if(usr.canUseTopic(src) && !href_list["close"]) if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) && !href_list["close"])
add_fingerprint(U) add_fingerprint(U)
U.set_machine(src) U.set_machine(src)
@@ -636,7 +640,7 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/proc/remove_id() /obj/item/pda/proc/remove_id()
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE)) if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return return
if (id) if (id)
@@ -802,7 +806,7 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/proc/remove_pen() /obj/item/pda/proc/remove_pen()
if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE)) if(issilicon(usr) || !usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return return
if(inserted_item) if(inserted_item)