Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for transition before loading #3616

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/saving/InProgressLoad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,21 @@ private void Step()
MainGameState.Invalid,
TranslationServer.Translate("READING_SAVE_DATA"));

TransitionManager.Instance.AddSequence(ScreenFade.FadeType.FadeIn, 0.5f, null, false, false);
TransitionManager.Instance.AddSequence(ScreenFade.FadeType.FadeIn, 0.5f, Step, false, false);

// Let all suppressed deletions happen
TemporaryLoadedNodeDeleter.Instance.ReleaseAllHolds();
JSONDebug.FlushJSONTracesOut();

break;
// Continue after transition finishes
return;
case State.ReadingData:
{
// Start suppressing loaded node deletion
TemporaryLoadedNodeDeleter.Instance.AddDeletionHold(Constants.DELETION_HOLD_LOAD);

// TODO: do this in a background thread if possible
// TODO: do this in a background thread once possible
// https://github.com/Revolutionary-Games/Thrive/issues/1406
try
{
// Invalid is given as the target state here, because it's unknown yet.
Expand Down