[semi-modular] thieving gloves (#8772)

* yeet

* goddamn fucking trailing newline

* edit: I reread the bounty

* leftover from: I reread the bounty

* *more* leftover from: I reread the bounty

* speedup

* here too

* empty commit for linter reruns

* there

* remembered the newline this time

* okay I forgot that
This commit is contained in:
Seris02
2021-11-09 15:42:28 -05:00
committed by GitHub
parent a1e5ca10d5
commit 985e677b91
8 changed files with 59 additions and 12 deletions
+16 -7
View File
@@ -67,6 +67,9 @@
/// Should we warn about dangerous clothing?
var/warn_dangerous_clothing = TRUE
/// Can it be silent?
var/can_be_silent = FALSE //SKYRAT EDIT ADDITION - THIEVING GLOVES
/// Gets the item from the given source.
/datum/strippable_item/proc/get_item(atom/source)
@@ -148,18 +151,22 @@
if (isnull(item))
return FALSE
source.visible_message(
span_warning("[user] tries to remove [source]'s [item.name]."),
span_userdanger("[user] tries to remove your [item.name]."),
ignored_mobs = user,
)
//SKYRAT EDIT CHANGE START - THIEVING GLOVES
var/is_silent = can_be_silent && HAS_TRAIT(user, TRAIT_STICKY_FINGERS)
if (!is_silent)
source.visible_message(
span_warning("[user] tries to remove [source]'s [item.name]."),
span_userdanger("[user] tries to remove your [item.name]]."),
ignored_mobs = user,
)
//SKYRAT EDIT CHANGE END
to_chat(user, span_danger("You try to remove [source]'s [item]..."))
user.log_message("[key_name(source)] is being stripped of [item] by [key_name(user)]", LOG_ATTACK, color="red")
source.log_message("[key_name(source)] is being stripped of [item] by [key_name(user)]", LOG_VICTIM, color="red", log_globally=FALSE)
item.add_fingerprint(src)
if(ishuman(source))
if(ishuman(source) && !is_silent) //SKYRAT EDIT ADDITION - THIEVING GLOVES ORIGINAL if(ishuman(source))
var/mob/living/carbon/human/victim_human = source
if(victim_human.key && !victim_human.client) // AKA braindead
if(victim_human.stat <= SOFT_CRIT && LAZYLEN(victim_human.afk_thefts) <= AFK_THEFT_MAX_MESSAGES)
@@ -291,7 +298,9 @@
/// A utility function for `/datum/strippable_item`s to start unequipping an item from a mob.
/proc/start_unequip_mob(obj/item/item, mob/source, mob/user, strip_delay)
if (!do_mob(user, source, strip_delay || item.strip_delay, interaction_key = REF(item)))
//SKYRAT EDIT ADDITION - THIEVING GLOVES
//if (!do_mob(user, source, strip_delay || item.strip_delay, interaction_key = REF(item)))
if (!do_mob(user, source, (strip_delay || item.strip_delay) * (HAS_TRAIT(user, TRAIT_STICKY_FINGERS) ? THIEVING_GLOVES_STRIP_SLOWDOWN : NORMAL_STRIP_SLOWDOWN), interaction_key = REF(item)))
return FALSE
return TRUE