From 4a4c93e110c1b2e409660ce264ec81e82f89648e Mon Sep 17 00:00:00 2001
From: SabreML <57483089+SabreML@users.noreply.github.com>
Date: Tue, 18 Aug 2020 14:46:28 +0100
Subject: [PATCH] Separates announcement noises from words.
---
code/modules/mob/living/silicon/ai/say.dm | 29 ++++++++++++++++++-----
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm
index 599063c2724..1b61e674b36 100644
--- a/code/modules/mob/living/silicon/ai/say.dm
+++ b/code/modules/mob/living/silicon/ai/say.dm
@@ -80,17 +80,26 @@ GLOBAL_VAR_INIT(announcing_vox, 0) // Stores the time of the last announcement
Do not use punctuation as you would normally, if you want a pause you can use the full stop and comma characters by separating them with spaces, like so: 'Alpha . Test , Bravo'.\
WARNING:
Misuse of the announcement system will get you job banned.
"
- var/index = 0
- for(var/word in GLOB.vox_sounds)
- index++
- dat += "[capitalize(word)]"
- if(index != GLOB.vox_sounds.len)
- dat += " / "
+ // Show alert and voice sounds separately
+ var/vox_words = GLOB.vox_sounds - vox_alerts
+ dat = help_format(vox_alerts, dat)
+ dat = help_format(vox_words, dat)
var/datum/browser/popup = new(src, "announce_help", "Announcement Help", 500, 400)
popup.set_content(dat)
popup.open()
+/mob/living/silicon/ai/proc/help_format(word_list, dat)
+ var/index = 0
+ for(var/word in word_list)
+ index++
+ dat += "[capitalize(word)]"
+ if(index != length(word_list))
+ dat += " / "
+ else
+ dat += "
"
+ return dat
+
/mob/living/silicon/ai/proc/ai_announcement()
if(check_unable(AI_CHECK_WIRELESS | AI_CHECK_RADIO))
return
@@ -183,3 +192,11 @@ GLOBAL_VAR_INIT(announcing_vox, 0) // Stores the time of the last announcement
// to_chat(src, "Downloading [file]")
var/sound/S = sound("[VOX_PATH][file]")
src << browse_rsc(S)
+
+var/vox_alerts = list(
+"bizwarn" = 'sound/vox_fem/bizwarn.ogg',
+"bloop" = 'sound/vox_fem/bloop.ogg',
+"buzwarn" = 'sound/vox_fem/buzwarn.ogg',
+"dadeda" = 'sound/vox_fem/dadeda.ogg',
+"deeoo" = 'sound/vox_fem/deeoo.ogg'
+)