Kill ComponentExt (#20907)

This commit is contained in:
Kara
2023-10-11 02:19:46 -07:00
committed by GitHub
parent dbb7c7065a
commit 7dd20f7af1
6 changed files with 20 additions and 40 deletions

View File

@@ -63,11 +63,11 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
await server.WaitAssertion(() =>
{
user = sEntities.SpawnEntity(null, coords);
user.EnsureComponent<HandsComponent>();
sEntities.EnsureComponent<HandsComponent>(user);
handSys.AddHand(user, "hand", HandLocation.Left);
target = sEntities.SpawnEntity(null, coords);
item = sEntities.SpawnEntity(null, coords);
item.EnsureComponent<ItemComponent>();
sEntities.EnsureComponent<ItemComponent>(item);
});
await server.WaitRunTicks(1);
@@ -134,11 +134,11 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
await server.WaitAssertion(() =>
{
user = sEntities.SpawnEntity(null, coords);
user.EnsureComponent<HandsComponent>();
sEntities.EnsureComponent<HandsComponent>(user);
handSys.AddHand(user, "hand", HandLocation.Left);
target = sEntities.SpawnEntity(null, new MapCoordinates(new Vector2(1.9f, 0), mapId));
item = sEntities.SpawnEntity(null, coords);
item.EnsureComponent<ItemComponent>();
sEntities.EnsureComponent<ItemComponent>(item);
wall = sEntities.SpawnEntity("DummyDebugWall", new MapCoordinates(new Vector2(1, 0), sEntities.GetComponent<TransformComponent>(user).MapID));
});
@@ -204,11 +204,11 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
await server.WaitAssertion(() =>
{
user = sEntities.SpawnEntity(null, coords);
user.EnsureComponent<HandsComponent>();
sEntities.EnsureComponent<HandsComponent>(user);
handSys.AddHand(user, "hand", HandLocation.Left);
target = sEntities.SpawnEntity(null, new MapCoordinates(new Vector2(SharedInteractionSystem.InteractionRange - 0.1f, 0), mapId));
item = sEntities.SpawnEntity(null, coords);
item.EnsureComponent<ItemComponent>();
sEntities.EnsureComponent<ItemComponent>(item);
});
await server.WaitRunTicks(1);
@@ -274,11 +274,11 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
await server.WaitAssertion(() =>
{
user = sEntities.SpawnEntity(null, coords);
user.EnsureComponent<HandsComponent>();
sEntities.EnsureComponent<HandsComponent>(user);
handSys.AddHand(user, "hand", HandLocation.Left);
target = sEntities.SpawnEntity(null, new MapCoordinates(new Vector2(SharedInteractionSystem.InteractionRange + 0.01f, 0), mapId));
item = sEntities.SpawnEntity(null, coords);
item.EnsureComponent<ItemComponent>();
sEntities.EnsureComponent<ItemComponent>(item);
});
await server.WaitRunTicks(1);
@@ -346,11 +346,11 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
await server.WaitAssertion(() =>
{
user = sEntities.SpawnEntity(null, coords);
user.EnsureComponent<HandsComponent>();
sEntities.EnsureComponent<HandsComponent>(user);
handSys.AddHand(user, "hand", HandLocation.Left);
target = sEntities.SpawnEntity(null, coords);
item = sEntities.SpawnEntity(null, coords);
item.EnsureComponent<ItemComponent>();
sEntities.EnsureComponent<ItemComponent>(item);
containerEntity = sEntities.SpawnEntity(null, coords);
container = conSystem.EnsureContainer<Container>(containerEntity, "InteractionTestContainer");
});