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:
@@ -23,9 +23,9 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
|
||||
public float Elapsed { get; set; }
|
||||
|
||||
public GridCoordinates UserGrid { get; }
|
||||
public EntityCoordinates UserGrid { get; }
|
||||
|
||||
public GridCoordinates TargetGrid { get; }
|
||||
public EntityCoordinates TargetGrid { get; }
|
||||
|
||||
private bool _tookDamage;
|
||||
|
||||
@@ -42,13 +42,13 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
|
||||
if (eventArgs.BreakOnUserMove)
|
||||
{
|
||||
UserGrid = eventArgs.User.Transform.GridPosition;
|
||||
UserGrid = eventArgs.User.Transform.Coordinates;
|
||||
}
|
||||
|
||||
if (eventArgs.BreakOnTargetMove)
|
||||
{
|
||||
// Target should never be null if the bool is set.
|
||||
TargetGrid = eventArgs.Target!.Transform.GridPosition;
|
||||
TargetGrid = eventArgs.Target!.Transform.Coordinates;
|
||||
}
|
||||
|
||||
// For this we need to stay on the same hand slot and need the same item in that hand slot
|
||||
@@ -94,7 +94,7 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
{
|
||||
Tcs.SetResult(DoAfterStatus.Finished);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//https://github.com/tgstation/tgstation/blob/1aa293ea337283a0191140a878eeba319221e5df/code/__HELPERS/mobs.dm
|
||||
if (EventArgs.CancelToken.IsCancellationRequested)
|
||||
{
|
||||
@@ -118,12 +118,12 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
}
|
||||
|
||||
// TODO :Handle inertia in space.
|
||||
if (EventArgs.BreakOnUserMove && EventArgs.User.Transform.GridPosition != UserGrid)
|
||||
if (EventArgs.BreakOnUserMove && EventArgs.User.Transform.Coordinates != UserGrid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (EventArgs.BreakOnTargetMove && EventArgs.Target!.Transform.GridPosition != TargetGrid)
|
||||
if (EventArgs.BreakOnTargetMove && EventArgs.Target!.Transform.Coordinates != TargetGrid)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -170,7 +170,7 @@ namespace Content.Server.GameObjects.EntitySystems.DoAfter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user