Skip to content

Commit

Permalink
Шаттлы прибытия больше не отстыковывают все от станции (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay authored Jun 12, 2024
1 parent caf6248 commit f1a53f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,8 @@ private bool CanDock(
!shuttleDockXform.Anchored ||
!gridDockXform.Anchored))
{
if (ignored)
{
Undock(gridDock);
}
else
{
if (!ignored)
return false;
}
}

// First, get the station dock's position relative to the shuttle, this is where we rotate it around
Expand Down Expand Up @@ -213,10 +207,7 @@ private List<DockingConfig> GetDockingConfigs(
// Check if there's no intersecting grids (AKA oh god it's docking at cargo).
grids.Clear();
_mapManager.FindGridsIntersecting(targetGridXform.MapID, dockedBounds, ref grids, includeMap: false);
if (ignored)
{
}
else if (grids.Any(o => o.Owner != targetGrid && o.Owner != targetGridXform.MapUid))
if (grids.Any(o => o.Owner != targetGrid && o.Owner != targetGridXform.MapUid) && !ignored)
{
continue;
}
Expand Down
5 changes: 5 additions & 0 deletions Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ private void OnShuttleRequestPosition(EmergencyShuttleRequestPositionMessage msg
if (config == null)
return;

foreach (var configDock in config.Docks)
{
_dock.Undock((configDock.DockBUid, configDock.DockB));
}

RaiseNetworkEvent(new EmergencyShuttlePositionMessage()
{
StationUid = GetNetEntity(targetGrid),
Expand Down

0 comments on commit f1a53f5

Please sign in to comment.