using Content.Shared.Antag; using Content.Shared._Goobstation.Blob; using Content.Shared._Goobstation.Blob.Components; //using Content.Shared.Flesh; using Content.Shared.GameTicking; using Content.Shared.Ghost; using Content.Shared.StatusIcon; using Content.Shared.StatusIcon.Components; using Robust.Client.Graphics; using Robust.Shared.Player; using Robust.Shared.Prototypes; namespace Content.Client._Goobstation.Blob; public sealed class BlobObserverSystem : SharedBlobObserverSystem { [Dependency] private readonly ILightManager _lightManager = default!; [Dependency] private readonly IPrototypeManager _prototype = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnPlayerAttached); SubscribeLocalEvent(OnPlayerDetached); SubscribeLocalEvent(OnShowBlobIcon); SubscribeLocalEvent(OnShowBlobIcon); SubscribeLocalEvent(OnShowBlobIcon); SubscribeLocalEvent(OnShowBlobIcon); SubscribeNetworkEvent(RoundRestartCleanup); } [ValidatePrototypeId] private const string BlobFaction = "BlobFaction"; private void OnShowBlobIcon(Entity ent, ref GetStatusIconsEvent args) where T : Component { args.StatusIcons.Add(_prototype.Index(BlobFaction)); } private void OnPlayerAttached(EntityUid uid, BlobObserverComponent component, LocalPlayerAttachedEvent args) { _lightManager.DrawLighting = false; } private void OnPlayerDetached(EntityUid uid, BlobObserverComponent component, LocalPlayerDetachedEvent args) { _lightManager.DrawLighting = true; } private void RoundRestartCleanup(RoundRestartCleanupEvent ev) { _lightManager.DrawLighting = true; } }