Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 32b3908

Browse files
authored
Adds a little sound effect that plays when speaking (#22597)
* Thing * Update living.dm * Update sound.dm * thing * Update say.dm
1 parent 7eb2d8e commit 32b3908

File tree

16 files changed

+45
-1
lines changed

16 files changed

+45
-1
lines changed

code/__DEFINES/{yogs_defines}/mobs.dm

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,27 @@
1616
#define SPECIES_VOX "vox"
1717

1818
#define BUTT_SPRITE_VOX "vox"
19+
20+
21+
GLOBAL_REAL_VAR(list/voice_type2sound = list(
22+
"1" = list(
23+
"1" = sound('goon/sound/speak_1.ogg'),
24+
"!" = sound('goon/sound/speak_1_exclaim.ogg'),
25+
"?" = sound('goon/sound/speak_1_ask.ogg')
26+
),
27+
"2" = list(
28+
"2" = sound('goon/sound/speak_2.ogg'),
29+
"!" = sound('goon/sound/speak_2_exclaim.ogg'),
30+
"?" = sound('goon/sound/speak_2_ask.ogg')
31+
),
32+
"3" = list(
33+
"3" = sound('goon/sound/speak_3.ogg'),
34+
"!" = sound('goon/sound/speak_3_exclaim.ogg'),
35+
"?" = sound('goon/sound/speak_3_ask.ogg')
36+
),
37+
"4" = list(
38+
"4" = sound('goon/sound/speak_4.ogg'),
39+
"!" = sound('goon/sound/speak_4_exclaim.ogg'),
40+
"?" = sound('goon/sound/speak_4_ask.ogg')
41+
),
42+
))

code/modules/mob/living/living.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
GLOB.mob_living_list += src
1212
if(startDead)
1313
death(FALSE)
14+
if(!voice_type)
15+
voice_type = pick(voice_type2sound) //yogs edit (stolen from monke)
1416

1517
/mob/living/prepare_huds()
1618
..()

code/modules/mob/living/say.dm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,21 @@ GLOBAL_LIST_INIT(special_radio_keys, list(
234234

235235
send_speech(message, message_range, src, bubble_type, spans, language, message_mods)
236236

237+
//yogs edit (stolen from monkestation)
238+
///Play a sound to indicate we just spoke
239+
if(client && !HAS_TRAIT(src, TRAIT_SIGN_LANG))
240+
var/ending = copytext_char(message, -1)
241+
var/sound/speak_sound
242+
if(SPAN_HELIUM in spans)
243+
speak_sound = sound('sound/effects/mousesqueek.ogg')
244+
else if(ending == "?")
245+
speak_sound = voice_type2sound[voice_type]["?"]
246+
else if(ending == "!")
247+
speak_sound = voice_type2sound[voice_type]["!"]
248+
else
249+
speak_sound = voice_type2sound[voice_type][voice_type]
250+
playsound(src, speak_sound, 300, 1, SHORT_RANGE_SOUND_EXTRARANGE-2, falloff_exponent = 1, pressure_affected = FALSE, ignore_walls = FALSE, use_reverb = FALSE)
251+
//yogs change end
237252

238253
return on_say_success(message,message_range,succumbed, spans, language, message_mods)//Yogs
239254

goon/sound/speak_1.ogg

4.44 KB
Binary file not shown.

goon/sound/speak_1_ask.ogg

4.69 KB
Binary file not shown.

goon/sound/speak_1_exclaim.ogg

4.61 KB
Binary file not shown.

goon/sound/speak_2.ogg

4.51 KB
Binary file not shown.

goon/sound/speak_2_ask.ogg

4.77 KB
Binary file not shown.

goon/sound/speak_2_exclaim.ogg

4.75 KB
Binary file not shown.

goon/sound/speak_3.ogg

4.48 KB
Binary file not shown.

0 commit comments

Comments
 (0)