Plan out further migration steps

This commit is contained in:
user 2024-06-04 12:17:08 +02:00
parent 326a727a2f
commit bb9fa9f170

View file

@ -505,6 +505,15 @@ impl ApiMessageHandler {
false
}
ApiMessage::LoadSettings(id, name, variant_id, variant_name) => {
/* Migration steps:
1. Modify to the frontend to send the game ID in this message (`id` here is the app
ID).
2. Change game ID to app ID.
3. (Create and) call function to merge OldSettingsJson with existing FileJson, or
use existing `From<OldSettingsJson> for FileJson` if this game doesn't have a
save in the new format yet.
4. Let the rest of the code below work its magic.
*/
let path = format!("{}.ron", id);
if let Err(e) = settings.on_unload() {
print_errors("LoadSettings on_unload()", e);