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
+6 -1
View File
@@ -154,11 +154,16 @@
if(length(text_to_display) > LANGCHAT_LONGEST_TEXT)
text_to_display = copytext_char(text_to_display, 1, LANGCHAT_LONGEST_TEXT + 1) + "..."
if(styles.Find("emote"))
if("emote" in styles)
styles.Remove("emote")
use_mob_style = FALSE
var/image/r_icon = image('icons/mob/chat_icons.dmi', icon_state = "emote")
text_to_display = "\icon[r_icon]&zwsp;[text_to_display]"
if("radio" in styles)
styles.Remove("radio")
use_mob_style = FALSE
var/image/r_icon = image('icons/mob/chat_icons.dmi', icon_state = "radio")
text_to_display = "\icon[r_icon]&zwsp;[text_to_display]"
return "<span class='center [styles.Join(" ")] [use_mob_style ? langchat_styles : ""] langchat'>[text_to_display]</span>"