Split PoolManager into separate classes. (#19370)

This commit is contained in:
Leon Friedrich
2023-08-23 00:14:01 +12:00
committed by GitHub
parent efdb756065
commit 89a287c1fd
19 changed files with 785 additions and 696 deletions

View File

@@ -3,6 +3,7 @@ using System.Linq;
using System.Numerics;
using Content.Client.Construction;
using Content.Client.Examine;
using Content.IntegrationTests.Pair;
using Content.Server.Body.Systems;
using Content.Server.Mind;
using Content.Server.Players;
@@ -40,11 +41,11 @@ public abstract partial class InteractionTest
{
protected virtual string PlayerPrototype => "InteractionTestMob";
protected PairTracker PairTracker = default!;
protected TestMapData MapData = default!;
protected TestPair PairTracker = default!;
protected TestMapData MapData => PairTracker.TestMap!;
protected RobustIntegrationTest.ServerIntegrationInstance Server => PairTracker.Pair.Server;
protected RobustIntegrationTest.ClientIntegrationInstance Client => PairTracker.Pair.Client;
protected RobustIntegrationTest.ServerIntegrationInstance Server => PairTracker.Server;
protected RobustIntegrationTest.ClientIntegrationInstance Client => PairTracker.Client;
protected MapId MapId => MapData.MapId;
@@ -172,7 +173,7 @@ public abstract partial class InteractionTest
CLogger = Client.ResolveDependency<ILogManager>().RootSawmill;
// Setup map.
MapData = await PoolManager.CreateTestMap(PairTracker);
await PairTracker.CreateTestMap();
PlayerCoords = MapData.GridCoords.Offset(new Vector2(0.5f, 0.5f)).WithEntityId(MapData.MapUid, Transform, SEntMan);
TargetCoords = MapData.GridCoords.Offset(new Vector2(1.5f, 0.5f)).WithEntityId(MapData.MapUid, Transform, SEntMan);
await SetTile(Plating, grid: MapData.MapGrid);
@@ -225,7 +226,7 @@ public abstract partial class InteractionTest
});
// Final player asserts/checks.
await PoolManager.ReallyBeIdle(PairTracker.Pair, 5);
await PairTracker.ReallyBeIdle(5);
Assert.Multiple(() =>
{
Assert.That(cPlayerMan.LocalPlayer.ControlledEntity, Is.EqualTo(Player));