forked from NG-SD-Plugins/PowerTools
Plan out further migration steps
This commit is contained in:
parent
326a727a2f
commit
bb9fa9f170
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue