Files
Bubberstation/code/modules/client/preferences/migrations/convert_to_json_savefile.dm
Zephyr 136875a120 JSON Savefile port (#17607)
* JSON Savefiles | Player Saves use JSON

* few fixups

* yeah this will need a migration in the future to use a different tree for skyrat stuff

* this can be null

* forgot to sanitize these ones

* TM st

* get it working

* Update code/modules/client/preferences_savefile.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-11-24 20:55:17 -05:00

11 lines
340 B
Plaintext

/datum/preferences/proc/try_savefile_type_migration()
load_path(parent.ckey, "preferences.sav") // old save file
var/old_path = path
load_path(parent.ckey)
if(!fexists(old_path))
return
var/datum/json_savefile/json_savefile = new(path)
json_savefile.import_byond_savefile(new /savefile(old_path))
json_savefile.save()
return TRUE