Fix admin ghosts not being able to see items in pockets or interact with them (#31076)
* Fix admin ghosts not being able to see items in pouches or interact with them * fix * oops --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -10,6 +10,7 @@ using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Item;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Strip;
|
||||
using Content.Shared.Strip.Components;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
@@ -32,6 +33,7 @@ public abstract partial class InventorySystem
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
[Dependency] private readonly SharedStrippableSystem _strippable = default!;
|
||||
|
||||
[ValidatePrototypeId<ItemSizePrototype>]
|
||||
private const string PocketableItemSize = "Small";
|
||||
|
||||
@@ -114,7 +114,7 @@ public partial class InventorySystem
|
||||
var enumerator = new InventorySlotEnumerator(component);
|
||||
while (enumerator.NextItem(out var item, out var slotDef))
|
||||
{
|
||||
if (!slotDef.StripHidden || args.User == uid)
|
||||
if (!_strippable.IsStripHidden(slotDef, args.User) || args.User == uid)
|
||||
RaiseLocalEvent(item, ev);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Numerics;
|
||||
using Content.Shared.Strip;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -39,6 +40,10 @@ public sealed partial class SlotDefinition
|
||||
[DataField("displayName", required: true)]
|
||||
public string DisplayName { get; private set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not this slot will have its item hidden in the strip menu, and block interactions.
|
||||
/// <seealso cref="SharedStrippableSystem.IsStripHidden"/>
|
||||
/// </summary>
|
||||
[DataField("stripHidden")] public bool StripHidden { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user