mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +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>
29 lines
1.1 KiB
Plaintext
29 lines
1.1 KiB
Plaintext
// 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))
|