EntityStorage ECS (#9291)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Server.Storage.EntitySystems;
|
||||
using NUnit.Framework;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -49,10 +50,11 @@ namespace Content.IntegrationTests.Tests
|
||||
var mapId = ent2.GetAllMapIds().Last();
|
||||
var pos = new MapCoordinates(Vector2.Zero, mapId);
|
||||
var ent = IoCManager.Resolve<IEntityManager>();
|
||||
var entStorage = ent.EntitySysManager.GetEntitySystem<EntityStorageSystem>();
|
||||
var container = ent.SpawnEntity("ContainerOcclusionA", pos);
|
||||
dummy = ent.SpawnEntity("ContainerOcclusionDummy", pos);
|
||||
|
||||
ent.GetComponent<EntityStorageComponent>(container).Insert(dummy);
|
||||
entStorage.Insert(dummy, container);
|
||||
});
|
||||
|
||||
await PoolManager.RunTicksSync(pairTracker.Pair, 5);
|
||||
@@ -84,10 +86,11 @@ namespace Content.IntegrationTests.Tests
|
||||
var mapId = ent2.GetAllMapIds().Last();
|
||||
var pos = new MapCoordinates(Vector2.Zero, mapId);
|
||||
var ent = IoCManager.Resolve<IEntityManager>();
|
||||
var entStorage = ent.EntitySysManager.GetEntitySystem<EntityStorageSystem>();
|
||||
var container = ent.SpawnEntity("ContainerOcclusionB", pos);
|
||||
dummy = ent.SpawnEntity("ContainerOcclusionDummy", pos);
|
||||
|
||||
ent.GetComponent<EntityStorageComponent>(container).Insert(dummy);
|
||||
entStorage.Insert(dummy, container);
|
||||
});
|
||||
|
||||
await PoolManager.RunTicksSync(pairTracker.Pair, 5);
|
||||
@@ -119,12 +122,13 @@ namespace Content.IntegrationTests.Tests
|
||||
var mapId = ent2.GetAllMapIds().Last();
|
||||
var pos = new MapCoordinates(Vector2.Zero, mapId);
|
||||
var ent = IoCManager.Resolve<IEntityManager>();
|
||||
var entStorage = ent.EntitySysManager.GetEntitySystem<EntityStorageSystem>();
|
||||
var containerA = ent.SpawnEntity("ContainerOcclusionA", pos);
|
||||
var containerB = ent.SpawnEntity("ContainerOcclusionB", pos);
|
||||
dummy = ent.SpawnEntity("ContainerOcclusionDummy", pos);
|
||||
|
||||
ent.GetComponent<EntityStorageComponent>(containerA).Insert(containerB);
|
||||
ent.GetComponent<EntityStorageComponent>(containerB).Insert(dummy);
|
||||
entStorage.Insert(dummy, containerA);
|
||||
entStorage.Insert(dummy, containerA);
|
||||
});
|
||||
|
||||
await PoolManager.RunTicksSync(pairTracker.Pair, 5);
|
||||
|
||||
Reference in New Issue
Block a user