* Remove HasAtmosphereMethodEvent * Remove GetTileMixturesMethodEvent * Remove GetTileMixtureMethodEvent * Remove GetAdjacentTilesMethodEvent * Add TileMixtureEnumerator * Remove GetAdjacentTileMixturesMethodEvent * Remove IsTileSpaceMethodEvent * Remove HotspotExposeMethodEvent * Remove pipe net method events * Remove device method events * Use Entity<T> * Misc fixes * A * Theres probably a few more of these * Fix other resolve errors
30 lines
650 B
C#
30 lines
650 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Content.Server.Atmos;
|
|
|
|
public struct TileMixtureEnumerator
|
|
{
|
|
public readonly TileAtmosphere?[] Tiles;
|
|
public int Index = 0;
|
|
|
|
public static readonly TileMixtureEnumerator Empty = new(Array.Empty<TileAtmosphere>());
|
|
|
|
internal TileMixtureEnumerator(TileAtmosphere?[] tiles)
|
|
{
|
|
Tiles = tiles;
|
|
}
|
|
|
|
public bool MoveNext([NotNullWhen(true)] out GasMixture? mix)
|
|
{
|
|
while (Index < Tiles.Length)
|
|
{
|
|
mix = Tiles[Index++]?.Air;
|
|
if (mix != null)
|
|
return true;
|
|
}
|
|
|
|
mix = null;
|
|
return false;
|
|
}
|
|
}
|