Adds audible belching preference toggle, makes belch emote respect it

This commit is contained in:
Chompstation Bot
2021-09-25 00:34:56 +00:00
parent 5ab51812da
commit 42f18c41da
4 changed files with 43 additions and 0 deletions

View File

@@ -83,9 +83,16 @@
return ..()
<<<<<<< HEAD
/**
* 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.
*/
||||||| parent of 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
=======
/**
* 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.
*/
>>>>>>> 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
/client/proc/is_preference_enabled(var/preference)
if(!islist(preference))
preference = list(preference)

View File

@@ -95,6 +95,7 @@ var/list/_client_preferences_by_type
key = "DIGEST_NOISES"
enabled_description = "Noisy"
disabled_description = "Silent"
<<<<<<< HEAD
//CHOMPEdit; belching
/datum/client_preference/belch_noises
description = "Burping"
@@ -103,6 +104,17 @@ var/list/_client_preferences_by_type
disabled_description = "Silent"
enabled_by_default = FALSE
//CHOMPEdit end
||||||| parent of 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
=======
/datum/client_preference/belch_noises // Belching noises - pref toggle for 'em
description = "Burping"
key = "BELCH_NOISES"
enabled_description = "Noisy"
disabled_description = "Silent"
>>>>>>> 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
/datum/client_preference/emote_noises
description = "Emote Noises" //MERP
key = "EMOTE_NOISES"

View File

@@ -39,7 +39,21 @@
SScharacter_setup.queue_preferences_save(prefs)
feedback_add_details("admin_verb","TDigestNoise") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggle_belch_noises()
set name = "Audible belching"
set category = "Preferences"
set desc = "Toggles audible belches."
var/pref_path = /datum/client_preference/belch_noises
toggle_preference(pref_path)
to_chat(src, "You will [ (is_preference_enabled(pref_path)) ? "now" : "no longer"] hear belching.")
SScharacter_setup.queue_preferences_save(prefs)
<<<<<<< HEAD
//CHOMPEdit: belching
/client/verb/toggle_belch_noises()
set name = "Audible belching"
@@ -57,6 +71,10 @@
feedback_add_details("admin_verb","TBelchNoise")
//CHOMPEdit End
||||||| parent of 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
=======
feedback_add_details("admin_verb","TBelchNoise")
>>>>>>> 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
/client/verb/toggle_emote_noises()
set name = "Emote Noises"

View File

@@ -42,8 +42,14 @@ var/global/list/emotes_by_key
var/check_range // falsy, or a range outside which the emote will not work
var/conscious = TRUE // Do we need to be awake to emote this?
var/emote_range = 0 // If >0, restricts emote visibility to viewers within range.
<<<<<<< HEAD
var/sound_preferences = list(/datum/client_preference/emote_noises)
||||||| parent of 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
=======
var/sound_preferences = list(/datum/client_preference/emote_noises) // Default emote sound_preferences is just emote_noises. Belch emote overrides this list for pref-checks.
>>>>>>> 0f04ef8b32... Merge pull request #11624 from Rykka-Stormheart/shep-dev-belch-pref
/decl/emote/Initialize()
. = ..()