From d1236ff99516a84ba078f8cf2805d8b7f8622622 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 30 Aug 2023 21:02:58 +1000 Subject: [PATCH] Fix cargo trading post (#19656) --- Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs b/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs index a49d0bddd8..ac208df187 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs @@ -1,5 +1,6 @@ using System.Linq; using Content.Server.Cargo.Components; +using Content.Server.GameTicking.Events; using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Events; using Content.Shared.Stacks; @@ -41,6 +42,8 @@ public sealed partial class CargoSystem SubscribeLocalEvent(OnPalletUIOpen); SubscribeLocalEvent(OnRoundRestart); + SubscribeLocalEvent(OnRoundStart); + _cfgManager.OnValueChanged(CCVars.GridFill, SetGridFill); } @@ -371,7 +374,10 @@ public sealed partial class CargoSystem { Reset(); CleanupCargoShuttle(); + } + private void OnRoundStart(RoundStartingEvent ev) + { if (_cfgManager.GetCVar(CCVars.GridFill)) SetupCargoShuttle(); }