using Content.Shared._DV.Mind; // DeltaV using Content.Shared.CCVar; // DeltaV using Content.Shared.Mind.Components; using Content.Shared.Mobs.Systems; using Content.Shared.NPC; using Content.Shared.SSDIndicator; using Content.Shared.StatusIcon; using Content.Shared.StatusIcon.Components; using Robust.Shared.Configuration; using Robust.Shared.Prototypes; namespace Content.Client.SSDIndicator; /// /// Handles displaying SSD indicator as status icon /// public sealed class SSDIndicatorSystem : EntitySystem { [Dependency] private readonly IPrototypeManager _prototype = default!; [Dependency] private readonly IConfigurationManager _cfg = default!; [Dependency] private readonly MobStateSystem _mobState = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnGetStatusIcon); } private void OnGetStatusIcon(EntityUid uid, SSDIndicatorComponent component, ref GetStatusIconsEvent args) { if (component.IsSSD && _cfg.GetCVar(CCVars.ICShowSSDIndicator) && !_mobState.IsDead(uid) && !HasComp(uid) && HasComp(uid)) { // Begin DeltaV Addition var ev = new ShowSSDIndicatorEvent(); RaiseLocalEvent(uid, ref ev); if (ev.Hidden) return; // End DeltaV Addition args.StatusIcons.Add(_prototype.Index(component.Icon)); } } }