From 7d20aefc0a766e758965827dc26a0055d736d34b Mon Sep 17 00:00:00 2001 From: chromiumboy <50505512+chromiumboy@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:26:02 -0500 Subject: [PATCH] Fix opening wire panels without WiresPanelSecurityComponent (#20798) --- Content.Server/Doors/Systems/AirlockSystem.cs | 6 ++++-- Content.Server/Wires/WiresSystem.cs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Content.Server/Doors/Systems/AirlockSystem.cs b/Content.Server/Doors/Systems/AirlockSystem.cs index 06fdac45d8..ce517febf6 100644 --- a/Content.Server/Doors/Systems/AirlockSystem.cs +++ b/Content.Server/Doors/Systems/AirlockSystem.cs @@ -152,10 +152,12 @@ public sealed class AirlockSystem : SharedAirlockSystem { if (TryComp(uid, out var panel) && panel.Open && - TryComp(uid, out var wiresPanelSecurity) && - wiresPanelSecurity.WiresAccessible && TryComp(args.User, out var actor)) { + if (TryComp(uid, out var wiresPanelSecurity) && + !wiresPanelSecurity.WiresAccessible) + return; + _wiresSystem.OpenUserInterface(uid, actor.PlayerSession); args.Handled = true; return; diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs index 37b6282bb6..df61e89d4d 100644 --- a/Content.Server/Wires/WiresSystem.cs +++ b/Content.Server/Wires/WiresSystem.cs @@ -463,11 +463,13 @@ public sealed class WiresSystem : SharedWiresSystem return; if (panel.Open && - TryComp(uid, out var wiresPanelSecurity) && - wiresPanelSecurity.WiresAccessible && (_toolSystem.HasQuality(args.Used, "Cutting", tool) || _toolSystem.HasQuality(args.Used, "Pulsing", tool))) { + if (TryComp(uid, out var wiresPanelSecurity) && + !wiresPanelSecurity.WiresAccessible) + return; + if (TryComp(args.User, out ActorComponent? actor)) { _uiSystem.TryOpen(uid, WiresUiKey.Key, actor.PlayerSession);