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:
@@ -4,6 +4,7 @@ using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.Transform;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Log;
|
||||
@@ -17,6 +18,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
public class AirtightComponent : Component, IMapInit
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
|
||||
private (GridId, MapIndices) _lastPosition;
|
||||
|
||||
@@ -89,7 +91,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
if (_fixVacuum)
|
||||
{
|
||||
var mapIndices = Owner.Transform.GridPosition.ToMapIndices(_mapManager);
|
||||
var mapIndices = Owner.Transform.Coordinates.ToMapIndices(_entityManager, _mapManager);
|
||||
EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(Owner.Transform.GridID)?.FixVacuum(mapIndices);
|
||||
}
|
||||
|
||||
@@ -109,7 +111,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
|
||||
private void UpdatePosition()
|
||||
{
|
||||
var mapIndices = Owner.Transform.GridPosition.ToMapIndices(_mapManager);
|
||||
var mapIndices = Owner.Transform.Coordinates.ToMapIndices(_entityManager, _mapManager);
|
||||
UpdatePosition(Owner.Transform.GridID, mapIndices);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user