Consider missing vanilla savefile corrupted (#649)#899
Conversation
|
I have a minor issue with this, which is: in the case where users have deleted their savefiles in vanilla, once they hop on Everest again, they would see like their deleted savefiles appear as corrupted. Which could lead to confusion, especially once this hits stable, where potentially multiple blank savefiles may become corrupted unexpectedly. |
Wartori54
left a comment
There was a problem hiding this comment.
Tested it and it seems to work, it just needs a few logging changes.
|
|
||
| for (int i = 0; i < Slots.Count() - 1; i++) { // - 1, last slot is always empty | ||
| if (!Slots[i].Exists && Directory.GetFiles(saveFilePath, $"{i}-mod*.celeste").Length > 0) { | ||
| Logger.Warn("save", $"Save slot {i} have modded data but no save file, flagging as corrupted"); |
There was a problem hiding this comment.
This sentence is a bit wrong, something like "Save slot {i} has modded data but no vanilla save data, flagging as corrupted" would be better.
Also using save as the log id seems a bit vague, OuiFileSelect or SaveData could be better.
| if (!orig_TryDelete(slot)) | ||
| return false; | ||
| else | ||
| Logger.Warn("save", $"Deleting save data for slot {slot} which have no vanilla data"); |
There was a problem hiding this comment.
Same as above for save. And here the "have" should be a "has".
|
Thanks for the review, I fixed the |
|
The pull request was approved and entered the 3-day last-call window. |
|
The last-call window for this pull request ended. It can now be merged if no blockers were brought up. |
…verestAPI#899)" This reverts commit 2ec0d93.

Commit fa9b476 always delete modded save data when starting a new game.
This PR changes this behavior:
This allows the
Everest.Events.FileSelectSlot.OnCreateButtonsevent to work properly on new save files, as modded save data is no longer deleted after being created.Fixes #649.