* Cleanup PuddleTest * Cleanup GravityGridTest * Cleanup PowerTest * Cleanup SaveLoadMapTest * Cleanup Body tests * Cleanup ContainerOcclusionTest * Cleanup AirlockTest * Cleanup DamageableTest * Cleanup EntityTest * Cleanup FluidSpillTest * Cleanup FollowerSystemTest * Cleanup HandCuffTest * Cleanup InteractionSystemTests * Cleanup InRangeUnobstructed * Cleanup SimplePredictReconcileTest * Cleanup PostMapInitTest * Cleanup SalvageTest * Cleanup SaveLoadSaveTest * Cleanup ShuttleTest * Cleanup MaterialArbitrageTest * Cleanup PrototypeSaveTest * Fix ShuttleTest * Bunch of small ones * Move JobTests to Station directory * More small fixes * Cleanup InteractionTest.Helpers Had to change a method signature, so some callers were modified too. * Missed one
44 lines
1.6 KiB
C#
44 lines
1.6 KiB
C#
#nullable enable
|
|
using Content.Server.Body.Systems;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.IntegrationTests.Tests.Body;
|
|
|
|
[TestFixture]
|
|
public sealed class GibTest
|
|
{
|
|
[Test]
|
|
public async Task TestGib()
|
|
{
|
|
await using var pair = await PoolManager.GetServerClient(new PoolSettings { Connected = true });
|
|
var (server, client) = (pair.Server, pair.Client);
|
|
var map = await pair.CreateTestMap();
|
|
|
|
EntityUid target1 = default;
|
|
EntityUid target2 = default;
|
|
|
|
await server.WaitAssertion(() => target1 = server.EntMan.Spawn("MobHuman", map.MapCoords));
|
|
await server.WaitAssertion(() => target2 = server.EntMan.Spawn("MobHuman", map.MapCoords));
|
|
await pair.WaitCommand($"setoutfit {server.EntMan.GetNetEntity(target1)} CaptainGear");
|
|
await pair.WaitCommand($"setoutfit {server.EntMan.GetNetEntity(target2)} CaptainGear");
|
|
|
|
await pair.RunTicksSync(5);
|
|
var nuid1 = pair.ToClientUid(target1);
|
|
var nuid2 = pair.ToClientUid(target2);
|
|
Assert.That(client.EntMan.EntityExists(nuid1));
|
|
Assert.That(client.EntMan.EntityExists(nuid2));
|
|
|
|
await server.WaitAssertion(() => server.System<BodySystem>().GibBody(target1, gibOrgans: false));
|
|
await server.WaitAssertion(() => server.System<BodySystem>().GibBody(target2, gibOrgans: true));
|
|
|
|
await pair.RunTicksSync(5);
|
|
await pair.WaitCommand("dirty");
|
|
await pair.RunTicksSync(5);
|
|
|
|
Assert.That(!client.EntMan.EntityExists(nuid1));
|
|
Assert.That(!client.EntMan.EntityExists(nuid2));
|
|
|
|
await pair.CleanReturnAsync();
|
|
}
|
|
}
|