From: FluffMe <1780586+FluffMe@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:52:49 +0000 (+0100) Subject: Fix TestSuicideByHeldItem and TestSuicideByHeldItemSpreadDamage (#33030) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=08d007771946c13fe5c0607347b07d222db00232;p=space-station-14.git Fix TestSuicideByHeldItem and TestSuicideByHeldItemSpreadDamage (#33030) --- diff --git a/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs b/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs index e1eef2be4a..cf88f3aacd 100644 --- a/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs +++ b/Content.IntegrationTests/Tests/Commands/SuicideCommandTests.cs @@ -168,7 +168,7 @@ public sealed class SuicideCommandTests await pair.CleanReturnAsync(); } - /// + /// /// Run the suicide command in the console /// Should only ghost the player but not kill them /// @@ -241,6 +241,7 @@ public sealed class SuicideCommandTests var mindSystem = entManager.System(); var mobStateSystem = entManager.System(); var transformSystem = entManager.System(); + var damageableSystem = entManager.System(); // We need to know the player and whether they can be hurt, killed, and whether they have a mind var player = playerMan.Sessions.First().AttachedEntity!.Value; @@ -276,6 +277,8 @@ public sealed class SuicideCommandTests // and that all the damage is concentrated in the Slash category await server.WaitAssertion(() => { + // Heal all damage first (possible low pressure damage taken) + damageableSystem.SetAllDamage(player, damageableComp, 0); consoleHost.GetSessionShell(playerMan.Sessions.First()).ExecuteCommand("suicide"); var lethalDamageThreshold = mobThresholdsComp.Thresholds.Keys.Last(); @@ -313,6 +316,7 @@ public sealed class SuicideCommandTests var mindSystem = entManager.System(); var mobStateSystem = entManager.System(); var transformSystem = entManager.System(); + var damageableSystem = entManager.System(); // We need to know the player and whether they can be hurt, killed, and whether they have a mind var player = playerMan.Sessions.First().AttachedEntity!.Value; @@ -348,6 +352,8 @@ public sealed class SuicideCommandTests // and that slash damage is split in half await server.WaitAssertion(() => { + // Heal all damage first (possible low pressure damage taken) + damageableSystem.SetAllDamage(player, damageableComp, 0); consoleHost.GetSessionShell(playerMan.Sessions.First()).ExecuteCommand("suicide"); var lethalDamageThreshold = mobThresholdsComp.Thresholds.Keys.Last();