Voice Preferences

Added different voices and voice preferences to character customization. Already implemented voices are human, roach and lizard
This commit is contained in:
Alphas00
2024-06-19 10:48:56 +02:00
parent e51f547c87
commit 11182eeed4
15 changed files with 31 additions and 14 deletions
@@ -79,3 +79,5 @@
var/account_id
can_be_held = "micro"
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
var/voice = "human"
+3 -1
View File
@@ -497,7 +497,9 @@
. = ..()
message = null
emote_type = EMOTE_VISIBLE
playsound(usr.loc, 'GainStation13/sound/voice/voices/speak_1.ogg', 90, 10)
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
playsound(usr.loc, "GainStation13/sound/voice/voices/[H.voice].ogg", 90, 10)
/datum/emote/living/custom/replace_pronoun(mob/user, message)
return message
+14 -12
View File
@@ -219,22 +219,24 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(pressure < ONE_ATMOSPHERE*0.4) //Thin air, let's italicise the message
spans |= SPAN_ITALICS
if(message_mode == MODE_WHISPER)
if(ishuman(src))
var/mob/living/carbon/human/H = src
var/vmod = ""
switch(say_mod(message, message_mode))
if("asks")
playsound(src.loc, 'GainStation13/sound/voice/voices/speak_1_ask.ogg', 45, 5, -3)
if("exclaims" || "yells")
playsound(src.loc, 'GainStation13/sound/voice/voices/speak_1_exclaim.ogg', 45, 5, -3)
else
playsound(src.loc, 'GainStation13/sound/voice/voices/speak_1.ogg', 45, 5, -3)
else
vmod = "_ask"
if("exclaims")
vmod = "_exclaim"
if("yells")
vmod = "_exclaim"
switch(say_mod(message, message_mode))
if("asks")
playsound(src.loc, 'GainStation13/sound/voice/voices/speak_1_ask.ogg', 90, 10, message_range)
if("exclaims" || "yells")
playsound(src.loc, 'GainStation13/sound/voice/voices/speak_1_exclaim.ogg', 90, 10, message_range)
if("whispers")
playsound(src.loc, "GainStation13/sound/voice/voices/[H.voice][vmod].ogg", 45, 5, -3)
if("yells")
playsound(src.loc, "GainStation13/sound/voice/voices/[H.voice][vmod].ogg", 130, 10, message_range+2)
else
playsound(src.loc, 'GainStation13/sound/voice/voices/speak_1.ogg', 90, 10, message_range)
playsound(src.loc, "GainStation13/sound/voice/voices/[H.voice][vmod].ogg", 90, 10, message_range)
//playsound(user.loc, pick('GainStation13/sound/voice/voices/speak_1.ogg', 'GainStation13/sound/voice/voices/speak_1_ask.ogg', 'GainStation13/sound/voice/voices/speak_1_exclaim.ogg'), 90, 10)
send_speech(message, message_range, src, bubble_type, spans, language, message_mode)
+3 -1
View File
@@ -72,7 +72,9 @@ proc/get_top_level_mob(var/mob/S)
if(M.stat == DEAD && M.client && (M.client?.prefs?.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)))
M.show_message(message)
playsound(usr.loc, 'GainStation13/sound/voice/voices/speak_1.ogg', 90, 10)
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
playsound(usr.loc, "GainStation13/sound/voice/voices/[H.voice].ogg", 90, 10)
if(emote_type == EMOTE_AUDIBLE)
user.audible_message(message=message,hearing_distance=1)