private void OnUnequipped(EntityUid uid, BlindfoldComponent component, GotUnequippedEvent args) { if (!component.IsActive) { return; } component.IsActive = false; if (!TryComp <BlindableComponent>(args.Equipee, out var blindComp)) { return; } AdjustBlindSources(args.Equipee, false, blindComp); }
private void OnEquipped(EntityUid uid, BlindfoldComponent component, GotEquippedEvent args) { if (!TryComp <SharedClothingComponent>(uid, out var clothing) || clothing.Slots == SlotFlags.PREVENTEQUIP) // we live in a society { return; } // Is the clothing in its actual slot? if (!clothing.Slots.HasFlag(args.SlotFlags)) { return; } component.IsActive = true; if (!TryComp <BlindableComponent>(args.Equipee, out var blindComp)) { return; } AdjustBlindSources(args.Equipee, true, blindComp); }