Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Шаттлы прибытия больше не отстыковывают все от станции #92

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading