Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: dj-34 <[email protected]>
  • Loading branch information
AyIong and dj-34 authored Jan 19, 2025
1 parent 88d0186 commit b5d601d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/__HELPERS/priority_announce.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b5d601d

Please sign in to comment.