Replace all ITransformComponent by TransformComponent
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Content.Server.Construction.Conditions
|
||||
|
||||
var type = IoCManager.Resolve<IComponentFactory>().GetRegistration(Component).Type;
|
||||
|
||||
var transform = entityManager.GetComponent<ITransformComponent>(uid);
|
||||
var transform = entityManager.GetComponent<TransformComponent>(uid);
|
||||
var indices = transform.Coordinates.ToVector2i(entityManager, IoCManager.Resolve<IMapManager>());
|
||||
var entities = indices.GetEntitiesInTile(transform.GridID, LookupFlags.Approximate | LookupFlags.IncludeAnchored, IoCManager.Resolve<IEntityLookup>());
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Content.Server.Construction.Conditions
|
||||
|
||||
public bool Condition(EntityUid uid, IEntityManager entityManager)
|
||||
{
|
||||
var transform = entityManager.GetComponent<ITransformComponent>(uid);
|
||||
var transform = entityManager.GetComponent<TransformComponent>(uid);
|
||||
return transform.Anchored && Anchored || !transform.Anchored && !Anchored;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace Content.Server.Construction
|
||||
private EntityUid? ChangeEntity(EntityUid uid, EntityUid? userUid, string newEntity,
|
||||
ConstructionComponent? construction = null,
|
||||
MetaDataComponent? metaData = null,
|
||||
ITransformComponent? transform = null,
|
||||
TransformComponent? transform = null,
|
||||
ContainerManagerComponent? containerManager = null)
|
||||
{
|
||||
if (!Resolve(uid, ref construction, ref metaData, ref transform))
|
||||
@@ -187,7 +187,7 @@ namespace Content.Server.Construction
|
||||
}
|
||||
|
||||
// Transform transferring.
|
||||
var newTransform = EntityManager.GetComponent<ITransformComponent>(newUid);
|
||||
var newTransform = EntityManager.GetComponent<TransformComponent>(newUid);
|
||||
newTransform.LocalRotation = transform.LocalRotation;
|
||||
newTransform.Anchored = transform.Anchored;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user