Replace MapIndices with Vector2i (#2228)
* Replace MapIndices with Vector2i * Update da submodule * AA EE II OO U U Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Server.Atmos
|
||||
{
|
||||
@@ -36,26 +37,26 @@ namespace Content.Server.Atmos
|
||||
return !Equals(air = coordinates.GetTileAir(entityManager)!, default);
|
||||
}
|
||||
|
||||
public static TileAtmosphere? GetTileAtmosphere(this MapIndices indices, GridId gridId)
|
||||
public static TileAtmosphere? GetTileAtmosphere(this Vector2i indices, GridId gridId)
|
||||
{
|
||||
var gridAtmos = EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(gridId);
|
||||
|
||||
return gridAtmos?.GetTile(indices);
|
||||
}
|
||||
|
||||
public static GasMixture? GetTileAir(this MapIndices indices, GridId gridId)
|
||||
public static GasMixture? GetTileAir(this Vector2i indices, GridId gridId)
|
||||
{
|
||||
return indices.GetTileAtmosphere(gridId)?.Air;
|
||||
}
|
||||
|
||||
public static bool TryGetTileAtmosphere(this MapIndices indices, GridId gridId,
|
||||
public static bool TryGetTileAtmosphere(this Vector2i indices, GridId gridId,
|
||||
[MaybeNullWhen(false)] out TileAtmosphere atmosphere)
|
||||
{
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
return !Equals(atmosphere = indices.GetTileAtmosphere(gridId)!, default);
|
||||
}
|
||||
|
||||
public static bool TryGetTileAir(this MapIndices indices, GridId gridId, [MaybeNullWhen(false)] out GasMixture air)
|
||||
public static bool TryGetTileAir(this Vector2i indices, GridId gridId, [MaybeNullWhen(false)] out GasMixture air)
|
||||
{
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
return !Equals(air = indices.GetTileAir(gridId)!, default);
|
||||
|
||||
Reference in New Issue
Block a user