]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Use TurfSystem.IsTileBlocked instead of TurfHelpers (#32174)
authorWinkarst <74284083+Winkarst-cpu@users.noreply.github.com>
Wed, 18 Sep 2024 01:49:37 +0000 (04:49 +0300)
committerGitHub <noreply@github.com>
Wed, 18 Sep 2024 01:49:37 +0000 (11:49 +1000)
* Use TurfSystem.IsTileBlocked instead of TurfHelpers

* !

Content.Server/Engineering/EntitySystems/SpawnAfterInteractSystem.cs
Content.Server/Respawn/SpecialRespawnSystem.cs

index 8391e8faada5fbb08f439d78bfe959d059014179..407f877515aaf0fdccc5fb2b9d60f11ce0a9a666 100644 (file)
@@ -4,6 +4,7 @@ using Content.Shared.Coordinates.Helpers;
 using Content.Shared.DoAfter;
 using Content.Shared.Interaction;
 using Content.Shared.Maps;
+using Content.Shared.Physics;
 using Content.Shared.Stacks;
 using JetBrains.Annotations;
 using Robust.Shared.Map.Components;
@@ -15,6 +16,7 @@ namespace Content.Server.Engineering.EntitySystems
     {
         [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
         [Dependency] private readonly StackSystem _stackSystem = default!;
+        [Dependency] private readonly TurfSystem _turfSystem = default!;
 
         public override void Initialize()
         {
@@ -36,7 +38,7 @@ namespace Content.Server.Engineering.EntitySystems
 
             bool IsTileClear()
             {
-                return tileRef.Tile.IsEmpty == false && !tileRef.IsBlockedTurf(true);
+                return tileRef.Tile.IsEmpty == false && !_turfSystem.IsTileBlocked(tileRef, CollisionGroup.MobMask);
             }
 
             if (!IsTileClear())
index 8c86449008ab4ee9f5b248c01bb1cc7468d7891c..6d398db259db250cd7c32abc3c8e1755158a8f36 100644 (file)
@@ -2,16 +2,15 @@ using Content.Server.Administration.Logs;
 using Content.Server.Atmos.EntitySystems;
 using Content.Server.Chat.Managers;
 using Content.Server.GameTicking;
-using Content.Shared.Station.Components;
-using Content.Server.Station.Systems;
 using Content.Shared.Database;
 using Content.Shared.Maps;
 using Content.Shared.Physics;
 using Content.Shared.Respawn;
+using Content.Shared.Station.Components;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
-using Robust.Shared.Random;
 using Robust.Shared.Prototypes;
+using Robust.Shared.Random;
 
 namespace Content.Server.Respawn;
 
@@ -179,7 +178,7 @@ public sealed class SpecialRespawnSystem : SharedSpecialRespawnSystem
 
             foreach (var newTileRef in grid.GetTilesIntersecting(circle))
             {
-                if (newTileRef.IsSpace(_tileDefinitionManager) || newTileRef.IsBlockedTurf(true) || !_atmosphere.IsTileMixtureProbablySafe(targetGrid, targetMap, mapTarget))
+                if (newTileRef.IsSpace(_tileDefinitionManager) || _turf.IsTileBlocked(newTileRef, CollisionGroup.MobMask) || !_atmosphere.IsTileMixtureProbablySafe(targetGrid, targetMap, mapTarget))
                     continue;
 
                 found = true;