Do not crash when loading save files with unknown content #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update fixes the crash that happens when you try to load a save exported from a version of Idle Loops with unknown stats, skills, buffs, or options (like the prestige fork or the dmchurch fork). It keeps the unknown entries in the save file to allow two-way migration between forks without losing any (or at least, without losing much) data.
For context: my fork currently does a lot of extra work to try and keep its save files compatible with this fork and/or WaylonJ's prestige fork and is only marginally successful (I can only export to one or the other at a time, and I have to strip a lot of things out of the file to export to your fork), and I'd much rather not have to do that. Also, merging this PR means people will be able to migrate freely between the lloyd-delacroix and WaylonJ forks, which is currently a one-way conversion.