From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Mon, 4 Mar 2024 05:46:45 +0000 (+1100) Subject: Fix drone console docking (#25822) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4b6e5deb59f53d8d66a2ea9f7af276c0f2aff19d;p=space-station-14.git Fix drone console docking (#25822) --- 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 {