]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix strip menu revealing true identity (#35862)
authorTayrtahn <tayrtahn@gmail.com>
Thu, 20 Mar 2025 01:44:01 +0000 (21:44 -0400)
committerGitHub <noreply@github.com>
Thu, 20 Mar 2025 01:44:01 +0000 (02:44 +0100)
* Fix strip menu revealing true identity

* Ghosts don't see through identity

Content.Shared/Strip/SharedStrippableSystem.cs
Resources/Locale/en-US/strip/strippable-component.ftl

index e4b31debc666f9bc011e8127d030e7b9fdfd91c4..ee40599493fd105044105e8f79961f47362a7fc9 100644 (file)
@@ -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;
         }
 
index ee37a5e90c12379bd10fd722a3a14736899e62d0..7654369c295ac9c53cb0a106fb7875a45d47b6f8 100644 (file)
@@ -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