mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-02-15 00:54:51 +01:00
* 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>
37 lines
1.1 KiB
C#
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();
|
|
}
|
|
}
|