mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 18:22:14 +00:00
* 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>
11 lines
340 B
Plaintext
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
|