Move some Station methods into shared (#38976)

This commit is contained in:
Nemanja
2025-08-08 11:22:34 -04:00
committed by GitHub
parent 3d9e1f64a9
commit 1374ceea47
41 changed files with 298 additions and 351 deletions

View File

@@ -9,7 +9,6 @@ using Content.Server.GameTicking;
using Content.Server.Screens.Components;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Systems;
using Content.Server.Station.Components;
using Content.Server.Station.Systems;
using Content.Shared.Database;
using Content.Shared.DeviceNetwork;
@@ -20,6 +19,7 @@ using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Content.Shared.DeviceNetwork.Components;
using Content.Shared.Station.Components;
using Timer = Robust.Shared.Timing.Timer;
namespace Content.Server.RoundEnd
@@ -97,10 +97,10 @@ namespace Content.Server.RoundEnd
/// </summary>
public EntityUid? GetStation()
{
AllEntityQuery<StationEmergencyShuttleComponent, StationDataComponent>().MoveNext(out _, out _, out var data);
AllEntityQuery<StationEmergencyShuttleComponent, StationDataComponent>().MoveNext(out var uid, out _, out var data);
if (data == null)
return null;
var targetGrid = _stationSystem.GetLargestGrid(data);
var targetGrid = _stationSystem.GetLargestGrid((uid, data));
return targetGrid == null ? null : Transform(targetGrid.Value).MapUid;
}