From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 9 Jan 2025 11:23:37 +0000 (+0000) Subject: change locking to use ComplexInteraction (#34326) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=04984984fe9362be9e2553b4274358a3f83cc160;p=space-station-14.git change locking to use ComplexInteraction (#34326) Co-authored-by: deltanedas <@deltanedas:kde.org> --- diff --git a/Content.Shared/Lock/LockSystem.cs b/Content.Shared/Lock/LockSystem.cs index 411766d8c1..1065280095 100644 --- a/Content.Shared/Lock/LockSystem.cs +++ b/Content.Shared/Lock/LockSystem.cs @@ -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 /// public bool CanToggleLock(EntityUid uid, EntityUid user, bool quiet = true) { - if (!HasComp(user)) + if (!_actionBlocker.CanComplexInteract(user)) return false; var ev = new LockToggleAttemptEvent(user, quiet);