diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index b7497ae8fff..dc817c81cb3 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -238,6 +238,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( prefs = GLOB.preferences_datums[ckey] if(prefs) prefs.parent = src + prefs.apply_all_client_preferences() else prefs = new /datum/preferences(src) GLOB.preferences_datums[ckey] = prefs diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 32670c5b4c7..592c614e4c3 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -329,6 +329,15 @@ GLOBAL_LIST_EMPTY(preferences_datums) return preferences +/// Applies all PREFERENCE_PLAYER preferences +/datum/preferences/proc/apply_all_client_preferences() + for (var/datum/preference/preference as anything in get_preferences_in_priority_order()) + if (preference.savefile_identifier != PREFERENCE_PLAYER) + continue + + value_cache -= preference.type + preference.apply_to_client(parent, read_preference(preference.type)) + // This is necessary because you can open the set preferences menu before // the atoms SS is done loading. INITIALIZE_IMMEDIATE(/atom/movable/screen/character_preview_view) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index f1ff9b316ab..a9f97d90efa 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -163,12 +163,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car fcopy(S, bacpath) //byond helpfully lets you use a savefile for the first arg. return FALSE - for (var/datum/preference/preference as anything in get_preferences_in_priority_order()) - if (preference.savefile_identifier != PREFERENCE_PLAYER) - continue - - value_cache -= preference.type - preference.apply_to_client(parent, read_preference(preference.type)) + apply_all_client_preferences() //general preferences READ_FILE(S["lastchangelog"], lastchangelog)