mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-19 15:11:06 +03:00
* IoC source gen compatibility Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter. * Missed a spot
28 lines
877 B
C#
28 lines
877 B
C#
using Content.Shared.Overlays;
|
|
using Content.Shared.Security.Components;
|
|
using Content.Shared.StatusIcon;
|
|
using Content.Shared.StatusIcon.Components;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Client.Overlays;
|
|
|
|
public sealed partial class ShowCriminalRecordIconsSystem : EquipmentHudSystem<ShowCriminalRecordIconsComponent>
|
|
{
|
|
[Dependency] private IPrototypeManager _prototype = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<CriminalRecordComponent, GetStatusIconsEvent>(OnGetStatusIconsEvent);
|
|
}
|
|
|
|
private void OnGetStatusIconsEvent(EntityUid uid, CriminalRecordComponent component, ref GetStatusIconsEvent ev)
|
|
{
|
|
if (!IsActive)
|
|
return;
|
|
|
|
if (_prototype.Resolve(component.StatusIcon, out var iconPrototype))
|
|
ev.StatusIcons.Add(iconPrototype);
|
|
}
|
|
}
|