using Content.Shared.Eye.Blinding.Components; using Content.Shared.Inventory.Events; using Content.Shared.Inventory; namespace Content.Shared.Eye.Blinding.Systems; public sealed partial class BlindfoldSystem : EntitySystem { [Dependency] private 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.EquipTarget); } private void OnUnequipped(Entity blindfold, ref GotUnequippedEvent args) { _blindableSystem.UpdateIsBlind(args.EquipTarget); } }