Misc content xform changes (#12166)

This commit is contained in:
Leon Friedrich
2022-10-24 20:19:51 +13:00
committed by GitHub
parent 79bd07009a
commit 0b8622e9e7
3 changed files with 4 additions and 32 deletions

View File

@@ -4,13 +4,6 @@ namespace Content.Server.Coordinates.Helpers
{
public static class SnapgridHelper
{
public static void SnapToGrid(this EntityUid entity, IEntityManager? entMan = null, IMapManager? mapManager = null)
{
IoCManager.Resolve(ref entMan, ref mapManager);
var transform = entMan.GetComponent<TransformComponent>(entity);
transform.Coordinates = transform.Coordinates.SnapToGrid(entMan, mapManager);
}
public static EntityCoordinates SnapToGrid(this EntityCoordinates coordinates, IEntityManager? entMan = null, IMapManager? mapManager = null)
{
IoCManager.Resolve(ref entMan, ref mapManager);