diff --git a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs index a61f7c3ec8..0f9e9b5ebe 100644 --- a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs +++ b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs @@ -791,7 +791,7 @@ public abstract partial class InteractionTest gridUid = gridEnt; gridComp = gridEnt.Comp; var gridXform = SEntMan.GetComponent(gridUid); - Transform.SetWorldPosition(gridXform, pos.Position); + Transform.SetWorldPosition((gridUid, gridXform), pos.Position); MapSystem.SetTile((gridUid, gridComp), SEntMan.GetCoordinates(coords ?? TargetCoords), tile); if (!MapMan.TryFindGridAt(pos, out _, out _)) diff --git a/Content.Server/Connection/ConnectionManager.cs b/Content.Server/Connection/ConnectionManager.cs index dbc43ac47a..9e6ba89d91 100644 --- a/Content.Server/Connection/ConnectionManager.cs +++ b/Content.Server/Connection/ConnectionManager.cs @@ -62,6 +62,9 @@ namespace Content.Server.Connection [Dependency] private readonly IChatManager _chatManager = default!; [Dependency] private readonly IHttpClientHolder _http = default!; [Dependency] private readonly IAdminManager _adminManager = default!; + [Dependency] private readonly IEntityManager _entityManager = default!; + + private GameTicker? _ticker; private ISawmill _sawmill = default!; private readonly Dictionary _temporaryBypasses = []; @@ -288,8 +291,9 @@ namespace Content.Server.Connection } } - var wasInGame = EntitySystem.TryGet(out var ticker) && - ticker.PlayerGameStatuses.TryGetValue(userId, out var status) && + _ticker ??= _entityManager.SystemOrNull(); + var wasInGame = _ticker != null && + _ticker.PlayerGameStatuses.TryGetValue(userId, out var status) && status == PlayerGameStatus.JoinedGame; var adminBypass = _cfg.GetCVar(CCVars.AdminBypassMaxPlayers) && adminData != null; var softPlayerCount = _plyMgr.PlayerCount; diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index fc02bf8826..2fc11db4a4 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -544,7 +544,7 @@ public sealed partial class ShuttleSystem comp.State = FTLState.Cooldown; comp.StateTime = StartEndTime.FromCurTime(_gameTiming, FTLCooldown); _console.RefreshShuttleConsoles(uid); - _mapManager.SetMapPaused(mapId, false); + _mapSystem.SetPaused(mapId, false); Smimsh(uid, xform: xform); var ftlEvent = new FTLCompletedEvent(uid, _mapSystem.GetMap(mapId)); diff --git a/Content.Server/StationEvents/Events/BluespaceLockerRule.cs b/Content.Server/StationEvents/Events/BluespaceLockerRule.cs index 0dd4e92477..c07b178093 100644 --- a/Content.Server/StationEvents/Events/BluespaceLockerRule.cs +++ b/Content.Server/StationEvents/Events/BluespaceLockerRule.cs @@ -4,14 +4,14 @@ using Content.Server.Storage.Components; using Content.Server.Storage.EntitySystems; using Content.Shared.Access.Components; using Content.Shared.Station.Components; -using Content.Shared.GameTicking.Components; -using Content.Shared.Coordinates; +using Content.Shared.GameTicking.Components; namespace Content.Server.StationEvents.Events; public sealed class BluespaceLockerRule : StationEventSystem { [Dependency] private readonly BluespaceLockerSystem _bluespaceLocker = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; protected override void Started(EntityUid uid, BluespaceLockerRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) { @@ -25,12 +25,11 @@ public sealed class BluespaceLockerRule : StationEventSystem(potentialLink) || HasComp(potentialLink) || - !HasComp(potentialLink.ToCoordinates().GetGridUid(EntityManager))) + !HasComp(_transform.GetGrid(potentialLink))) continue; var comp = AddComp(potentialLink);