Merge pull request #411 from misternebula/clear-logs

reset game save
This commit is contained in:
_nebula 2021-12-12 10:42:49 +00:00 committed by GitHub
commit a739fa17c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,14 @@ namespace QSB.SaveSync.Events
public override void OnReceiveRemote(bool isHost, GameStateMessage message)
{
if (QSBSceneManager.CurrentScene != OWScene.TitleScreen)
{
DebugLog.ToConsole($"Error - Treid to handle GameStateEvent when not in TitleScreen!", OWML.Common.MessageType.Error);
return;
}
PlayerData.ResetGame();
var gameSave = StandaloneProfileManager.SharedInstance.currentProfileGameSave;
gameSave.loopCount = message.LoopCount;
gameSave.knownFrequencies = message.KnownFrequencies;