This commit is contained in:
Mira
2025-03-10 13:03:40 +00:00
committed by GitHub
parent d9115bb81b
commit f4dc140caa
3 changed files with 24 additions and 17 deletions
@@ -36,17 +36,20 @@
/datum/strippable_item/mob_item_slot/mask/alternate_action(atom/source, mob/user, action_key)
if(!..())
return
var/thief_mode = in_thief_mode(user)
// Headpocket dislodging
if(action_key == "dislodge_headpocket")
var/mob/living/carbon/human/H = source
var/obj/item/organ/internal/headpocket/pocket = H.get_int_organ(/obj/item/organ/internal/headpocket)
if(!pocket.held_item)
return
if(!in_thief_mode(user))
if(!thief_mode)
user.visible_message("<span class='danger'>[user] is trying to remove something from [source]'s head!</span>",
"<span class='danger'>You start to dislodge whatever's inside [source]'s headpocket!</span>")
if(do_mob(user, source, POCKET_STRIP_DELAY))
if(!in_thief_mode(user))
if(do_mob(user, source, POCKET_STRIP_DELAY, hidden = thief_mode))
if(!thief_mode)
user.visible_message("<span class='danger'>[user] has dislodged something from [source]'s head!</span>",
"<span class='danger'>You have dislodged everything from [source]'s headpocket!</span>")
pocket.empty_contents()
@@ -63,10 +66,10 @@
to_chat(user, "You lack the ability to manipulate the lock.")
return
if(!in_thief_mode(user))
if(!thief_mode)
muzzle.visible_message("<span class='danger'>[user] tries to [muzzle.locked ? "unlock" : "lock"] [source]'s [muzzle.name].</span>", \
"<span class='userdanger'>[user] tries to [muzzle.locked ? "unlock" : "lock"] [source]'s [muzzle.name].</span>")
if(!do_mob(user, source, POCKET_STRIP_DELAY))
if(!do_mob(user, source, POCKET_STRIP_DELAY, hidden = thief_mode))
return
var/success = FALSE
@@ -77,7 +80,7 @@
if(!success)
return
if(!in_thief_mode(user))
if(!thief_mode)
muzzle.visible_message("<span class='danger'>[user] [muzzle.locked ? "locks" : "unlocks"] [source]'s [muzzle.name].</span>", \
"<span class='userdanger'>[user] [muzzle.locked ? "locks" : "unlocks"] [source]'s [muzzle.name].</span>")
@@ -59,16 +59,17 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list(
if(!length(jumpsuit.accessories))
return
var/obj/item/clothing/accessory/A = jumpsuit.accessories[1]
if(!in_thief_mode(user))
var/thief_mode = in_thief_mode(user)
if(!thief_mode)
user.visible_message("<span class='danger'>[user] starts to take off [A] from [source]'s [jumpsuit]!</span>", \
"<span class='danger'>You start to take off [A] from [source]'s [jumpsuit]!</span>")
if(!do_mob(user, source, POCKET_STRIP_DELAY))
if(!do_mob(user, source, POCKET_STRIP_DELAY, hidden = thief_mode))
return
if(QDELETED(A) || !(A in jumpsuit.accessories))
return
if(!in_thief_mode(user))
if(!thief_mode)
user.visible_message("<span class='danger'>[user] takes [A] off of [source]'s [jumpsuit]!</span>", \
"<span class='danger'>You take [A] off of [source]'s [jumpsuit]!</span>")
jumpsuit.detach_accessory(A, user)
@@ -157,9 +158,10 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list(
add_attack_logs(user, source, "Attempting pickpocketing of [item]")
item.add_fingerprint(user)
var/result = start_unequip_mob(item, source, user, POCKET_STRIP_DELAY)
var/thief_mode = in_thief_mode(user)
var/result = start_unequip_mob(item, source, user, POCKET_STRIP_DELAY, thief_mode)
if(!result && !in_thief_mode(user))
if(!result && !thief_mode)
warn_owner(source)
return result