From 9c3a603e7ec60adb8e227c43ff710abd06a95413 Mon Sep 17 00:00:00 2001 From: metalgearsloth Date: Wed, 27 Oct 2021 01:07:19 +1100 Subject: [PATCH] Use ActionBlockerSystem as a dependency on CGSystem --- Content.Server/Construction/ConstructionSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Construction/ConstructionSystem.cs b/Content.Server/Construction/ConstructionSystem.cs index 2fa3757b7c..dfac184807 100644 --- a/Content.Server/Construction/ConstructionSystem.cs +++ b/Content.Server/Construction/ConstructionSystem.cs @@ -42,6 +42,7 @@ namespace Content.Server.Construction [Dependency] private readonly IRobustRandom _robustRandom = default!; [Dependency] private readonly DoAfterSystem _doAfterSystem = default!; [Dependency] private readonly StackSystem _stackSystem = default!; + [Dependency] private readonly ActionBlockerSystem _blockerSystem = default!; private readonly Dictionary> _beingBuilt = new(); @@ -389,7 +390,7 @@ namespace Content.Server.Construction var user = args.SenderSession.AttachedEntity; - if (user == null || !Get().CanInteract(user)) return; + if (user == null || !_blockerSystem.CanInteract(user)) return; if (!user.TryGetComponent(out HandsComponent? hands)) return; @@ -490,7 +491,7 @@ namespace Content.Server.Construction } if (user == null - || !Get().CanInteract(user) + || !_blockerSystem.CanInteract(user) || !user.TryGetComponent(out HandsComponent? hands) || hands.GetActiveHand == null || !user.InRangeUnobstructed(ev.Location, ignoreInsideBlocker:constructionPrototype.CanBuildInImpassable)) {