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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user