Merge pull request #9057 from EgoSumStultus/male-AI-vox

Adds the Male AI vox voice.
This commit is contained in:
nik707
2019-09-02 18:27:03 -05:00
committed by GitHub
634 changed files with 652 additions and 5 deletions
+4
View File
@@ -817,6 +817,10 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
var/file = GLOB.vox_sounds[name]
Export("##action=load_rsc", file)
stoplag()
for (var/name in GLOB.vox_sounds_male)
var/file = GLOB.vox_sounds_male[name]
Export("##action=load_rsc", file)
stoplag()
#endif
+14 -5
View File
@@ -100,6 +100,8 @@
last_announcement = message
var/voxType = input(src, "Male or female VOX?", "VOX-gender") in list("male", "female")
if(!message || announcing_vox > world.time)
return
@@ -121,7 +123,9 @@
if(!word)
words -= word
continue
if(!GLOB.vox_sounds[word])
if(!GLOB.vox_sounds[word] && voxType == "female")
incorrect_words += word
if(!GLOB.vox_sounds_male[word] && voxType == "male")
incorrect_words += word
if(incorrect_words.len)
@@ -133,16 +137,21 @@
log_game("[key_name(src)] made a vocal announcement with the following message: [message].")
for(var/word in words)
play_vox_word(word, src.z, null)
play_vox_word(word, src.z, null, voxType)
/proc/play_vox_word(word, z_level, mob/only_listener)
/proc/play_vox_word(word, z_level, mob/only_listener, voxType = "female")
word = lowertext(word)
if(GLOB.vox_sounds[word])
if( (GLOB.vox_sounds[word] && voxType == "female") || (GLOB.vox_sounds_male[word] && voxType == "male") )
var/sound_file = GLOB.vox_sounds[word]
var/sound_file
if(voxType == "female")
sound_file = GLOB.vox_sounds[word]
else
sound_file = GLOB.vox_sounds_male[word]
var/sound/voice = sound(sound_file, wait = 1, channel = CHANNEL_VOX)
voice.status = SOUND_STREAM