From e2097d473ccc02f781c5d11e099b2bb37dff3a58 Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Wed, 19 Mar 2025 21:44:01 -0400 Subject: [PATCH] Fix strip menu revealing true identity (#35862) * Fix strip menu revealing true identity * Ghosts don't see through identity --- .../Strip/SharedStrippableSystem.cs | 14 +++++++----- .../en-US/strip/strippable-component.ftl | 22 +++++++++---------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Content.Shared/Strip/SharedStrippableSystem.cs b/Content.Shared/Strip/SharedStrippableSystem.cs index e4b31debc6..ee40599493 100644 --- a/Content.Shared/Strip/SharedStrippableSystem.cs +++ b/Content.Shared/Strip/SharedStrippableSystem.cs @@ -167,15 +167,17 @@ public abstract class SharedStrippableSystem : EntitySystem return false; } + var targetIdentity = Identity.Entity(target, EntityManager); + if (_inventorySystem.TryGetSlotEntity(target, slot, out _)) { - _popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-occupied", ("owner", target))); + _popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-occupied", ("owner", targetIdentity))); return false; } if (!_inventorySystem.CanEquip(user, target, held, slot, out _)) { - _popupSystem.PopupCursor(Loc.GetString("strippable-component-cannot-equip-message", ("owner", target))); + _popupSystem.PopupCursor(Loc.GetString("strippable-component-cannot-equip-message", ("owner", targetIdentity))); return false; } @@ -257,7 +259,7 @@ public abstract class SharedStrippableSystem : EntitySystem { if (!_inventorySystem.TryGetSlotEntity(target, slot, out var slotItem)) { - _popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-free-message", ("owner", target))); + _popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-free-message", ("owner", Identity.Entity(target, EntityManager)))); return false; } @@ -374,7 +376,7 @@ public abstract class SharedStrippableSystem : EntitySystem if (!_handsSystem.TryGetHand(target, handName, out var handSlot, target.Comp) || !_handsSystem.CanPickupToHand(target, user.Comp.ActiveHandEntity.Value, handSlot, checkActionBlocker: false, target.Comp)) { - _popupSystem.PopupCursor(Loc.GetString("strippable-component-cannot-put-message", ("owner", target))); + _popupSystem.PopupCursor(Loc.GetString("strippable-component-cannot-put-message", ("owner", Identity.Entity(target, EntityManager)))); return false; } @@ -461,7 +463,7 @@ public abstract class SharedStrippableSystem : EntitySystem if (!_handsSystem.TryGetHand(target, handName, out var handSlot, target.Comp)) { - _popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-free-message", ("owner", Identity.Name(target, EntityManager, user)))); + _popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-free-message", ("owner", Identity.Entity(target, EntityManager)))); return false; } @@ -476,7 +478,7 @@ public abstract class SharedStrippableSystem : EntitySystem if (!_handsSystem.CanDropHeld(target, handSlot, false)) { - _popupSystem.PopupCursor(Loc.GetString("strippable-component-cannot-drop-message", ("owner", Identity.Name(target, EntityManager, user)))); + _popupSystem.PopupCursor(Loc.GetString("strippable-component-cannot-drop-message", ("owner", Identity.Entity(target, EntityManager)))); return false; } diff --git a/Resources/Locale/en-US/strip/strippable-component.ftl b/Resources/Locale/en-US/strip/strippable-component.ftl index ee37a5e90c..7654369c29 100644 --- a/Resources/Locale/en-US/strip/strippable-component.ftl +++ b/Resources/Locale/en-US/strip/strippable-component.ftl @@ -1,23 +1,23 @@ strippable-component-not-holding-anything = You aren't holding anything! strippable-component-cannot-drop = You can't drop that! -strippable-component-item-slot-occupied-message = {$owner} already has something there! -strippable-component-cannot-equip-message = {$owner} cannot equip that there! -strippable-component-cannot-put-message = {$owner} cannot put that there! -strippable-component-item-slot-free-message = {$owner} has nothing there! -strippable-component-cannot-unequip-message = {$owner} cannot unequip that! -strippable-component-cannot-drop-message = {$owner} cannot drop that! -strippable-component-alert-owner = {$user} is removing your {$item}! +strippable-component-item-slot-occupied-message = {CAPITALIZE(THE($owner))} already has something there! +strippable-component-cannot-equip-message = {CAPITALIZE(THE($owner))} cannot equip that there! +strippable-component-cannot-put-message = {CAPITALIZE(THE($owner))} cannot put that there! +strippable-component-item-slot-free-message = {CAPITALIZE(THE($owner))} has nothing there! +strippable-component-cannot-unequip-message = {CAPITALIZE(THE($owner))} cannot unequip that! +strippable-component-cannot-drop-message = {CAPITALIZE(THE($owner))} cannot drop that! +strippable-component-alert-owner = {CAPITALIZE(THE($user))} is removing your {$item}! strippable-component-alert-owner-hidden = You feel someone fumbling in your {$slot}! -strippable-component-alert-owner-insert = {$user} is putting {$item} on you! -strippable-component-alert-owner-insert-hand = {$user} is putting {$item} in your hand! +strippable-component-alert-owner-insert = {CAPITALIZE(THE($user))} is putting {$item} on you! +strippable-component-alert-owner-insert-hand = {CAPITALIZE(THE($user))} is putting {$item} in your hand! # generic warning for when a user interacts with your equipped items. -strippable-component-alert-owner-interact = {$user} is fumbling around with your {$item}! +strippable-component-alert-owner-interact = {CAPITALIZE(THE($user))} is fumbling around with your {$item}! # StripVerb strip-verb-get-data-text = Strip ## UI -strippable-bound-user-interface-stripping-menu-title = {$ownerName}'s inventory +strippable-bound-user-interface-stripping-menu-title = {CAPITALIZE($ownerName)}'s inventory strippable-bound-user-interface-stripping-menu-ensnare-button = Remove Leg Restraints -- 2.51.2