diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index d322c3e1ff5..f037ba138d2 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -610,6 +610,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_HAS_BEEN_KIDNAPPED "has_been_kidnapped" /// An item still plays its hitsound even if it has 0 force, instead of the tap #define TRAIT_CUSTOM_TAP_SOUND "no_tap_sound" +/// Makes the feedback message when someone else is putting this item on you more noticeable +#define TRAIT_DANGEROUS_OBJECT "dangerous_object" //quirk traits #define TRAIT_ALCOHOL_TOLERANCE "alcohol_tolerance" diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index 8c06acb6f8d..f5c2a1122c7 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -87,7 +87,6 @@ DEFINE_BITFIELD(clothing_flags, list( "BLOCKS_SPEECH" = BLOCKS_SPEECH, "BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT, "CASTING_CLOTHES" = CASTING_CLOTHES, - "DANGEROUS_OBJECT" = DANGEROUS_OBJECT, "GAS_FILTERING" = GAS_FILTERING, "HEADINTERNALS" = HEADINTERNALS, "INEDIBLE_CLOTHING" = INEDIBLE_CLOTHING, diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index e67e598c6ae..6bfdfe68180 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -208,6 +208,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_NO_TELEPORT" = TRAIT_NO_TELEPORT, "TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING, "TRAIT_UNCATCHABLE" = TRAIT_UNCATCHABLE, + "TRAIT_DANGEROUS_OBJECT" = TRAIT_DANGEROUS_OBJECT, ), /atom = list( "TRAIT_KEEP_TOGETHER" = TRAIT_KEEP_TOGETHER, diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm index 4d1ebc597bb..dd585f260ac 100644 --- a/code/datums/elements/strippable.dm +++ b/code/datums/elements/strippable.dm @@ -64,8 +64,8 @@ /// The STRIPPABLE_ITEM_* key var/key - /// Should we warn about dangerous clothing? - var/warn_dangerous_clothing = TRUE + /// Should we give feedback messages? + var/show_visible_message = TRUE /// Can it be silent? var/can_be_silent = FALSE //SKYRAT EDIT ADDITION - THIEVING GLOVES @@ -91,7 +91,7 @@ /// Returns TRUE/FALSE depending on if it is allowed. /datum/strippable_item/proc/start_equip(atom/source, obj/item/equipping, mob/user) - equipping.item_start_equip(source, equipping, user, warn_dangerous_clothing) + equipping.item_start_equip(source, equipping, user, show_visible_message) return TRUE /// The proc that places the item on the source. This should not yield. diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 03f93e55add..b459a6f6585 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1610,11 +1610,10 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/e * This proc calls at the begining of anytime an item is being equiped to a target by another mob. * It handles initial messages, AFK stripping, and initial logging. */ -/obj/item/proc/item_start_equip(atom/target, obj/item/equipping, mob/user, warn_dangerous = TRUE) +/obj/item/proc/item_start_equip(atom/target, obj/item/equipping, mob/user, show_visible_message = TRUE) - if(warn_dangerous && isclothing(equipping)) - var/obj/item/clothing/clothing = equipping - if(clothing.clothing_flags & DANGEROUS_OBJECT) + if(show_visible_message) + if(HAS_TRAIT(equipping, TRAIT_DANGEROUS_OBJECT)) target.visible_message( span_danger("[user] tries to put [equipping] on [target]."), span_userdanger("[user] tries to put [equipping] on you."), diff --git a/code/modules/clothing/suits/straightjacket.dm b/code/modules/clothing/suits/straightjacket.dm index 15abb01ebb4..4ef22a1a438 100644 --- a/code/modules/clothing/suits/straightjacket.dm +++ b/code/modules/clothing/suits/straightjacket.dm @@ -5,7 +5,10 @@ inhand_icon_state = "straight_jacket" body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT - clothing_flags = DANGEROUS_OBJECT equip_delay_self = 50 strip_delay = 60 breakouttime = 5 MINUTES + +/obj/item/clothing/suit/jacket/straight_jacket/Initialize(mapload) + . = ..() + ADD_TRAIT(src, TRAIT_DANGEROUS_OBJECT, INNATE_TRAIT) diff --git a/code/modules/mob/living/carbon/carbon_stripping.dm b/code/modules/mob/living/carbon/carbon_stripping.dm index fe0929b22e6..4ec93377164 100644 --- a/code/modules/mob/living/carbon/carbon_stripping.dm +++ b/code/modules/mob/living/carbon/carbon_stripping.dm @@ -55,7 +55,7 @@ /// A strippable item for a hand /datum/strippable_item/hand // Putting dangerous clothing in our hand is fine. - warn_dangerous_clothing = FALSE + show_visible_message = FALSE /// Which hand? var/hand_index