From 47c88c294b1c4d55e7d5460aca7b96fffb2278b3 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Mon, 26 Oct 2020 13:00:28 +0200 Subject: [PATCH] Disable Pulling When Buckling an entity (#2374) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Disable Pulling When Buckling an entity * Update Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Co-authored-by: DrSmugleaf Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> --- .../GameObjects/Components/Buckle/BuckleComponent.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs b/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs index 245f4051a2..ee429279d7 100644 --- a/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs +++ b/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs @@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis; using Content.Server.GameObjects.Components.GUI; using Content.Server.GameObjects.Components.Mobs; using Content.Server.GameObjects.Components.Mobs.State; +using Content.Server.GameObjects.Components.Pulling; using Content.Server.GameObjects.Components.Strap; using Content.Server.GameObjects.EntitySystems; using Content.Shared.GameObjects.Components.Buckle; @@ -14,6 +15,7 @@ using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; +using NFluidsynth; using Robust.Server.GameObjects; using Robust.Server.GameObjects.EntitySystemMessages; using Robust.Server.GameObjects.EntitySystems; @@ -27,6 +29,7 @@ using Robust.Shared.Interfaces.Map; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.Localization; +using Robust.Shared.Log; using Robust.Shared.Maths; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; @@ -286,6 +289,15 @@ namespace Content.Server.GameObjects.Components.Buckle Owner.EntityManager.EventBus.SubscribeEvent(EventSource.Local, this, MoveEvent); + + if (Owner.TryGetComponent(out PullableComponent? pullableComponent)) + { + if (pullableComponent.Puller != null) + { + pullableComponent.TryStopPull(); + } + } + return true; }