-namespace Content.Server.Eye.Blinding
+namespace Content.Shared.Eye.Blinding.Components
{
[RegisterComponent]
- public sealed partial class ActivatableUIRequiresVisionComponent : Component
- {
- }
+ public sealed partial class ActivatableUIRequiresVisionComponent : Component;
}
-using Content.Shared.Eye.Blinding;
using Content.Shared.UserInterface;
-using Content.Server.Popups;
using Content.Shared.Eye.Blinding.Components;
-using Content.Shared.Eye.Blinding.Systems;
-using Robust.Shared.Player;
-using Robust.Server.GameObjects;
+using Content.Shared.Popups;
using Robust.Shared.Collections;
-namespace Content.Server.Eye.Blinding;
+namespace Content.Shared.Eye.Blinding.Systems;
public sealed class ActivatableUIRequiresVisionSystem : EntitySystem
{
- [Dependency] private readonly PopupSystem _popupSystem = default!;
- [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
+ [Dependency] private readonly SharedPopupSystem _popupSystem = default!;
+ [Dependency] private readonly SharedUserInterfaceSystem _userInterfaceSystem = default!;
public override void Initialize()
{
if (TryComp<BlindableComponent>(args.User, out var blindable) && blindable.IsBlind)
{
- _popupSystem.PopupCursor(Loc.GetString("blindness-fail-attempt"), args.User, Shared.Popups.PopupType.MediumCaution);
+ _popupSystem.PopupClient(Loc.GetString("blindness-fail-attempt"), args.User, Shared.Popups.PopupType.MediumCaution);
args.Cancel();
}
}
using Content.Shared.StatusEffect;
using Content.Shared.Inventory;
using Content.Shared.Eye.Blinding.Components;
-using Content.Shared.Eye.Blinding.Systems;
using Content.Shared.Tools.Components;
using Content.Shared.Item.ItemToggle.Components;
-namespace Content.Server.Eye.Blinding.EyeProtection
+namespace Content.Shared.Eye.Blinding.Systems
{
public sealed class EyeProtectionSystem : EntitySystem
{
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
[Dependency] private readonly BlindableSystem _blindingSystem = default!;
-
+
public override void Initialize()
{
base.Initialize();
private void OnWelderToggled(EntityUid uid, RequiresEyeProtectionComponent component, ItemToggledEvent args)
{
component.Toggled = args.Activated;
+ Dirty(uid, component);
}
}
}
- type: ActivatableUI
key: enum.SurveillanceCameraMonitorUiKey.Key
- type: ActivatableUIRequiresPower
+ - type: ActivatableUIRequiresVision
- type: UserInterface
interfaces:
enum.SurveillanceCameraMonitorUiKey.Key:
- type: ActivatableUI
key: enum.SurveillanceCameraMonitorUiKey.Key
- type: ActivatableUIRequiresPower
+ - type: ActivatableUIRequiresVision
- type: UserInterface
interfaces:
enum.SurveillanceCameraMonitorUiKey.Key: