diff --git a/code/__DEFINES/strippable.dm b/code/__DEFINES/strippable.dm index a660e827842..273fe3a82a9 100644 --- a/code/__DEFINES/strippable.dm +++ b/code/__DEFINES/strippable.dm @@ -29,3 +29,8 @@ /// This slot can't be seen, but can be accessed. #define STRIPPABLE_OBSCURING_HIDDEN 2 + +//SKYRAT EDIT ADDITION BEGIN - THIEVING GLOVES +#define THIEVING_GLOVES_STRIP_SLOWDOWN 0.5 //a multiplier for the amount of time it takes to strip someone +#define NORMAL_STRIP_SLOWDOWN 1 +//SKYRAT EDIT END diff --git a/code/__DEFINES/~skyrat_defines/traits.dm b/code/__DEFINES/~skyrat_defines/traits.dm index dbb2d6036eb..83957b6f28f 100644 --- a/code/__DEFINES/~skyrat_defines/traits.dm +++ b/code/__DEFINES/~skyrat_defines/traits.dm @@ -12,6 +12,7 @@ #define TRAIT_FREE_GHOST "free_ghost" // Can ghost and return freely with this trait #define QUIRK_LINGUIST "Linguist" // Extra language point. #define GLUED_ITEM_TRAIT "glued-item" // This is for glued items, undroppable. Syndie glue applies this. +#define TRAIT_STICKY_FINGERS "sticky_fingers" //This is so a mob can strip items faster and picks them up after /// This makes trait makes it so that the person cannot be infected by the zombie virus. #define TRAIT_MUTANT_IMMUNE "mutant_immune" diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm index 7f27bbcceae..c1aebcdbcb6 100644 --- a/code/datums/elements/strippable.dm +++ b/code/datums/elements/strippable.dm @@ -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 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4fc5cec85d1..acfd2ec17ff 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1060,7 +1060,15 @@ attack_basic_mob return !HAS_TRAIT(src, TRAIT_NODROP) && !(item_flags & ABSTRACT) /obj/item/proc/doStrip(mob/stripper, mob/owner) - return owner.dropItemToGround(src) + //SKYRAT EDIT CHANGE BEGIN - THIEVING GLOVES - ORIGINAL: return owner.dropItemToGround(src) + if (!owner.dropItemToGround(src)) + return FALSE + if (HAS_TRAIT(stripper, TRAIT_STICKY_FINGERS)) + stripper.put_in_hands(src) + return TRUE + //SKYRAT EDIT END + + ///Does the current embedding var meet the criteria for being harmless? Namely, does it have a pain multiplier and jostle pain mult of 0? If so, return true. /obj/item/proc/isEmbedHarmless() diff --git a/code/modules/mob/living/carbon/human/human_stripping.dm b/code/modules/mob/living/carbon/human/human_stripping.dm index ae5fa42f6e6..5a1c002bd25 100644 --- a/code/modules/mob/living/carbon/human/human_stripping.dm +++ b/code/modules/mob/living/carbon/human/human_stripping.dm @@ -119,6 +119,7 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list( /datum/strippable_item/mob_item_slot/id key = STRIPPABLE_ITEM_ID item_slot = ITEM_SLOT_ID + can_be_silent = TRUE //SKYRAT EDIT ADDITION /datum/strippable_item/mob_item_slot/belt key = STRIPPABLE_ITEM_BELT @@ -135,6 +136,7 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list( /datum/strippable_item/mob_item_slot/pocket /// Which pocket we're referencing. Used for visible text. var/pocket_side + can_be_silent = TRUE //SKYRAT EDIT ADDITION /datum/strippable_item/mob_item_slot/pocket/get_obscuring(atom/source) return isnull(get_item(source)) \ @@ -163,7 +165,7 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list( var/result = start_unequip_mob(item, source, user, POCKET_STRIP_DELAY) - if (!result) + if (!result && !HAS_TRAIT(user, TRAIT_STICKY_FINGERS)) //SKYRAT EDIT ADDITION original if (!result) warn_owner(source) return result diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 432394854a0..34d53527bf1 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1073,13 +1073,19 @@ if(!what.canStrip(who)) to_chat(src, span_warning("You can't remove \the [what.name], it appears to be stuck!")) return - who.visible_message(span_warning("[src] tries to remove [who]'s [what.name]."), \ - span_userdanger("[src] tries to remove your [what.name]."), null, null, src) + //SKYRAT EDIT ADDITION BEGIN - THIEVING GLOVES + var/silent = HAS_TRAIT(who, TRAIT_STICKY_FINGERS) && (where & (ITEM_SLOT_ID|ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET)) + if (!silent) + who.visible_message(span_warning("[src] tries to remove [who]'s [what.name]."), \ + span_userdanger("[src] tries to remove your [what.name]."), null, null, src) + //SKYRAT EDIT ADDITION END to_chat(src, span_danger("You try to remove [who]'s [what.name]...")) log_message("[key_name(who)] is being stripped of [what] by [key_name(src)]", LOG_ATTACK, color="red") who.log_message("[key_name(who)] is being stripped of [what] by [key_name(src)]", LOG_VICTIM, color="red", log_globally = FALSE) what.add_fingerprint(src) - if(do_mob(src, who, what.strip_delay, interaction_key = what)) + //SKYRAT EDIT CHANGE - THIEVING GLOVES + //if(do_mob(src, who, what.strip_delay, interaction_key = what)) + if(do_mob(src, who, what.strip_delay * (HAS_TRAIT(who, TRAIT_STICKY_FINGERS) ? 0.5 : 1), interaction_key = what)) if(what && Adjacent(who)) if(islist(where)) var/list/L = where diff --git a/modular_skyrat/modules/modular_items/code/game/objects/items/thieving_gloves.dm b/modular_skyrat/modules/modular_items/code/game/objects/items/thieving_gloves.dm new file mode 100644 index 00000000000..dadfe1a8d7f --- /dev/null +++ b/modular_skyrat/modules/modular_items/code/game/objects/items/thieving_gloves.dm @@ -0,0 +1,15 @@ +/obj/item/clothing/gloves/color/black/thief + special_desc = "Gloves made with completely frictionless, insulated cloth, easier to steal from people with." + special_desc_requirement = EXAMINE_CHECK_SYNDICATE + clothing_traits = list(TRAIT_STICKY_FINGERS) + siemens_coefficient = 0 + permeability_coefficient = 0.05 + transfer_prints = FALSE + cut_type = null + +/datum/uplink_item/stealthy_tools/thieving_gloves + name = "Thieving Gloves" + desc = "Black gloves that are made with frictionless, insulated cloth, allowing you to steal easily from anyone you see." + cost = 6 + surplus = 20 + item = /obj/item/clothing/gloves/color/black/thief diff --git a/tgstation.dme b/tgstation.dme index f05a1ef4af1..0e411ad079b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4755,6 +4755,7 @@ #include "modular_skyrat\modules\modular_items\code\game\objects\items\ciggies.dm" #include "modular_skyrat\modules\modular_items\code\game\objects\items\cross.dm" #include "modular_skyrat\modules\modular_items\code\game\objects\items\miscellaneous.dm" +#include "modular_skyrat\modules\modular_items\code\game\objects\items\thieving_gloves.dm" #include "modular_skyrat\modules\modular_items\code\game\objects\items\mining\equipment\kinetic_crusher.dm" #include "modular_skyrat\modules\modular_items\code\game\objects\items\mining\equipment\necklace.dm" #include "modular_skyrat\modules\modular_items\code\game\objects\items\storage\bags.dm"