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.
Closes #1551
The new autosave feature will automaticaly save the current level to a backup file (not the level file, but a different one) each time the level is tested or at most 5 minutes after the level was last saved/auto-saved (amount of time customizable through the editor pause menu).
If the editor crashes, the recovery file will survive and will be detected by the editor on next launch. Level editors will have the option to open the recovery file or not.
The recovery file is deleted when:
The user saves the level manually.
The recovery file is deleted until a new autosave request is initiated by the game. The reason is that manually saving makes the regular file more recent than the recovery file; the auto-save would then be useless, as it is older than the actual save.
The user quits the editor.
Quitting the editor is considered a normal operation. The user is assumed to be aware of the state of the save file upon quitting the editor (they will be told if their level has unsaved changes and asked to confirm their choice). The recovery file is then needless (no need to offer a user to recover unsaved changes if they explicitly chose to discard them).