Radio sounds

When you hear a message over the radio, it plays a non-intrusive radio sound, this can be toggled in preferences. Heavily inspired by goon station.
This commit is contained in:
QuoteFox
2020-09-28 16:48:32 +01:00
parent 8583a30eaa
commit 4b45dab114
5 changed files with 14 additions and 6 deletions
+2
View File
@@ -241,6 +241,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
// Create map text prior to modifying message for goonchat
if (client?.prefs.chat_on_map && stat != UNCONSCIOUS && (client.prefs.see_chat_non_mob || ismob(speaker)) && can_hear())
create_chat_message(speaker, message_language, raw_message, spans, message_mode)
if (client?.prefs.radiosounds && stat != UNCONSCIOUS && can_hear() && radio_freq)
playsound_local(src,'sound/voice/radio.ogg', 40, 1)
// Recompose message for AI hrefs, language incomprehension.
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)