Allow mind system to spawn ghosts during the post-round phase. (#19091)

This commit is contained in:
Leon Friedrich
2023-08-15 17:08:47 +12:00
committed by GitHub
parent 68f312834a
commit 5b77f9b32f

View File

@@ -143,7 +143,7 @@ public sealed class MindSystem : EntitySystem
private void OnMindContainerTerminating(EntityUid uid, MindContainerComponent component, ref EntityTerminatingEvent args)
{
// Let's not create ghosts if not in the middle of the round.
if (_gameTicker.RunLevel != GameRunLevel.InRound)
if (_gameTicker.RunLevel == GameRunLevel.PreRoundLobby)
return;
if (component.Mind is not { } mind)
@@ -173,7 +173,7 @@ public sealed class MindSystem : EntitySystem
Timer.Spawn(0, () =>
{
// Make extra sure the round didn't end between spawning the timer and it being executed.
if (_gameTicker.RunLevel != GameRunLevel.InRound)
if (_gameTicker.RunLevel == GameRunLevel.PreRoundLobby)
return;
// Async this so that we don't throw if the grid we're on is being deleted.