CatStation/Content.Client/Corvax/Events/ShowEventIconSystem.cs
2026-05-25 06:05:16 +07:00

24 lines
738 B
C#

using Content.Shared.Corvax.Events.Components;
using Content.Shared.StatusIcon.Components;
using Robust.Shared.Prototypes;
namespace Content.Client.Corvax.Events
{
public sealed partial class ShowEventIconSystem : EntitySystem
{
[Dependency] private IPrototypeManager _prototype = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<EventIconComponent, GetStatusIconsEvent>(GetEventIcons);
}
private void GetEventIcons(Entity<EventIconComponent> ent, ref GetStatusIconsEvent args)
{
var iconPrototype = _prototype.Index(ent.Comp.StatusIcon);
args.StatusIcons.Add(iconPrototype);
}
}
}