make puddles not appear on space tiles (#17822)

This commit is contained in:
Slava0135
2023-07-05 16:59:48 +03:00
committed by GitHub
parent ac4b72904a
commit 7ee91ce4f1

View File

@@ -27,6 +27,7 @@ using Robust.Shared.Random;
using Robust.Shared.Timing;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Maps;
namespace Content.Server.Fluids.EntitySystems;
@@ -50,6 +51,7 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly TileFrictionController _tile = default!;
[Dependency] private readonly SlowContactsSystem _slowContacts = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefMan = default!;
public static float PuddleVolume = 1000;
@@ -562,7 +564,7 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
}
// If space return early, let that spill go out into the void
if (tileRef.Tile.IsEmpty)
if (tileRef.Tile.IsEmpty || tileRef.IsSpace(_tileDefMan))
{
puddleUid = EntityUid.Invalid;
return false;