Fix shuttle arrival visualizer (#35772)

* Fix shuttle arrival visualizer

It was at a fixed spot but if the target is rotating it wasn't handled.

* hew

* Fixes
This commit is contained in:
metalgearsloth
2025-04-15 00:34:18 +10:00
committed by GitHub
parent 595b1f5073
commit dfa5ccf625
4 changed files with 18 additions and 6 deletions

View File

@@ -79,7 +79,7 @@ public sealed partial class DockingSystem
return false;
shuttleDockedAABB = matty.TransformBox(shuttleAABB);
gridRotation = (targetGridRotation + offsetAngle).Reduced();
gridRotation = offsetAngle.Reduced();
return true;
}
@@ -125,7 +125,8 @@ public sealed partial class DockingSystem
public DockingConfig? GetDockingConfigAt(EntityUid shuttleUid,
EntityUid targetGrid,
EntityCoordinates coordinates,
Angle angle)
Angle angle,
bool fallback = true)
{
var gridDocks = GetDocks(targetGrid);
var shuttleDocks = GetDocks(shuttleUid);
@@ -140,6 +141,11 @@ public sealed partial class DockingSystem
}
}
if (fallback && configs.Count > 0)
{
return configs.First();
}
return null;
}