We're done here.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Server.Shuttles.Systems;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.DeltaV.Shuttles;
|
||||
using Content.Shared.DeltaV.Shuttles.Components;
|
||||
using Content.Shared.DeltaV.Shuttles.Systems;
|
||||
using Content.Shared.Shuttles.Components;
|
||||
using Content.Shared.Shuttles.Systems;
|
||||
using Content.Shared.Station.Components;
|
||||
using Content.Shared.Timing;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Map;
|
||||
@@ -16,8 +18,10 @@ namespace Content.Server.DeltaV.Shuttles.Systems;
|
||||
public sealed class DockingConsoleSystem : SharedDockingConsoleSystem
|
||||
{
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
[Dependency] private readonly SharedUserInterfaceSystem _ui = default!;
|
||||
[Dependency] private readonly ShuttleSystem _shuttle = default!;
|
||||
[Dependency] private readonly StationSystem _station = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -114,7 +118,10 @@ public sealed class DockingConsoleSystem : SharedDockingConsoleSystem
|
||||
if (FindLargestGrid(map) is not {} grid)
|
||||
return;
|
||||
|
||||
Log.Debug($"{ToPrettyString(args.Actor):user} is FTL-docking {ToPrettyString(shuttle):shuttle} to {ToPrettyString(grid):grid}");
|
||||
|
||||
_shuttle.FTLToDock(shuttle, Comp<ShuttleComponent>(shuttle), grid, priorityTag: ent.Comp.DockTag);
|
||||
UpdateUI(ent);
|
||||
}
|
||||
|
||||
private EntityUid? FindLargestGrid(MapId map)
|
||||
@@ -122,6 +129,12 @@ public sealed class DockingConsoleSystem : SharedDockingConsoleSystem
|
||||
EntityUid? largestGrid = null;
|
||||
var largestSize = 0f;
|
||||
|
||||
if (_station.GetStationInMap(map) is {} station)
|
||||
{
|
||||
// prevent picking vgroid and stuff
|
||||
return _station.GetLargestGrid(station); // May need to get the StationDataComponent if this doesn't work
|
||||
}
|
||||
|
||||
var query = EntityQueryEnumerator<MapGridComponent, TransformComponent>();
|
||||
while (query.MoveNext(out var gridUid, out var grid, out var xform))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user