Trading post doesn't try to spawn in the lobby

I love tests!!!
This commit is contained in:
null 2024-05-07 03:37:52 +02:00
parent 54006e46e6
commit d0fb9c800d
No known key found for this signature in database
GPG Key ID: 212F05528FD678BE
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
using System.Linq;
using Content.Server.Cargo.Components;
using Content.Server.GameTicking;
using Content.Server.GameTicking.Events;
using Content.Server.Shuttles.Components;
using Content.Server.Station.Systems;
@ -50,7 +51,7 @@ public sealed partial class CargoSystem
private void SetGridFill(bool obj)
{
if (obj)
if (obj && _ticker.RunLevel != GameRunLevel.PreRoundLobby) // Ensure run level is in game
{
SetupTradePost();
}

View File

@ -1,6 +1,7 @@
using Content.Server.Access.Systems;
using Content.Server.Cargo.Components;
using Content.Server.DeviceLinking.Systems;
using Content.Server.GameTicking;
using Content.Server.Paper;
using Content.Server.Popups;
using Content.Server.Shuttles.Systems;
@ -50,6 +51,7 @@ public sealed partial class CargoSystem : SharedCargoSystem
[Dependency] private readonly IComponentFactory _factory = default!;
[Dependency] private readonly MapLoaderSystem _mapLoader = default!;
[Dependency] private readonly RadioSystem _radio = default!;
[Dependency] private readonly GameTicker _ticker = default!; // DeltaV - Used to make sure the trading post doens't load in the lobby :<
private EntityQuery<TransformComponent> _xformQuery;
private EntityQuery<CargoSellBlacklistComponent> _blacklistQuery;