From 531278ced16b8f913e47bdd382d31f6172692e2d Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 8 May 2020 14:01:33 +0200 Subject: [PATCH] added InRangeUnobstructed call to wire component --- Content.Server/GameObjects/Components/WiresComponent.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Server/GameObjects/Components/WiresComponent.cs b/Content.Server/GameObjects/Components/WiresComponent.cs index 18510e6908..d8c7a5b119 100644 --- a/Content.Server/GameObjects/Components/WiresComponent.cs +++ b/Content.Server/GameObjects/Components/WiresComponent.cs @@ -234,6 +234,14 @@ namespace Content.Server.GameObjects.Components _notifyManager.PopupMessage(Owner.Transform.GridPosition, player, _localizationManager.GetString("You have no hands.")); return; } + + var interactionSystem = IoCManager.Resolve().GetEntitySystem(); + if (!interactionSystem.InRangeUnobstructed(player.Transform.MapPosition, Owner.Transform.WorldPosition, ignoredEnt: Owner)) + { + _notifyManager.PopupMessage(Owner.Transform.GridPosition, player, _localizationManager.GetString("You can't reach there!")); + return; + } + var activeHandEntity = handsComponent.GetActiveHand?.Owner; switch (msg.Action) {