]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update BiomeSystem.cs to not use Component.Owner (#29939)
authorPlykiya <58439124+Plykiya@users.noreply.github.com>
Fri, 12 Jul 2024 09:22:24 +0000 (02:22 -0700)
committerGitHub <noreply@github.com>
Fri, 12 Jul 2024 09:22:24 +0000 (19:22 +1000)
Update BiomeSystem.cs

Co-authored-by: plykiya <plykiya@protonmail.com>
Content.Server/Parallax/BiomeSystem.cs

index 7e854e8bbfb7de931f2eb4838528ca6805e11d6f..d3919347f769982d8578f831d6c69e12e8f940e3 100644 (file)
@@ -126,20 +126,18 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
         var xform = Transform(uid);
         var mapId = xform.MapID;
 
-        if (mapId != MapId.Nullspace && TryComp(uid, out MapGridComponent? mapGrid))
+        if (mapId != MapId.Nullspace && HasComp<MapGridComponent>(uid))
         {
             var setTiles = new List<(Vector2i Index, Tile tile)>();
 
-            foreach (var grid in _mapManager.GetAllMapGrids(mapId))
+            foreach (var grid in _mapManager.GetAllGrids(mapId))
             {
-                var gridUid = grid.Owner;
-
-                if (!_fixturesQuery.TryGetComponent(gridUid, out var fixtures))
+                if (!_fixturesQuery.TryGetComponent(grid.Owner, out var fixtures))
                     continue;
 
                 // Don't want shuttles flying around now do we.
-                _shuttles.Disable(gridUid);
-                var pTransform = _physics.GetPhysicsTransform(gridUid);
+                _shuttles.Disable(grid.Owner);
+                var pTransform = _physics.GetPhysicsTransform(grid.Owner);
 
                 foreach (var fixture in fixtures.Fixtures.Values)
                 {