From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Sun, 3 Mar 2024 15:00:52 +0000 (+1100) Subject: Fix FTL docks not opening (#25808) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=21a95960f0fd04b6d99cd7c6617985a7eb5e9175;p=space-station-14.git Fix FTL docks not opening (#25808) --- diff --git a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs index 9a615a23d8..f4dd502b37 100644 --- a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs +++ b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs @@ -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(arrivals, out var arrivalsXform)) { while (query.MoveNext(out var uid, out var comp, out var shuttle, out var xform)) diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index fc01a5d36f..07dfd1faf5 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -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