// Contains all of the variables and such to make tg prefs work /datum/preferences /// The savefile relating to character preferences, PREFERENCE_CHARACTER var/list/character_data /// A list of keys that have been updated since the last save. var/list/recently_updated_keys = list() /// A cache of preference entries to values. /// Used to avoid expensive READ_FILE every time a preference is retrieved. var/value_cache = list() /// If set to TRUE, will update character_profiles on the next ui_data tick. var/tainted_character_profiles = FALSE var/current_window = PREFERENCE_TAB_GAME_PREFERENCES /// A list of instantiated middleware var/list/datum/preference_middleware/middleware = list() /// 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(client, read_preference(preference.type))