Move some Station methods into shared (#38976)
This commit is contained in:
@@ -11,7 +11,6 @@ using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Server.Spawners.Components;
|
||||
using Content.Server.Spawners.EntitySystems;
|
||||
using Content.Server.Station.Components;
|
||||
using Content.Server.Station.Events;
|
||||
using Content.Server.Station.Systems;
|
||||
using Content.Shared.Administration;
|
||||
@@ -224,7 +223,7 @@ public sealed class ArrivalsSystem : EntitySystem
|
||||
|
||||
if (component.FirstRun)
|
||||
{
|
||||
var station = _station.GetLargestGrid(Comp<StationDataComponent>(component.Station));
|
||||
var station = _station.GetLargestGrid(component.Station);
|
||||
sourceMap = station == null ? null : Transform(station.Value)?.MapUid;
|
||||
arrivalsDelay += RoundStartFTLDuration;
|
||||
component.FirstRun = false;
|
||||
@@ -470,7 +469,7 @@ public sealed class ArrivalsSystem : EntitySystem
|
||||
{
|
||||
while (query.MoveNext(out var uid, out var comp, out var shuttle, out var xform))
|
||||
{
|
||||
if (comp.NextTransfer > curTime || !TryComp<StationDataComponent>(comp.Station, out var data))
|
||||
if (comp.NextTransfer > curTime)
|
||||
continue;
|
||||
|
||||
var tripTime = _shuttles.DefaultTravelTime + _shuttles.DefaultStartupTime;
|
||||
@@ -486,7 +485,7 @@ public sealed class ArrivalsSystem : EntitySystem
|
||||
// Go to station
|
||||
else
|
||||
{
|
||||
var targetGrid = _station.GetLargestGrid(data);
|
||||
var targetGrid = _station.GetLargestGrid(comp.Station);
|
||||
|
||||
if (targetGrid != null)
|
||||
_shuttles.FTLToDock(uid, shuttle, targetGrid.Value);
|
||||
|
||||
Reference in New Issue
Block a user