mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
13 lines
537 B
Plaintext
13 lines
537 B
Plaintext
/// Transforms the bay style `"preferences": ["SOUND_MIDI", ...]` to `"SOUND_MIDI": 1` and `"preferences_disabled": [...]` to `0`.
|
|
/datum/preferences/proc/migration_13_preferences(datum/json_savefile/S)
|
|
var/list/preferences_enabled = S.get_entry("preferences")
|
|
for(var/key in preferences_enabled)
|
|
S.set_entry("[key]", TRUE)
|
|
|
|
var/list/preferences_disabled = S.get_entry("preferences_disabled")
|
|
for(var/key in preferences_disabled)
|
|
S.set_entry("[key]", FALSE)
|
|
|
|
// Force a reload of the value cache
|
|
apply_all_client_preferences()
|