From b5d601dd7089526ace80aa10c6d5ab47a3cfd2b5 Mon Sep 17 00:00:00 2001 From: Aylong <69762909+AyIong@users.noreply.github.com> Date: Sun, 19 Jan 2025 19:36:12 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: dj-34 --- code/__HELPERS/priority_announce.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/priority_announce.dm b/code/__HELPERS/priority_announce.dm index 56537caffc000..b05ba3733db44 100644 --- a/code/__HELPERS/priority_announce.dm +++ b/code/__HELPERS/priority_announce.dm @@ -83,7 +83,7 @@ else finalized_announcement = CHAT_ALERT_DEFAULT_SPAN(jointext(announcement_strings, "")) - // BANDASTATION EDIT - START + // BANDASTATION EDIT - START - add tts_message var/tts_message = (SSstation.announcer.custom_alert_message && !has_important_message) ? SSstation.announcer.custom_alert_message : text dispatch_announcement_to_players(finalized_announcement, players, sound, tts_override = tts_override, tts_message = tts_message) // BANDASTATION EDIT - END @@ -126,7 +126,7 @@ * should_play_sound - Whether the notice sound should be played or not. This can also be a callback, if you only want mobs to hear the sound based off of specific criteria. * color_override - optional, use the passed color instead of the default notice color. */ -/proc/minor_announce(message, title = "Attention:", alert = FALSE, html_encode = TRUE, list/players, sound_override, should_play_sound = TRUE, color_override, tts_override) +/proc/minor_announce(message, title = "Attention:", alert = FALSE, html_encode = TRUE, list/players, sound_override, should_play_sound = TRUE, color_override, tts_override) // BANDASTATION ADDITION - "tts_override" if(!message) return @@ -189,7 +189,7 @@ /// Proc that just dispatches the announcement to our applicable audience. Only the announcement is a mandatory arg. /// `should_play_sound` can also be a callback, if you want to only play the sound to specific players. -/proc/dispatch_announcement_to_players(announcement, list/players = GLOB.player_list, sound_override = null, should_play_sound = TRUE, datum/component/tts_component/tts_override = null, tts_message = "") // Bandastation Addition: "datum/component/tts_component/tts_override = null" & "tts_message" +/proc/dispatch_announcement_to_players(announcement, list/players = GLOB.player_list, sound_override = null, should_play_sound = TRUE, datum/component/tts_component/tts_override = null, tts_message = "") // BANDASTATION ADDITION: "datum/component/tts_component/tts_override = null" & "tts_message" var/sound_to_play = !isnull(sound_override) ? sound_override : 'sound/announcer/notice/notice2.ogg' // note for later: low-hanging fruit to convert to astype() behind an experiment define whenever the 516 beta releases