Files
space-station-14/Content.IntegrationTests/Tests/Gibbing/GibTest.cs
pathetic meowmeow fb133494cc Decouple gibbing from the body system (#42405)
* Decouple gibbing from the body system

* allow gibs that don't drop giblets

* pass through user

* prediction gon

* comment

* destructible

* playpvs

* very very very very very very very minor cleanup

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2026-01-14 05:57:08 +00:00

37 lines
1.1 KiB
C#

#nullable enable
using Content.Shared.Gibbing;
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 target = default;
await server.WaitAssertion(() => target = server.EntMan.Spawn("MobHuman", map.MapCoords));
await pair.WaitCommand($"setoutfit {server.EntMan.GetNetEntity(target)} CaptainGear");
await pair.RunTicksSync(5);
var nuid = pair.ToClientUid(target);
Assert.That(client.EntMan.EntityExists(nuid));
await server.WaitAssertion(() => server.System<GibbingSystem>().Gib(target));
await pair.RunTicksSync(5);
await pair.WaitCommand("dirty");
await pair.RunTicksSync(5);
Assert.That(!client.EntMan.EntityExists(nuid));
await pair.CleanReturnAsync();
}
}