]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix some misc warnings (#37858)
authorTayrtahn <tayrtahn@gmail.com>
Tue, 27 May 2025 23:54:19 +0000 (19:54 -0400)
committerGitHub <noreply@github.com>
Tue, 27 May 2025 23:54:19 +0000 (19:54 -0400)
Fix misc warnings

Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs
Content.Server/Connection/ConnectionManager.cs
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
Content.Server/StationEvents/Events/BluespaceLockerRule.cs

index a61f7c3ec860761d97589e0e8f68f6ecd15b67e6..0f9e9b5ebe804d44a6417ef16a38d03f69b4464e 100644 (file)
@@ -791,7 +791,7 @@ public abstract partial class InteractionTest
             gridUid = gridEnt;
             gridComp = gridEnt.Comp;
             var gridXform = SEntMan.GetComponent<TransformComponent>(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 _))
index dbc43ac47a0ee9b09837cc63e564a3409d6eac3c..9e6ba89d91ba8d2d303c814cd475182fbd1f5fff 100644 (file)
@@ -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<NetUserId, TimeSpan> _temporaryBypasses = [];
@@ -288,8 +291,9 @@ namespace Content.Server.Connection
                 }
             }
 
-            var wasInGame = EntitySystem.TryGet<GameTicker>(out var ticker) &&
-                            ticker.PlayerGameStatuses.TryGetValue(userId, out var status) &&
+            _ticker ??= _entityManager.SystemOrNull<GameTicker>();
+            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;
index fc02bf8826c9b22dd3d5924b70bad2f3f7fa3f95..2fc11db4a49d2fe72d67868bca6429ec851e8149 100644 (file)
@@ -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));
index 0dd4e9247706f4f5642f800e68f0fb354745ebe2..c07b178093a3ccdcc69184d0c7887f80a3508c4e 100644 (file)
@@ -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<BluespaceLockerRuleComponent>
 {
     [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<BluespaceLockerRule
         }
 
         RobustRandom.Shuffle(targets);
-
         foreach (var potentialLink in targets)
         {
             if (HasComp<AccessReaderComponent>(potentialLink) ||
                 HasComp<BluespaceLockerComponent>(potentialLink) ||
-                !HasComp<StationMemberComponent>(potentialLink.ToCoordinates().GetGridUid(EntityManager)))
+                !HasComp<StationMemberComponent>(_transform.GetGrid(potentialLink)))
                 continue;
 
             var comp = AddComp<BluespaceLockerComponent>(potentialLink);