mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-06 14:27:29 +00:00
* 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
(cherry picked from commit 77e029d4ca)
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;
|
|
}
|
|
}
|