From 708497e254e4885256a8f570d5705ced9ee40140 Mon Sep 17 00:00:00 2001 From: KnighTheThrasher Date: Tue, 24 Dec 2024 01:30:06 +0100 Subject: [PATCH 1/3] fixes radio sounds not playing (fr) --- code/game/objects/items/devices/radio/radio.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index ef3e2e6b83f..2c1766aca5d 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -436,7 +436,7 @@ COOLDOWN_START(src, audio_cooldown, 0.5 SECONDS) var/sound/radio_receive = sound('sound/items/radio/radio_receive.ogg', volume = volume_modifier) radio_receive.frequency = get_rand_frequency_low_range() - SEND_SOUND(holder, radio_noise) + SEND_SOUND(holder, radio_receive) if((SPAN_COMMAND in spans) && COOLDOWN_FINISHED(src, important_audio_cooldown)) COOLDOWN_START(src, important_audio_cooldown, 0.5 SECONDS) var/sound/radio_important = sound('sound/items/radio/radio_important.ogg', volume = volume_modifier) From 22faa74e7f238114f45c39cda59fdd4bd56f0ebf Mon Sep 17 00:00:00 2001 From: KnighTheThrasher Date: Tue, 24 Dec 2024 01:43:58 +0100 Subject: [PATCH 2/3] partial tg port and revert --- code/game/objects/items/devices/radio/radio.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 2c1766aca5d..0d57ce78e64 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -348,10 +348,14 @@ signal.broadcast() return - if(isliving(talking_movable)) //iris edit + if(isliving(talking_movable)) var/mob/living/talking_living = talking_movable - if(talking_living.client?.prefs.read_preference(/datum/preference/numeric/sound_radio_noise) && !HAS_TRAIT(talking_living, TRAIT_DEAF)) - SEND_SOUND(talking_living, 'sound/items/radio/radio_talk.ogg') + var/volume_modifier = (talking_living.client?.prefs.read_preference(/datum/preference/numeric/sound_radio_noise)) + if(radio_noise && talking_living.can_hear() && volume_modifier && signal.frequency != FREQ_COMMON && !LAZYACCESS(message_mods, MODE_SEQUENTIAL) && COOLDOWN_FINISHED(src, audio_cooldown)) + COOLDOWN_START(src, audio_cooldown, 0.5 SECONDS) + var/sound/radio_noise = sound(sound('sound/items/radio/radio_talk.ogg', volume = volume_modifier)) + radio_noise.frequency = get_rand_frequency_low_range() + SEND_SOUND(talking_living, radio_noise) // All radios make an attempt to use the subspace system first signal.send_to_receivers() From 89061ad4599712c8c4c6d9620010484993581653 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:33:31 +0300 Subject: [PATCH 3/3] AI laws and tape recorders no longer cause radio blips (#88285) Closes #87423 The sound this produces when AI states laws on a non-common frequency is highly jarring and shouldn't be spammed every time someone from command asks AI to state laws (or security uses a tape recorder in the interrogation room). :cl: qol: AI laws and tape recorders no longer cause radio blips /:cl: --- code/__DEFINES/say.dm | 3 +++ code/game/objects/items/devices/taperecorder.dm | 4 ++-- code/modules/mob/living/silicon/silicon.dm | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/say.dm b/code/__DEFINES/say.dm index 7d7b3215741..fc230740b29 100644 --- a/code/__DEFINES/say.dm +++ b/code/__DEFINES/say.dm @@ -57,6 +57,9 @@ #define MODE_VOCALCORDS "cords" #define MODE_KEY_VOCALCORDS "x" +/// Automatically playing a set of lines +#define MODE_SEQUENTIAL "sequential" + #define MODE_MAFIA "mafia" /// Applies singing characters to the message diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index df0fbb928ed..433df9869d2 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -262,7 +262,7 @@ balloon_alert(usr, "recording ended") stoplag(1 SECONDS) //prevents multiple balloon alerts covering each other break - say("[mytape.storedinfo[i]]", sanitize=FALSE)//We want to display this properly, don't double encode + say("[mytape.storedinfo[i]]", sanitize=FALSE, message_mods = list(MODE_SEQUENTIAL = TRUE))//We want to display this properly, don't double encode if(mytape.storedinfo.len < i + 1) playsleepseconds = 1 sleep(1 SECONDS) @@ -270,7 +270,7 @@ playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i] if(playsleepseconds > 14 SECONDS) sleep(1 SECONDS) - say("Skipping [playsleepseconds/10] seconds of silence.") + say("Skipping [playsleepseconds/10] seconds of silence.", message_mods = list(MODE_SEQUENTIAL = TRUE)) playsleepseconds = 1 SECONDS i++ diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 144411f77b5..f0b1b7b3a8e 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -264,7 +264,7 @@ if (lawcache_zeroth) if (force || (lawcache_zeroth in lawcache_lawcheck)) - say("[radiomod] 0. [lawcache_zeroth]", forced = forced_log_message) + say("[radiomod] 0. [lawcache_zeroth]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE)) sleep(1 SECONDS) for (var/index in 1 to length(lawcache_hacked)) @@ -273,7 +273,7 @@ if (length(law) <= 0) continue if (force || (law in lawcache_hackedcheck)) - say("[radiomod] [num]. [law]", forced = forced_log_message) + say("[radiomod] [num]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE)) sleep(1 SECONDS) for (var/index in 1 to length(lawcache_ion)) @@ -282,7 +282,7 @@ if (length(law) <= 0) return if (force || (law in lawcache_ioncheck)) - say("[radiomod] [num]. [law]", forced = forced_log_message) + say("[radiomod] [num]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE)) sleep(1 SECONDS) var/number = 1 @@ -291,7 +291,7 @@ if (length(law) <= 0) continue if (force || (law in lawcache_lawcheck)) - say("[radiomod] [number]. [law]", forced = forced_log_message) + say("[radiomod] [number]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE)) number++ sleep(1 SECONDS) @@ -301,7 +301,7 @@ if (length(law) <= 0) continue if (force || (law in lawcache_lawcheck)) - say("[radiomod] [number]. [law]", forced = forced_log_message) + say("[radiomod] [number]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE)) number++ sleep(1 SECONDS)