]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix drone console docking (#25822)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Mon, 4 Mar 2024 05:46:45 +0000 (16:46 +1100)
committerGitHub <noreply@github.com>
Mon, 4 Mar 2024 05:46:45 +0000 (16:46 +1100)
Content.Server/Shuttles/Systems/DockingSystem.cs
Content.Server/Shuttles/Systems/ShuttleConsoleSystem.Drone.cs

index 8220818b2311310b52ac7e90b0f27c69ad9e4af5..59a030e83c972dae8458479ad8c1fbc652939472 100644 (file)
@@ -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))
             {
index 2970567b3ee3670ddafdc07f73153313fb9f80da..3af461bedac924fb502164aac1c11c41390d562c 100644 (file)
@@ -10,7 +10,7 @@ public sealed partial class ShuttleConsoleSystem
     /// <summary>
     /// Gets the drone console target if applicable otherwise returns itself.
     /// </summary>
-    private EntityUid? GetDroneConsole(EntityUid consoleUid)
+    public EntityUid? GetDroneConsole(EntityUid consoleUid)
     {
         var getShuttleEv = new ConsoleShuttleEvent
         {