[MIRROR] Adds non-clothing item equipping others feedback messages [MDB IGNORE] (#19881)

* Adds non-clothing item equipping others feedback messages (#73982)

## About The Pull Request
Things like pens weren't giving any feedback messages when you put them
on someone else, and I ran into this while working on another PR so I've
dealt with that

Renames `worn_dangerous` to `show_visible_message` as it was only used
to confirm if there would be visible messages or not
The `DANGEROUS_OBJECT` clothing flag is a trait now, so it can be put on
non-clothing items too
Removing non-clothing items from someone has been unchanged.

## Why It's Good For The Game
People should be able to identify that someone is putting something on
them, and recognize what that is if they pay attention.
This means that a player cannot reverse pickpocket a grenade onto
someone else without giving any indication of doing so

## Changelog

🆑
balance: Putting a non-clothing item onto someone else creates a visible
message the same way a clothing item would.
/🆑

* Adds non-clothing item equipping others feedback messages

---------

Co-authored-by: ArcaneDefence <51932756+ArcaneDefence@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-25 23:28:13 -07:00
committed by GitHub
co-authored by ArcaneDefence
parent 715f0557a7
commit dbb6c5fba4
7 changed files with 14 additions and 10 deletions
+2
View File
@@ -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"
-1
View File
@@ -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,
+1
View File
@@ -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,
+3 -3
View File
@@ -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.
+3 -4
View File
@@ -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."),
@@ -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)
@@ -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