[MIRROR] Fixes tgui say flash on load [MDB IGNORE] (#24361)

* Fixes tgui say flash on load (#78879)

## About The Pull Request
Hides the TGUI say window from popping up briefly during load
## Why It's Good For The Game
Just annoying for it to "jump scare" players
Fixes #75716
## Changelog
🆑
fix: TGUI Say should no longer flash during initialization
/🆑

* Fixes tgui say flash on load

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-10-16 17:34:03 +02:00
committed by GitHub
parent 7cb9501370
commit 85a1aeac0a
3 changed files with 8 additions and 22 deletions
+7 -7
View File
@@ -36,6 +36,7 @@
/datum/tgui_say/New(client/client, id)
src.client = client
window = new(client, id)
winset(client, "tgui_say", "size=1,1;is-visible=0;")
window.subscribe(src, PROC_REF(on_message))
window.is_browser = TRUE
@@ -62,11 +63,14 @@
*/
/datum/tgui_say/proc/load()
window_open = FALSE
winshow(client, "tgui_say", FALSE)
winset(client, "tgui_say", "pos=848,500;size=231,30;is-visible=0;")
window.send_message("props", list(
lightMode = client.prefs?.read_preference(/datum/preference/toggle/tgui_say_light_mode),
maxLength = max_length,
))
stop_thinking()
return TRUE
@@ -84,9 +88,7 @@
window_open = TRUE
if(payload["channel"] != OOC_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != LOOC_CHANNEL) // SKYRAT EDIT CHANGE (Add LOOC_CHANNEL)
start_thinking()
if(client.typing_indicators)
log_speech_indicators("[key_name(client)] started typing at [loc_name(client.mob)], indicators enabled.")
else
if(!client.typing_indicators)
log_speech_indicators("[key_name(client)] started typing at [loc_name(client.mob)], indicators DISABLED.")
return TRUE
@@ -97,9 +99,7 @@
/datum/tgui_say/proc/close()
window_open = FALSE
stop_thinking()
if(client.typing_indicators)
log_speech_indicators("[key_name(client)] stopped typing at [loc_name(client.mob)], indicators enabled.")
else
if(!client.typing_indicators)
log_speech_indicators("[key_name(client)] stopped typing at [loc_name(client.mob)], indicators DISABLED.")
/**