Megaphones now create floating chat and use accent/lang (#22942)

Megaphones now use your accent, language, and create floating text when
used.

<img width="2560" height="1400" alt="dreamseeker_V1ntU7aL2j"
src="https://github.com/user-attachments/assets/36828048-9e5b-4c6d-bad9-974d8880adef"
/>

Port of https://github.com/Baystation12/Baystation12/pull/35232 but only
in spirit.
This commit is contained in:
Hayden
2026-08-02 01:24:36 +00:00
committed by GitHub
parent bd13fc8f7c
commit 13beeb437a
5 changed files with 21 additions and 6 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
var/list/exclaim_verb = list("exclaims")
/// Used when a sentence ends in !!
var/list/shout_verb = list("shouts", "yells", "screams")
var/list/shout_verb = list("shouts", "yells", "screams", "broadcasts")
/// Optional. When not specified speech_verb + quietly/softly is used instead.
var/list/whisper_verb = null
+5 -2
View File
@@ -241,7 +241,8 @@ var/list/channel_to_radio_key = new
to_chat(src, SPAN_WARNING("You try to speak, but nothing comes out!"))
return
var/message_mode = parse_message_mode(text, "headset")
var/is_broadcast = verb == "broadcasts"
var/message_mode = is_broadcast ? null : parse_message_mode(text, "headset")
var/regex/emote = regex("^(\[\\*^\])\[^*\]+$")
@@ -325,7 +326,7 @@ var/list/channel_to_radio_key = new
msg.speech_sound = handle_v[1]
msg.sound_vol = handle_v[2]
msg.italics = handle_v[3]
msg.font_size = get_font_size_modifier()
msg.font_size = is_broadcast ? FONT_SIZE_HUGE : get_font_size_modifier()
//speaking into radios
if(length(used_radios))
@@ -384,6 +385,8 @@ var/list/channel_to_radio_key = new
langchat_styles = list("langchat_italic")
if(is_shouting)
langchat_styles = list("langchat_yell")
if(is_broadcast)
langchat_styles += "radio"
langchat_say_message(msg, get_hearers_in_view(msg.message_range, src), additional_styles = langchat_styles)