]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix FTL docks not opening (#25808)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sun, 3 Mar 2024 15:00:52 +0000 (02:00 +1100)
committerGitHub <noreply@github.com>
Sun, 3 Mar 2024 15:00:52 +0000 (02:00 +1100)
Content.Server/Shuttles/Systems/ArrivalsSystem.cs
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs

index 9a615a23d813004b0c03f070bc4654e02743e65a..f4dd502b37523470d885c5420dbe95465b091a42 100644 (file)
@@ -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))
index fc01a5d36f9adec752db05f041727c707f56972f..07dfd1faf599edc8f4c9f2213d05bb5ee1acbae8 100644 (file)
@@ -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