Fix cargo trading post (#19656)

This commit is contained in:
metalgearsloth
2023-08-30 21:02:58 +10:00
committed by GitHub
parent c99e365ce7
commit d1236ff995

View File

@@ -1,5 +1,6 @@
using System.Linq; using System.Linq;
using Content.Server.Cargo.Components; using Content.Server.Cargo.Components;
using Content.Server.GameTicking.Events;
using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events; using Content.Server.Shuttles.Events;
using Content.Shared.Stacks; using Content.Shared.Stacks;
@@ -41,6 +42,8 @@ public sealed partial class CargoSystem
SubscribeLocalEvent<CargoPalletConsoleComponent, BoundUIOpenedEvent>(OnPalletUIOpen); SubscribeLocalEvent<CargoPalletConsoleComponent, BoundUIOpenedEvent>(OnPalletUIOpen);
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart); SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
SubscribeLocalEvent<RoundStartingEvent>(OnRoundStart);
_cfgManager.OnValueChanged(CCVars.GridFill, SetGridFill); _cfgManager.OnValueChanged(CCVars.GridFill, SetGridFill);
} }
@@ -371,7 +374,10 @@ public sealed partial class CargoSystem
{ {
Reset(); Reset();
CleanupCargoShuttle(); CleanupCargoShuttle();
}
private void OnRoundStart(RoundStartingEvent ev)
{
if (_cfgManager.GetCVar(CCVars.GridFill)) if (_cfgManager.GetCVar(CCVars.GridFill))
SetupCargoShuttle(); SetupCargoShuttle();
} }