Skip to content

Commit

Permalink
Prevents AI radio speech sounds from stacking (#4058)
Browse files Browse the repository at this point in the history
* Prevents AI radio speech sounds from causing ear damage

* Fine I'll leave it at like, 150

* meh
  • Loading branch information
Absolucy authored Nov 4, 2024
1 parent 72da760 commit 6a1c9a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
8 changes: 0 additions & 8 deletions code/game/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ GLOBAL_LIST_INIT(freqtospan, list(
/atom/movable/proc/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list(), message_range=0)
SEND_SIGNAL(src, COMSIG_MOVABLE_HEAR, args)

//MONKESTATION EDIT
/mob/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list(), message_range)
. = ..()
if(client && radio_freq)
var/atom/movable/virtualspeaker/V = speaker
if(isAI(V.source))
playsound_local(get_turf(src), 'goon/sounds/radio_ai.ogg', 170, 1, 0, 0, pressure_affected = FALSE, use_reverb = FALSE, mixer_channel = CHANNEL_MOB_SOUNDS)
//MONKESTATION EDIT END
/**
* Checks if our movable can speak the provided message, passing it through filters
* and spam detection. Does not call can_speak. CAN include feedback messages about
Expand Down
14 changes: 14 additions & 0 deletions monkestation/code/game/say.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/mob/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list(), message_range)
. = ..()
if(client && (radio_freq && (radio_freq == FREQ_COMMON || radio_freq < MIN_FREQ)))
var/atom/movable/virtualspeaker/vspeaker = speaker
if(isAI(vspeaker.source))
playsound_local(
get_turf(src),
'goon/sounds/radio_ai.ogg',
vol = 170,
vary = TRUE,
pressure_affected = FALSE,
use_reverb = FALSE,
mixer_channel = CHANNEL_MOB_SOUNDS
)
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5899,6 +5899,7 @@
#include "monkestation\code\datums\weather\weather_types\radiation_storm.dm"
#include "monkestation\code\datums\wires\particle_accelerator.dm"
#include "monkestation\code\game\atom.dm"
#include "monkestation\code\game\say.dm"
#include "monkestation\code\game\sound.dm"
#include "monkestation\code\game\world.dm"
#include "monkestation\code\game\area\areas.dm"
Expand Down

0 comments on commit 6a1c9a7

Please sign in to comment.