Replace every usage of GridCoordinates with EntityCoordinates (#2021)
* Update RobustToolbox * Transition direct type usages * More updates * Fix invalid use of to map * Update RobustToolbox * Fix dropping items * Rename name usages of "GridCoordinates" to "EntityCoordinates" * Revert "Update RobustToolbox" This reverts commit 9f334a17c5908ded0043a63158bb671e4aa3f346. * Revert "Update RobustToolbox" This reverts commit 3a9c8cfa3606fa501aa84407796d2ad920853a09. # Conflicts: # RobustToolbox * Fix cursed IMapGrid method usage. * GridTileLookupTest now uses EntityCoordinates Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com> Co-authored-by: Víctor Aguilera Puerto <zddm@outlook.es>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Atmos;
|
||||
using NUnit.Framework;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.Atmos
|
||||
@@ -10,17 +11,23 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
public class AtmosHelpersTest : ContentIntegrationTest
|
||||
{
|
||||
[Test]
|
||||
public async Task GetTileAtmosphereGridCoordinatesNullTest()
|
||||
public async Task GetTileAtmosphereEntityCoordinatesNullTest()
|
||||
{
|
||||
var server = StartServerDummyTicker();
|
||||
|
||||
await server.WaitIdleAsync();
|
||||
|
||||
var entityManager = server.ResolveDependency<IEntityManager>();
|
||||
|
||||
server.Assert(() =>
|
||||
{
|
||||
Assert.DoesNotThrow(() =>
|
||||
{
|
||||
var atmosphere = default(GridCoordinates).GetTileAtmosphere();
|
||||
var atmosphere1 = default(EntityCoordinates).GetTileAtmosphere();
|
||||
var atmosphere2 = default(EntityCoordinates).GetTileAtmosphere(entityManager);
|
||||
|
||||
Assert.Null(atmosphere);
|
||||
Assert.Null(atmosphere1);
|
||||
Assert.Null(atmosphere2);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -28,7 +35,7 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task GetTileAirGridCoordinatesNullTest()
|
||||
public async Task GetTileAirEntityCoordinatesNullTest()
|
||||
{
|
||||
var server = StartServerDummyTicker();
|
||||
|
||||
@@ -36,7 +43,7 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
{
|
||||
Assert.DoesNotThrow(() =>
|
||||
{
|
||||
var air = default(GridCoordinates).GetTileAir();
|
||||
var air = default(EntityCoordinates).GetTileAir();
|
||||
|
||||
Assert.Null(air);
|
||||
});
|
||||
@@ -46,7 +53,7 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TryGetTileAtmosphereGridCoordinatesNullTest()
|
||||
public async Task TryGetTileAtmosphereEntityCoordinatesNullTest()
|
||||
{
|
||||
var server = StartServerDummyTicker();
|
||||
|
||||
@@ -54,7 +61,7 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
{
|
||||
Assert.DoesNotThrow(() =>
|
||||
{
|
||||
var hasAtmosphere = default(GridCoordinates).TryGetTileAtmosphere(out var atmosphere);
|
||||
var hasAtmosphere = default(EntityCoordinates).TryGetTileAtmosphere(out var atmosphere);
|
||||
|
||||
Assert.False(hasAtmosphere);
|
||||
Assert.Null(atmosphere);
|
||||
@@ -65,7 +72,7 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task TryGetTileTileAirGridCoordinatesNullTest()
|
||||
public async Task TryGetTileTileAirEntityCoordinatesNullTest()
|
||||
{
|
||||
var server = StartServerDummyTicker();
|
||||
|
||||
@@ -73,7 +80,7 @@ namespace Content.IntegrationTests.Tests.Atmos
|
||||
{
|
||||
Assert.DoesNotThrow(() =>
|
||||
{
|
||||
var hasAir = default(GridCoordinates).TryGetTileAir(out var air);
|
||||
var hasAir = default(EntityCoordinates).TryGetTileAir(out var air);
|
||||
|
||||
Assert.False(hasAir);
|
||||
Assert.Null(air);
|
||||
|
||||
Reference in New Issue
Block a user