From b40097ce7f83ae18e0b2191ce3f5096f6e103c1a Mon Sep 17 00:00:00 2001 From: Verkister Date: Fri, 24 Sep 2021 15:03:48 +0300 Subject: [PATCH 1/4] Disables autoupdate on vorepanel tgui The vorepanel/bellies/bellymodes/etc already handle the updates whenever needed, and with how bloated the vorepanel is with content, it's no wonder it's laggy when kept open while the autoupdate refreshes it on every tick regardless of whether anything's changed or not. --- code/modules/vore/eating/vorepanel_vr.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index d823ad8bae..2b00d23391 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -51,6 +51,7 @@ if(!ui) ui = new(user, src, "VorePanel", "Vore Panel") ui.open() + ui.set_autoupdate(FALSE) // This looks weird, but all tgui_host is used for is state checking // So this allows us to use the self_state just fine. From 22e600333ffa23b624e6514d59f930d68395fc74 Mon Sep 17 00:00:00 2001 From: Kittygorluwu <87458430+Kittygorluwu@users.noreply.github.com> Date: Fri, 24 Sep 2021 10:15:09 -0400 Subject: [PATCH 2/4] Update alienwhitelist.txt https://forum.vore-station.net/viewtopic.php?f=45&t=2048 --- config/alienwhitelist.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/alienwhitelist.txt b/config/alienwhitelist.txt index 9a3ec603fb..90af24a1cb 100644 --- a/config/alienwhitelist.txt +++ b/config/alienwhitelist.txt @@ -111,4 +111,5 @@ xonkon - Protean zalvine - Shadekin Empathy zammyman215 - Vox zeracyfr - Xenochimera -spirit1299 - Black-Eyed Shadekin \ No newline at end of file +spirit1299 - Black-Eyed Shadekin +revolver_eloise - Protean From a346a3a9f7e4cb8920f9785725ca57e311d6e286 Mon Sep 17 00:00:00 2001 From: Rykka Date: Fri, 24 Sep 2021 15:27:25 -0700 Subject: [PATCH 3/4] Adds audible belching preference toggle, makes belch emote respect it Preferences can now handle a list being passed to them, and will require all items in the list to be true. Singular datums work to preserve legacy behavior. Audible belching will REQUIRE "Emote Noises" and "Audible Belching" preferences to be enabled. Figured there'd be a potential shitstorm, and honestly adding the preference was easier than I thought. This will work if for w/e reason you decide to add farting noises - a simple pref toggle, and bingo. Etc etc. <3 --- .../client/preference_setup/global/02_settings.dm | 12 ++++++++++-- .../preference_setup/global/setting_datums.dm | 7 +++++++ code/modules/client/preferences_vr.dm | 14 ++++++++++++++ code/modules/emotes/definitions/audible_belch.dm | 1 + code/modules/emotes/emote_define.dm | 4 +++- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/code/modules/client/preference_setup/global/02_settings.dm b/code/modules/client/preference_setup/global/02_settings.dm index 16dc0f91bd..b3da6ef214 100644 --- a/code/modules/client/preference_setup/global/02_settings.dm +++ b/code/modules/client/preference_setup/global/02_settings.dm @@ -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) diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index 854ecfc357..e8b547da61 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -95,6 +95,13 @@ 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" + enabled_by_default = FALSE /datum/client_preference/emote_noises description = "Emote Noises" //MERP diff --git a/code/modules/client/preferences_vr.dm b/code/modules/client/preferences_vr.dm index b85ca6a01a..6bba9fe31e 100644 --- a/code/modules/client/preferences_vr.dm +++ b/code/modules/client/preferences_vr.dm @@ -40,7 +40,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) + + feedback_add_details("admin_verb","TBelchNoise") /client/verb/toggle_emote_noises() set name = "Emote Noises" diff --git a/code/modules/emotes/definitions/audible_belch.dm b/code/modules/emotes/definitions/audible_belch.dm index 68de583061..3bb3b6a17c 100644 --- a/code/modules/emotes/definitions/audible_belch.dm +++ b/code/modules/emotes/definitions/audible_belch.dm @@ -2,6 +2,7 @@ key = "belch" emote_message_3p = "belches." message_type = AUDIBLE_MESSAGE + sound_preferences = list(/datum/client_preference/emote_noises,/datum/client_preference/belch_noises) /decl/emote/audible/belch/get_emote_sound(var/atom/user) return list( diff --git a/code/modules/emotes/emote_define.dm b/code/modules/emotes/emote_define.dm index 9a1debb429..4bedd91eb0 100644 --- a/code/modules/emotes/emote_define.dm +++ b/code/modules/emotes/emote_define.dm @@ -42,6 +42,8 @@ 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. + + 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. /decl/emote/Initialize() . = ..() @@ -176,7 +178,7 @@ var/global/list/emotes_by_key if(islist(sound_to_play) && length(sound_to_play)) sound_to_play = pick(sound_to_play) if(sound_to_play) - playsound(user.loc, sound_to_play, use_sound["vol"], 0, preference = /datum/client_preference/emote_noises) //VOREStation Add - Preference + playsound(user.loc, sound_to_play, use_sound["vol"], 0, preference = sound_preferences) //VOREStation Add - Preference /decl/emote/proc/mob_can_use(var/mob/user) return istype(user) && user.stat != DEAD && (type in user.get_available_emotes()) From e7a0ef3a26fcae5708da667892faf17a75db62f9 Mon Sep 17 00:00:00 2001 From: Rykka Date: Fri, 24 Sep 2021 15:36:43 -0700 Subject: [PATCH 4/4] Fixes Belches so they're enabled/audible by default My bad, headache-brain misread the pref. --- code/modules/client/preference_setup/global/setting_datums.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index e8b547da61..06e44c3fd8 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -101,7 +101,6 @@ var/list/_client_preferences_by_type key = "BELCH_NOISES" enabled_description = "Noisy" disabled_description = "Silent" - enabled_by_default = FALSE /datum/client_preference/emote_noises description = "Emote Noises" //MERP