Transform refactor. (#139)

space-wizards/space-station-14#725
This commit is contained in:
Pieter-Jan Briers
2019-01-18 11:40:30 +01:00
committed by GitHub
parent e8e1c9dd1f
commit 415b7e96fd
30 changed files with 71 additions and 71 deletions

View File

@@ -106,7 +106,7 @@ namespace Content.Server.GameObjects.EntitySystems
handsComp.SwapHands();
}
private static void HandleDrop(ICommonSession session, GridLocalCoordinates coords, EntityUid uid)
private static void HandleDrop(ICommonSession session, GridCoordinates coords, EntityUid uid)
{
var ent = ((IPlayerSession) session).AttachedEntity;
@@ -118,7 +118,7 @@ namespace Content.Server.GameObjects.EntitySystems
var transform = ent.Transform;
if (transform.LocalPosition.InRange(coords, InteractionSystem.INTERACTION_RANGE))
if (transform.GridPosition.InRange(coords, InteractionSystem.INTERACTION_RANGE))
{
handsComp.Drop(handsComp.ActiveIndex, coords);
}
@@ -136,7 +136,7 @@ namespace Content.Server.GameObjects.EntitySystems
handsComp.ActivateItem();
}
private static void HandleThrowItem(ICommonSession session, GridLocalCoordinates coords, EntityUid uid)
private static void HandleThrowItem(ICommonSession session, GridCoordinates coords, EntityUid uid)
{
var plyEnt = ((IPlayerSession)session).AttachedEntity;
@@ -159,7 +159,7 @@ namespace Content.Server.GameObjects.EntitySystems
else
{
stackComp.Use(1);
throwEnt = throwEnt.EntityManager.ForceSpawnEntityAt(throwEnt.Prototype.ID, plyEnt.Transform.LocalPosition);
throwEnt = throwEnt.EntityManager.ForceSpawnEntityAt(throwEnt.Prototype.ID, plyEnt.Transform.GridPosition);
}
if (!throwEnt.TryGetComponent(out CollidableComponent colComp))