From 1ecd07319d2d58f936efe93811643667dbb517cd Mon Sep 17 00:00:00 2001 From: pathetic meowmeow Date: Thu, 17 Apr 2025 10:53:04 -0400 Subject: [PATCH] Fix sales by making ATS station-owned (#3494) --- Content.Server/_DV/Cargo/Systems/CargoSystem.ATS.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Content.Server/_DV/Cargo/Systems/CargoSystem.ATS.cs b/Content.Server/_DV/Cargo/Systems/CargoSystem.ATS.cs index 149db35197..dfb5432aaf 100644 --- a/Content.Server/_DV/Cargo/Systems/CargoSystem.ATS.cs +++ b/Content.Server/_DV/Cargo/Systems/CargoSystem.ATS.cs @@ -6,6 +6,7 @@ using Content.Server.Station.Systems; using Content.Shared.Cargo.Components; using Content.Shared.CCVar; using Content.Shared.Shuttles.Components; +using Content.Shared.Station.Components; using Content.Shared.Tiles; using Content.Shared.Whitelist; using Robust.Shared.Configuration; @@ -46,7 +47,7 @@ public sealed partial class CargoSystem return; if (_gridFillEnabled) - SetupTradePost(); + SetupTradePost(args); } private void SetGridFill(bool enabled) @@ -54,11 +55,11 @@ public sealed partial class CargoSystem _gridFillEnabled = enabled; if (enabled && _ticker.RunLevel != GameRunLevel.PreRoundLobby) // Ensure run level is in game { - SetupTradePost(); + SetupTradePost(null); } } - private void SetupTradePost() + private void SetupTradePost(StationInitializedEvent? args) { if (Exists(CargoMap)) return; @@ -78,6 +79,10 @@ public sealed partial class CargoSystem var gridUid = grid.Value; EnsureComp(gridUid); EnsureComp(gridUid); + if (args is { } arg) + { + EnsureComp(gridUid).Station = arg.Station; + } var shuttleComp = EnsureComp(gridUid); shuttleComp.AngularDamping = 10000;