Fix strip menu revealing true identity (#35862)
* Fix strip menu revealing true identity * Ghosts don't see through identity
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user