Fixes ambient sound preferences runtiming every time a client connects (#84202)

fixes #84200

forgot to pass the value that's sent while preferences are still
initializing.
This commit is contained in:
Afevis
2024-06-22 17:24:44 +01:00
committed by GitHub
parent 24a23009e8
commit d12576371c
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -536,7 +536,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
to_chat(src, span_warning("Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you."))
update_ambience_pref()
update_ambience_pref(prefs.read_preference(/datum/preference/toggle/sound_ambience))
check_ip_intel()
//This is down here because of the browse() calls in tooltip/New()
@@ -1128,8 +1128,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
winset(src, "default.Shift", "is-disabled=true")
winset(src, "default.ShiftUp", "is-disabled=true")
/client/proc/update_ambience_pref()
if(prefs.read_preference(/datum/preference/toggle/sound_ambience))
/client/proc/update_ambience_pref(value)
if(value)
if(SSambience.ambience_listening_clients[src] > world.time)
return // If already properly set we don't want to reset the timer.
SSambience.ambience_listening_clients[src] = world.time + 10 SECONDS //Just wait 10 seconds before the next one aight mate? cheers.
+1 -1
View File
@@ -5,7 +5,7 @@
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/sound_ambience/apply_to_client(client/client, value)
client.update_ambience_pref()
client.update_ambience_pref(value)
/// Controls hearing announcement sounds
/datum/preference/toggle/sound_announcements