From 4b6e5deb59f53d8d66a2ea9f7af276c0f2aff19d Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Mon, 4 Mar 2024 16:46:45 +1100 Subject: [PATCH] Fix drone console docking (#25822) --- Content.Server/Shuttles/Systems/DockingSystem.cs | 10 +++++++++- .../Shuttles/Systems/ShuttleConsoleSystem.Drone.cs | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Content.Server/Shuttles/Systems/DockingSystem.cs b/Content.Server/Shuttles/Systems/DockingSystem.cs index 8220818b23..59a030e83c 100644 --- a/Content.Server/Shuttles/Systems/DockingSystem.cs +++ b/Content.Server/Shuttles/Systems/DockingSystem.cs @@ -377,7 +377,15 @@ namespace Content.Server.Shuttles.Systems private void OnRequestDock(EntityUid uid, ShuttleConsoleComponent component, DockRequestMessage args) { - var shuttleUid = Transform(uid).GridUid; + var console = _console.GetDroneConsole(uid); + + if (console == null) + { + _popup.PopupCursor(Loc.GetString("shuttle-console-dock-fail")); + return; + } + + var shuttleUid = Transform(console.Value).GridUid; if (!CanShuttleDock(shuttleUid)) { diff --git a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs index 2970567b3e..3af461beda 100644 --- a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs +++ b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs @@ -10,7 +10,7 @@ public sealed partial class ShuttleConsoleSystem /// /// Gets the drone console target if applicable otherwise returns itself. /// - private EntityUid? GetDroneConsole(EntityUid consoleUid) + public EntityUid? GetDroneConsole(EntityUid consoleUid) { var getShuttleEv = new ConsoleShuttleEvent {