]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
change locking to use ComplexInteraction (#34326)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Thu, 9 Jan 2025 11:23:37 +0000 (11:23 +0000)
committerGitHub <noreply@github.com>
Thu, 9 Jan 2025 11:23:37 +0000 (12:23 +0100)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Shared/Lock/LockSystem.cs

index 411766d8c1f98992713d7d42c94094654316878f..10652800953324aa0707f39c45207aabcd0d25c8 100644 (file)
@@ -1,10 +1,10 @@
 using Content.Shared.Access.Components;
 using Content.Shared.Access.Systems;
+using Content.Shared.ActionBlocker;
 using Content.Shared.Construction.Components;
 using Content.Shared.DoAfter;
 using Content.Shared.Emag.Systems;
 using Content.Shared.Examine;
-using Content.Shared.Hands.Components;
 using Content.Shared.IdentityManagement;
 using Content.Shared.Interaction;
 using Content.Shared.Popups;
@@ -26,6 +26,7 @@ namespace Content.Shared.Lock;
 public sealed class LockSystem : EntitySystem
 {
     [Dependency] private readonly AccessReaderSystem _accessReader = default!;
+    [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!;
     [Dependency] private readonly ActivatableUISystem _activatableUI = default!;
     [Dependency] private readonly SharedAppearanceSystem _appearanceSystem = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
@@ -246,7 +247,7 @@ public sealed class LockSystem : EntitySystem
     /// </summary>
     public bool CanToggleLock(EntityUid uid, EntityUid user, bool quiet = true)
     {
-        if (!HasComp<HandsComponent>(user))
+        if (!_actionBlocker.CanComplexInteract(user))
             return false;
 
         var ev = new LockToggleAttemptEvent(user, quiet);