telescreen and television require vision + Move eye to shared (#30260)
* telescreen and television require vision * Move Content.Server.Eye to Shared * fix popups * Filthy
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
namespace Content.Server.Eye.Blinding
|
namespace Content.Shared.Eye.Blinding.Components
|
||||||
{
|
{
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed partial class ActivatableUIRequiresVisionComponent : Component
|
public sealed partial class ActivatableUIRequiresVisionComponent : Component;
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,18 +1,14 @@
|
|||||||
using Content.Shared.Eye.Blinding;
|
|
||||||
using Content.Shared.UserInterface;
|
using Content.Shared.UserInterface;
|
||||||
using Content.Server.Popups;
|
|
||||||
using Content.Shared.Eye.Blinding.Components;
|
using Content.Shared.Eye.Blinding.Components;
|
||||||
using Content.Shared.Eye.Blinding.Systems;
|
using Content.Shared.Popups;
|
||||||
using Robust.Shared.Player;
|
|
||||||
using Robust.Server.GameObjects;
|
|
||||||
using Robust.Shared.Collections;
|
using Robust.Shared.Collections;
|
||||||
|
|
||||||
namespace Content.Server.Eye.Blinding;
|
namespace Content.Shared.Eye.Blinding.Systems;
|
||||||
|
|
||||||
public sealed class ActivatableUIRequiresVisionSystem : EntitySystem
|
public sealed class ActivatableUIRequiresVisionSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
[Dependency] private readonly SharedPopupSystem _popupSystem = default!;
|
||||||
[Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
|
[Dependency] private readonly SharedUserInterfaceSystem _userInterfaceSystem = default!;
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -28,7 +24,7 @@ public sealed class ActivatableUIRequiresVisionSystem : EntitySystem
|
|||||||
|
|
||||||
if (TryComp<BlindableComponent>(args.User, out var blindable) && blindable.IsBlind)
|
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();
|
args.Cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using Content.Shared.StatusEffect;
|
using Content.Shared.StatusEffect;
|
||||||
using Content.Shared.Inventory;
|
using Content.Shared.Inventory;
|
||||||
using Content.Shared.Eye.Blinding.Components;
|
using Content.Shared.Eye.Blinding.Components;
|
||||||
using Content.Shared.Eye.Blinding.Systems;
|
|
||||||
using Content.Shared.Tools.Components;
|
using Content.Shared.Tools.Components;
|
||||||
using Content.Shared.Item.ItemToggle.Components;
|
using Content.Shared.Item.ItemToggle.Components;
|
||||||
|
|
||||||
namespace Content.Server.Eye.Blinding.EyeProtection
|
namespace Content.Shared.Eye.Blinding.Systems
|
||||||
{
|
{
|
||||||
public sealed class EyeProtectionSystem : EntitySystem
|
public sealed class EyeProtectionSystem : EntitySystem
|
||||||
{
|
{
|
||||||
@@ -58,6 +57,7 @@ namespace Content.Server.Eye.Blinding.EyeProtection
|
|||||||
private void OnWelderToggled(EntityUid uid, RequiresEyeProtectionComponent component, ItemToggledEvent args)
|
private void OnWelderToggled(EntityUid uid, RequiresEyeProtectionComponent component, ItemToggledEvent args)
|
||||||
{
|
{
|
||||||
component.Toggled = args.Activated;
|
component.Toggled = args.Activated;
|
||||||
|
Dirty(uid, component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -108,6 +108,7 @@
|
|||||||
- type: ActivatableUI
|
- type: ActivatableUI
|
||||||
key: enum.SurveillanceCameraMonitorUiKey.Key
|
key: enum.SurveillanceCameraMonitorUiKey.Key
|
||||||
- type: ActivatableUIRequiresPower
|
- type: ActivatableUIRequiresPower
|
||||||
|
- type: ActivatableUIRequiresVision
|
||||||
- type: UserInterface
|
- type: UserInterface
|
||||||
interfaces:
|
interfaces:
|
||||||
enum.SurveillanceCameraMonitorUiKey.Key:
|
enum.SurveillanceCameraMonitorUiKey.Key:
|
||||||
@@ -167,6 +168,7 @@
|
|||||||
- type: ActivatableUI
|
- type: ActivatableUI
|
||||||
key: enum.SurveillanceCameraMonitorUiKey.Key
|
key: enum.SurveillanceCameraMonitorUiKey.Key
|
||||||
- type: ActivatableUIRequiresPower
|
- type: ActivatableUIRequiresPower
|
||||||
|
- type: ActivatableUIRequiresVision
|
||||||
- type: UserInterface
|
- type: UserInterface
|
||||||
interfaces:
|
interfaces:
|
||||||
enum.SurveillanceCameraMonitorUiKey.Key:
|
enum.SurveillanceCameraMonitorUiKey.Key:
|
||||||
|
|||||||
Reference in New Issue
Block a user