From f1a53f5cfec1991828f47b9a67e98c1025d83305 Mon Sep 17 00:00:00 2001 From: Vigers Ray <60344369+VigersRay@users.noreply.github.com> Date: Thu, 13 Jun 2024 01:58:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A8=D0=B0=D1=82=D1=82=D0=BB=D1=8B=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=D0=B1=D1=8B=D1=82=D0=B8=D1=8F=20=D0=B1=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D1=88=D0=B5=20=D0=BD=D0=B5=20=D0=BE=D1=82=D1=81=D1=82?= =?UTF-8?q?=D1=8B=D0=BA=D0=BE=D0=B2=D1=8B=D0=B2=D0=B0=D1=8E=D1=82=20=D0=B2?= =?UTF-8?q?=D1=81=D0=B5=20=D0=BE=D1=82=20=D1=81=D1=82=D0=B0=D0=BD=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20(#92)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Shuttles/Systems/DockingSystem.Shuttle.cs | 13 ++----------- .../Shuttles/Systems/EmergencyShuttleSystem.cs | 5 +++++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs b/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs index bdfc0e3d0dc..351dc97fe65 100644 --- a/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs +++ b/Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs @@ -60,14 +60,8 @@ private bool CanDock( !shuttleDockXform.Anchored || !gridDockXform.Anchored)) { - if (ignored) - { - Undock(gridDock); - } - else - { + if (!ignored) return false; - } } // First, get the station dock's position relative to the shuttle, this is where we rotate it around @@ -213,10 +207,7 @@ private List GetDockingConfigs( // Check if there's no intersecting grids (AKA oh god it's docking at cargo). grids.Clear(); _mapManager.FindGridsIntersecting(targetGridXform.MapID, dockedBounds, ref grids, includeMap: false); - if (ignored) - { - } - else if (grids.Any(o => o.Owner != targetGrid && o.Owner != targetGridXform.MapUid)) + if (grids.Any(o => o.Owner != targetGrid && o.Owner != targetGridXform.MapUid) && !ignored) { continue; } diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index 52de838826a..ac47f62bf9e 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -213,6 +213,11 @@ private void OnShuttleRequestPosition(EmergencyShuttleRequestPositionMessage msg if (config == null) return; + foreach (var configDock in config.Docks) + { + _dock.Undock((configDock.DockBUid, configDock.DockB)); + } + RaiseNetworkEvent(new EmergencyShuttlePositionMessage() { StationUid = GetNetEntity(targetGrid),