This commit is contained in:
izac112
2021-09-25 15:15:05 +02:00
6 changed files with 35 additions and 3 deletions
@@ -83,9 +83,17 @@
return ..()
/**
* This can take either a single preference datum or a list of preferences, and will return true if *all* preferences in the arguments are enabled.
*/
/client/proc/is_preference_enabled(var/preference)
var/datum/client_preference/cp = get_client_preference(preference)
return cp && (cp.key in prefs.preferences_enabled)
if(!islist(preference))
preference = list(preference)
for(var/p in preference)
var/datum/client_preference/cp = get_client_preference(p)
if(!cp || !(cp.key in prefs.preferences_enabled))
return FALSE
return TRUE
/client/proc/set_preference(var/preference, var/set_preference)
var/datum/client_preference/cp = get_client_preference(preference)
@@ -95,6 +95,12 @@ var/list/_client_preferences_by_type
key = "DIGEST_NOISES"
enabled_description = "Noisy"
disabled_description = "Silent"
/datum/client_preference/belch_noises // Belching noises - pref toggle for 'em
description = "Burping"
key = "BELCH_NOISES"
enabled_description = "Noisy"
disabled_description = "Silent"
/datum/client_preference/emote_noises
description = "Emote Noises" //MERP