Fix content test warnings (#9865)

* Fix content test warnings

* while I'm here

* fix

Co-authored-by: wrexbe <wrexbe@protonmail.com>
This commit is contained in:
metalgearsloth
2022-07-20 14:48:44 +10:00
committed by GitHub
parent 7e21b55781
commit b7623b6c08
6 changed files with 36 additions and 38 deletions

View File

@@ -307,6 +307,7 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
var mapManager = server.ResolveDependency<IMapManager>();
var sysMan = server.ResolveDependency<IEntitySystemManager>();
var handSys = sysMan.GetEntitySystem<SharedHandsSystem>();
var conSystem = sysMan.GetEntitySystem<SharedContainerSystem>();
var mapId = MapId.Nullspace;
var coords = MapCoordinates.Nullspace;
@@ -332,7 +333,7 @@ namespace Content.IntegrationTests.Tests.Interaction.Click
item = sEntities.SpawnEntity(null, coords);
item.EnsureComponent<ItemComponent>();
containerEntity = sEntities.SpawnEntity(null, coords);
container = containerEntity.EnsureContainer<Container>("InteractionTestContainer");
container = conSystem.EnsureContainer<Container>(containerEntity, "InteractionTestContainer");
});
await server.WaitRunTicks(1);

View File

@@ -30,12 +30,10 @@ namespace Content.IntegrationTests.Tests.Interaction
var sEntities = server.ResolveDependency<IEntityManager>();
var mapManager = server.ResolveDependency<IMapManager>();
var conSystem = sEntities.EntitySysManager.GetEntitySystem<SharedContainerSystem>();
EntityUid origin = default;
EntityUid other = default;
IContainer container = null;
IComponent component = null;
EntityCoordinates entityCoordinates = default;
MapCoordinates mapCoordinates = default;
await server.WaitAssertion(() =>
@@ -45,9 +43,7 @@ namespace Content.IntegrationTests.Tests.Interaction
origin = sEntities.SpawnEntity(HumanId, coordinates);
other = sEntities.SpawnEntity(HumanId, coordinates);
container = other.EnsureContainer<Container>("InRangeUnobstructedTestOtherContainer");
component = sEntities.GetComponent<TransformComponent>(other);
entityCoordinates = sEntities.GetComponent<TransformComponent>(other).Coordinates;
conSystem.EnsureContainer<Container>(other, "InRangeUnobstructedTestOtherContainer");
mapCoordinates = sEntities.GetComponent<TransformComponent>(other).MapPosition;
});