security HUD now shows a job icon on entities with a body (#18054)
This commit is contained in:
13
Content.Shared/Inventory/Events/RefreshEquipmentHudEvent.cs
Normal file
13
Content.Shared/Inventory/Events/RefreshEquipmentHudEvent.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Content.Shared.Inventory.Events;
|
||||
|
||||
public sealed class RefreshEquipmentHudEvent<T> : EntityEventArgs, IInventoryRelayEvent where T : IComponent
|
||||
{
|
||||
public SlotFlags TargetSlots { get; init; }
|
||||
public bool Active = false;
|
||||
public object? ExtraData;
|
||||
|
||||
public RefreshEquipmentHudEvent(SlotFlags targetSlots)
|
||||
{
|
||||
TargetSlots = targetSlots;
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,9 @@ using Content.Shared.Electrocution;
|
||||
using Content.Shared.Explosion;
|
||||
using Content.Shared.Eye.Blinding.Systems;
|
||||
using Content.Shared.IdentityManagement.Components;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Overlays;
|
||||
using Content.Shared.Radio;
|
||||
using Content.Shared.Slippery;
|
||||
using Content.Shared.Strip.Components;
|
||||
@@ -34,6 +36,9 @@ public partial class InventorySystem
|
||||
SubscribeLocalEvent<InventoryComponent, GetBlurEvent>(RelayInventoryEvent);
|
||||
SubscribeLocalEvent<InventoryComponent, SolutionScanEvent>(RelayInventoryEvent);
|
||||
|
||||
// ComponentActivatedClientSystems
|
||||
SubscribeLocalEvent<InventoryComponent, RefreshEquipmentHudEvent<ShowSecurityIconsComponent>>(RelayInventoryEvent);
|
||||
|
||||
SubscribeLocalEvent<InventoryComponent, GetVerbsEvent<EquipmentVerb>>(OnGetStrippingVerbs);
|
||||
}
|
||||
|
||||
@@ -47,7 +52,7 @@ public partial class InventorySystem
|
||||
while (containerEnumerator.MoveNext(out var container))
|
||||
{
|
||||
if (!container.ContainedEntity.HasValue) continue;
|
||||
RaiseLocalEvent(container.ContainedEntity.Value, ev, false);
|
||||
RaiseLocalEvent(container.ContainedEntity.Value, ev, broadcast: false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user