using Content.Shared.Eye.Blinding.Components; using Content.Shared.Inventory.Events; using Content.Shared.Inventory; namespace Content.Shared.Eye.Blinding.Systems; public sealed class BlindfoldSystem : EntitySystem { [Dependency] private readonly BlindableSystem _blindableSystem = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnEquipped); SubscribeLocalEvent(OnUnequipped); SubscribeLocalEvent>(OnBlindfoldTrySee); } private void OnBlindfoldTrySee(Entity blindfold, ref InventoryRelayedEvent args) { args.Args.Cancel(); } private void OnEquipped(Entity blindfold, ref GotEquippedEvent args) { _blindableSystem.UpdateIsBlind(args.Equipee); } private void OnUnequipped(Entity blindfold, ref GotUnequippedEvent args) { _blindableSystem.UpdateIsBlind(args.Equipee); } }