Fix FTL docks not opening (#25808)
This commit is contained in:
@@ -417,13 +417,6 @@ public sealed class ArrivalsSystem : EntitySystem
|
||||
var curTime = _timing.CurTime;
|
||||
TryGetArrivals(out var arrivals);
|
||||
|
||||
// TODO: FTL fucker, if on an edge tile every N seconds check for wall or w/e
|
||||
// TODO: Docking should be per-grid rather than per dock and bump off when undocking.
|
||||
|
||||
// TODO: Stop dispatch if emergency shuttle has arrived.
|
||||
// TODO: Need maps
|
||||
// TODO: Need emergency suits on shuttle probs
|
||||
// TODO: Need some kind of comp to shunt people off if they try to get on?
|
||||
if (TryComp<TransformComponent>(arrivals, out var arrivalsXform))
|
||||
{
|
||||
while (query.MoveNext(out var uid, out var comp, out var shuttle, out var xform))
|
||||
|
||||
@@ -447,21 +447,20 @@ public sealed partial class ShuttleSystem
|
||||
var config = _dockSystem.GetDockingConfigAt(uid, target.EntityId, target, entity.Comp1.TargetAngle);
|
||||
MapCoordinates mapCoordinates;
|
||||
Angle targetAngle;
|
||||
mapCoordinates = _transform.ToMapCoordinates(target);
|
||||
|
||||
// Couldn't dock somehow so just fallback to regular position FTL.
|
||||
if (config == null)
|
||||
{
|
||||
mapCoordinates = _transform.ToMapCoordinates(target);
|
||||
targetAngle = entity.Comp1.TargetAngle;
|
||||
target = new EntityCoordinates(_mapManager.GetMapEntityId(mapCoordinates.MapId), mapCoordinates.Position);
|
||||
_transform.SetCoordinates(uid, xform, target, rotation: targetAngle);
|
||||
}
|
||||
else
|
||||
{
|
||||
mapCoordinates = _transform.ToMapCoordinates(config.Coordinates);
|
||||
targetAngle = config.Angle;
|
||||
FTLDock((uid, xform), config);
|
||||
}
|
||||
|
||||
target = new EntityCoordinates(_mapManager.GetMapEntityId(mapCoordinates.MapId), mapCoordinates.Position);
|
||||
_transform.SetCoordinates(uid, xform, target, rotation: targetAngle);
|
||||
mapId = mapCoordinates.MapId;
|
||||
}
|
||||
// Position ftl
|
||||
|
||||
Reference in New Issue
Block a user