Fix strip menu revealing true identity (#35862)

* Fix strip menu revealing true identity

* Ghosts don't see through identity
This commit is contained in:
Tayrtahn
2025-03-19 21:44:01 -04:00
committed by GitHub
parent d3ee9f8bc5
commit e2097d473c
2 changed files with 19 additions and 17 deletions

View 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;
}

View 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