Replace all ITransformComponent by TransformComponent

This commit is contained in:
Vera Aguilera Puerto
2021-11-08 12:37:32 +01:00
parent 789ae63301
commit e6e15b3728
36 changed files with 53 additions and 53 deletions

View File

@@ -48,7 +48,7 @@ namespace Content.Server.Construction.Completions
container.Remove(board);
var transform = entityManager.GetComponent<ITransformComponent>(uid);
var transform = entityManager.GetComponent<TransformComponent>(uid);
var computer = entityManager.SpawnEntity(boardComponent.Prototype, transform.Coordinates);
computer.Transform.LocalRotation = transform.LocalRotation;

View File

@@ -61,7 +61,7 @@ namespace Content.Server.Construction.Completions
entBoardContainer.Remove(board);
var transform = entityManager.GetComponent<ITransformComponent>(uid);
var transform = entityManager.GetComponent<TransformComponent>(uid);
var machine = entityManager.SpawnEntity(boardComponent.Prototype, transform.Coordinates);
machine.Transform.LocalRotation = transform.LocalRotation;

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Construction.Completions
if (!entityManager.TryGetComponent(uid, out ContainerManagerComponent? containerManager))
return;
var transform = entityManager.GetComponent<ITransformComponent>(uid);
var transform = entityManager.GetComponent<TransformComponent>(uid);
foreach (var container in containerManager.GetAllContainers())
{
container.EmptyContainer(true, transform.Coordinates);

View File

@@ -21,7 +21,7 @@ namespace Content.Server.Construction.Completions
!containerManager.TryGetContainer(Container, out var container)) return;
// TODO: Use container system methods.
var transform = entityManager.GetComponent<ITransformComponent>(uid);
var transform = entityManager.GetComponent<TransformComponent>(uid);
foreach (var contained in container.ContainedEntities.ToArray())
{
container.ForceRemove(contained);

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Construction.Completions
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
var transform = entityManager.GetComponent<ITransformComponent>(uid);
var transform = entityManager.GetComponent<TransformComponent>(uid);
transform.Anchored = Value;
}
}

View File

@@ -16,7 +16,7 @@ namespace Content.Server.Construction.Completions
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
var transform = entityManager.GetComponent<ITransformComponent>(uid);
var transform = entityManager.GetComponent<TransformComponent>(uid);
transform.Coordinates = transform.Coordinates.SnapToGrid(entityManager);
if (SouthRotation)

View File

@@ -21,7 +21,7 @@ namespace Content.Server.Construction.Completions
if (string.IsNullOrEmpty(Prototype))
return;
var coordinates = entityManager.GetComponent<ITransformComponent>(uid).Coordinates;
var coordinates = entityManager.GetComponent<TransformComponent>(uid).Coordinates;
if (EntityPrototypeHelpers.HasComponent<StackComponent>(Prototype))
{

View File

@@ -24,7 +24,7 @@ namespace Content.Server.Construction.Completions
var containerSystem = entityManager.EntitySysManager.GetEntitySystem<ContainerSystem>();
var container = containerSystem.EnsureContainer<Container>(uid, Container);
var coordinates = entityManager.GetComponent<ITransformComponent>(uid).Coordinates;
var coordinates = entityManager.GetComponent<TransformComponent>(uid).Coordinates;
for (var i = 0; i < Amount; i++)
{
container.Insert(entityManager.SpawnEntity(Prototype, coordinates));