Fix drone console docking (#25822)

This commit is contained in:
metalgearsloth
2024-03-04 16:46:45 +11:00
committed by GitHub
parent 87e2755c31
commit 4b6e5deb59
2 changed files with 10 additions and 2 deletions

View File

@@ -377,7 +377,15 @@ namespace Content.Server.Shuttles.Systems
private void OnRequestDock(EntityUid uid, ShuttleConsoleComponent component, DockRequestMessage args) 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)) if (!CanShuttleDock(shuttleUid))
{ {

View File

@@ -10,7 +10,7 @@ public sealed partial class ShuttleConsoleSystem
/// <summary> /// <summary>
/// Gets the drone console target if applicable otherwise returns itself. /// Gets the drone console target if applicable otherwise returns itself.
/// </summary> /// </summary>
private EntityUid? GetDroneConsole(EntityUid consoleUid) public EntityUid? GetDroneConsole(EntityUid consoleUid)
{ {
var getShuttleEv = new ConsoleShuttleEvent var getShuttleEv = new ConsoleShuttleEvent
{ {