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

@@ -1,9 +1,7 @@
using System.Numerics;
using Content.Server.Shuttles.Components;
using Content.Server.Station.Components;
using Content.Server.Station.Events;
using Content.Shared.CCVar;
using Content.Shared.Salvage;
using Content.Shared.Shuttles.Components;
using Content.Shared.Station.Components;
using Robust.Shared.Collections;
@@ -62,10 +60,7 @@ public sealed partial class ShuttleSystem
if (!_cfg.GetCVar(CCVars.GridFill))
return;
if (!TryComp(uid, out StationDataComponent? dataComp))
return;
var targetGrid = _station.GetLargestGrid(dataComp);
var targetGrid = _station.GetLargestGrid(uid);
if (targetGrid == null)
return;
@@ -165,12 +160,7 @@ public sealed partial class ShuttleSystem
if (!_cfg.GetCVar(CCVars.GridFill))
return;
if (!TryComp<StationDataComponent>(uid, out var data))
{
return;
}
var targetGrid = _station.GetLargestGrid(data);
var targetGrid = _station.GetLargestGrid(uid);
if (targetGrid == null)
return;