Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)

This commit is contained in:
metalgearsloth
2023-09-01 12:30:29 +10:00
committed by GitHub
parent 37222930d9
commit 4cfc578011
91 changed files with 227 additions and 315 deletions

View File

@@ -12,7 +12,6 @@ namespace Content.Server.Worldgen.Systems;
public abstract class BaseWorldSystem : EntitySystem
{
[Dependency] private readonly WorldControllerSystem _worldController = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
/// <summary>
/// Gets a chunk's coordinates in chunk space as an integer value.
@@ -26,7 +25,7 @@ public abstract class BaseWorldSystem : EntitySystem
if (!Resolve(ent, ref xform))
throw new Exception("Failed to resolve transform, somehow.");
return WorldGen.WorldToChunkCoords(_transform.GetWorldPosition(xform)).Floored();
return WorldGen.WorldToChunkCoords(xform.WorldPosition).Floored();
}
/// <summary>
@@ -41,7 +40,7 @@ public abstract class BaseWorldSystem : EntitySystem
if (!Resolve(ent, ref xform))
throw new Exception("Failed to resolve transform, somehow.");
return WorldGen.WorldToChunkCoords(_transform.GetWorldPosition(xform));
return WorldGen.WorldToChunkCoords(xform.WorldPosition);
}
/// <summary>