From b52c223a5d13061e7d8d4a2026ff441cd19138ef Mon Sep 17 00:00:00 2001 From: rhailrake <49613070+rhailrake@users.noreply.github.com> Date: Fri, 8 Sep 2023 18:29:57 +0600 Subject: [PATCH] fix (#375) --- Content.Server/Body/Systems/InternalsSystem.cs | 9 +++++++++ Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Content.Server/Body/Systems/InternalsSystem.cs b/Content.Server/Body/Systems/InternalsSystem.cs index b96e108968..23c44311fb 100644 --- a/Content.Server/Body/Systems/InternalsSystem.cs +++ b/Content.Server/Body/Systems/InternalsSystem.cs @@ -12,6 +12,11 @@ using Content.Shared.Inventory; using Content.Shared.Verbs; using Robust.Shared.Containers; using Robust.Shared.Prototypes; +using Content.Shared.Verbs; +using Content.Server.Popups; +using Content.Shared.ActionBlocker; +using Content.Shared.DoAfter; +using Content.Shared.Internals; using Robust.Shared.Utility; namespace Content.Server.Body.Systems; @@ -26,6 +31,7 @@ public sealed class InternalsSystem : EntitySystem [Dependency] private readonly HandsSystem _hands = default!; [Dependency] private readonly InventorySystem _inventory = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly ActionBlockerSystem _actionBlocker = default!; public const SlotFlags InventorySlots = SlotFlags.POCKET | SlotFlags.BELT; @@ -64,6 +70,9 @@ public sealed class InternalsSystem : EntitySystem if (!Resolve(uid, ref internals, false)) return; + if (_actionBlocker.CanInteract(user, uid) == false) + return; + // Toggle off if they're on if (AreInternalsWorking(internals)) { diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs index 63b7fc17a3..9fe4f97433 100644 --- a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs +++ b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs @@ -437,6 +437,9 @@ public abstract partial class SharedBuckleSystem if (HasComp(buckleUid) && buckleUid == userUid) return false; + if (ActionBlocker.CanInteract(userUid, buckleUid) == false) + return false; + // If the strap is a vehicle and the rider is not the person unbuckling, return. Unless the rider is crit or dead. if (TryComp(strapUid, out var vehicle) && vehicle.Rider != userUid && !_mobState.IsIncapacitated(buckleUid)) return false;