Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 98fd18b

Browse files
authored
anti tk pickpocket abuse (#22746)
1 parent 5e84b2b commit 98fd18b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

code/datums/elements/strippable.dm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@
301301

302302
/// A utility function for `/datum/strippable_item`s to finish unequipping an item from a mob.
303303
/proc/finish_unequip_mob(obj/item/item, mob/source, mob/user, place_in_hand = FALSE)
304+
if (!in_range(source, user)) // No TK abuse
305+
return FALSE
306+
304307
if (place_in_hand && (!source.temporarilyRemoveItemFromInventory(item) || !user.put_in_hands(item, no_sound = TRUE)))
305308
place_in_hand = FALSE // drop to ground if we cant put it in hands
306309

@@ -534,6 +537,9 @@
534537
if (!istype(living_source))
535538
return
536539

540+
if (!in_range(source, user)) // No TK abuse
541+
return
542+
537543
if (istype(storage_item, /obj/item/storage/backpack/duffelbag))
538544
to_chat(user, span_notice("You try to unzip [living_source]'s [storage_item.name]. Hopefully they don't notice."))
539545
playsound(living_source, 'sound/items/zip.ogg', 100, TRUE) // obnoxiously loud

0 commit comments

Comments
 (0)