From 2b3cc9e868fe69262f4c1c2d469b49bff4ef75db Mon Sep 17 00:00:00 2001 From: "A.Ne." <138010940+comasqw@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:12:58 +0400 Subject: [PATCH] key rings fix (#620) * key rings fix * Update SharedCP14LockKeySystem.cs --- Content.Shared/_CP14/LockKey/SharedCP14LockKeySystem.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Shared/_CP14/LockKey/SharedCP14LockKeySystem.cs b/Content.Shared/_CP14/LockKey/SharedCP14LockKeySystem.cs index 89a34f7cc1..323ca62678 100644 --- a/Content.Shared/_CP14/LockKey/SharedCP14LockKeySystem.cs +++ b/Content.Shared/_CP14/LockKey/SharedCP14LockKeySystem.cs @@ -85,9 +85,6 @@ public sealed class SharedCP14LockKeySystem : EntitySystem if (!args.CanReach || args.Target is not { Valid: true }) return; - if (_doorQuery.TryComp(args.Target, out var doorComponent) && doorComponent.State == DoorState.Open) - return; - if (!_lockQuery.TryComp(args.Target, out _)) return; @@ -231,6 +228,9 @@ public sealed class SharedCP14LockKeySystem : EntitySystem if (!TryComp(target, out var lockComp)) return; + if (_doorQuery.TryComp(target, out var doorComponent) && doorComponent.State == DoorState.Open) + return; + var keyShape = key.Comp.LockShape; var lockShape = target.Comp.LockShape;