using Content.Shared.Revolutionary.Components;
using Content.Shared.Revolutionary;
using Content.Shared.StatusIcon.Components;
namespace Content.Client.Revolutionary;
///
/// Used for the client to get status icons from other revs.
///
public sealed partial class RevolutionarySystem : SharedRevolutionarySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent(GetRevIcon);
SubscribeLocalEvent(GetHeadRevIcon);
}
private void GetRevIcon(Entity ent, ref GetStatusIconsEvent args)
{
if (HasComp(ent))
return;
if (ProtoMan.Resolve(ent.Comp.StatusIcon, out var iconPrototype))
args.StatusIcons.Add(iconPrototype);
}
private void GetHeadRevIcon(Entity ent, ref GetStatusIconsEvent args)
{
if (ProtoMan.Resolve(ent.Comp.StatusIcon, out var iconPrototype))
args.StatusIcons.Add(iconPrototype);
}
}