2023-11-06 05:36:08 +03:00
|
|
|
using Content.Shared.Overlays;
|
|
|
|
|
using Content.Shared.NukeOps;
|
|
|
|
|
using Content.Shared.StatusIcon;
|
2024-04-17 23:20:44 -04:00
|
|
|
using Content.Shared.StatusIcon.Components;
|
2023-11-06 05:36:08 +03:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Overlays;
|
2024-04-17 23:20:44 -04:00
|
|
|
|
2023-11-06 05:36:08 +03:00
|
|
|
public sealed class ShowSyndicateIconsSystem : EquipmentHudSystem<ShowSyndicateIconsComponent>
|
|
|
|
|
{
|
|
|
|
|
[Dependency] private readonly IPrototypeManager _prototype = default!;
|
|
|
|
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
{
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
|
|
|
SubscribeLocalEvent<NukeOperativeComponent, GetStatusIconsEvent>(OnGetStatusIconsEvent);
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-17 23:20:44 -04:00
|
|
|
private void OnGetStatusIconsEvent(EntityUid uid, NukeOperativeComponent component, ref GetStatusIconsEvent ev)
|
2023-11-06 05:36:08 +03:00
|
|
|
{
|
2024-06-03 12:12:21 -04:00
|
|
|
if (!IsActive)
|
2023-11-06 05:36:08 +03:00
|
|
|
return;
|
|
|
|
|
|
2024-08-09 08:14:07 +02:00
|
|
|
if (_prototype.TryIndex<FactionIconPrototype>(component.SyndStatusIcon, out var iconPrototype))
|
2024-04-17 23:20:44 -04:00
|
|
|
ev.StatusIcons.Add(iconPrototype);
|
2023-11-06 05:36:08 +03:00
|
|
|
}
|
|
|
|
|
}
|