2 Commits

3 changed files with 5 additions and 8 deletions

View File

@@ -214,7 +214,7 @@ namespace osu.Game.Database
#if !DEBUG #if !DEBUG
// in the lazer. straight up "migrating it". and by "it", haha, well. let's just say. My realm . // in the lazer. straight up "migrating it". and by "it", haha, well. let's just say. My realm .
string altFilename = filename; string altFilename = filename;
applyFilenameSchemaSuffix(ref altFilename); // it also migrates older versions automagically! (sorry, I only used that word for irony...) applyFilenameSchemaSuffix(ref altFilename);
if (storage.Exists(altFilename) && !storage.Exists(Filename)) if (storage.Exists(altFilename) && !storage.Exists(Filename))
{ {
using (var previous = storage.GetStream(altFilename)) using (var previous = storage.GetStream(altFilename))
@@ -222,6 +222,7 @@ namespace osu.Game.Database
{ {
Logger.Log($@"Migrating production build DB: {altFilename} -> {Filename}"); Logger.Log($@"Migrating production build DB: {altFilename} -> {Filename}");
previous.CopyTo(current); previous.CopyTo(current);
Logger.Log("Sucessfully migrated local database!", level: LogLevel.Important);
} }
} }
#endif #endif

View File

@@ -122,7 +122,6 @@ namespace osu.Game.Screens.Play
}, },
// XXX: I have mixed feeling about this, but it works at least // XXX: I have mixed feeling about this, but it works at least
// TODO: check if we're in the editor to avoid some... weird bugs on score import
(OnQuitReplay != null) (OnQuitReplay != null)
? new ShearedButton ? new ShearedButton
{ {

View File

@@ -998,13 +998,10 @@ namespace osu.Game.Screens.Play
PauseOverlay.Hide(); PauseOverlay.Hide();
bool exitOnFail = GameplayState.Mods.OfType<IApplicableFailExit>().Any(m => m.ExitOnFail) bool exitOnFail = GameplayState.Mods.OfType<IApplicableFailExit>().Any(m => m.ExitOnFail)
&& Score.ScoreInfo.User.Username == config.Get<string>(OsuSetting.Username); // TODO: do more concrete checks && Score.ScoreInfo.User.Username == config.Get<string>(OsuSetting.Username)
&& this is SoloPlayer;
if (exitOnFail) if (exitOnFail)
{ game.Exit(); // we're done here
// game.AttemptExit();
game.Exit();
}
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail); bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
if (!restartOnFail) if (!restartOnFail)