Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telescreen and television require vision + Move eye to shared #30260

Merged
merged 4 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace Content.Server.Eye.Blinding
namespace Content.Shared.Eye.Blinding.Components
{
[RegisterComponent]
public sealed partial class ActivatableUIRequiresVisionComponent : Component
{
}
public sealed partial class ActivatableUIRequiresVisionComponent : Component;
}

Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
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()
{
Expand All @@ -28,7 +24,7 @@ private void OnOpenAttempt(EntityUid uid, ActivatableUIRequiresVisionComponent c

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();
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
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();
Expand Down Expand Up @@ -58,6 +57,7 @@ private void OnUseAttempt(EntityUid uid, RequiresEyeProtectionComponent componen
private void OnWelderToggled(EntityUid uid, RequiresEyeProtectionComponent component, ItemToggledEvent args)
{
component.Toggled = args.Activated;
Dirty(uid, component);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
- type: ActivatableUI
key: enum.SurveillanceCameraMonitorUiKey.Key
- type: ActivatableUIRequiresPower
- type: ActivatableUIRequiresVision
- type: UserInterface
interfaces:
enum.SurveillanceCameraMonitorUiKey.Key:
Expand Down Expand Up @@ -167,6 +168,7 @@
- type: ActivatableUI
key: enum.SurveillanceCameraMonitorUiKey.Key
- type: ActivatableUIRequiresPower
- type: ActivatableUIRequiresVision
- type: UserInterface
interfaces:
enum.SurveillanceCameraMonitorUiKey.Key:
Expand Down
Loading