The to_chat proc no longer accepts null or empty strings and runtimes instead. (#59843)

* Catch null text sent to to_chat

* Brain traumas no longer send empty to_chat gain strings

* Make to_chat_immediate changes and clean up args list formatting

* Fix empty to_chat message where there is no memo for admins

* Fix additional edge case where there are no messages for the ckey.
This commit is contained in:
Timberpoes
2021-06-28 16:11:33 +03:00
committed by GitHub
parent 5f4c0baeea
commit fbdfde900c
3 changed files with 47 additions and 21 deletions
+6 -2
View File
@@ -378,7 +378,9 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(holder)
add_admin_verbs()
to_chat(src, get_message_output("memo"))
var/memo_message = get_message_output("memo")
if(memo_message)
to_chat(src, memo_message)
adminGreet()
if (mob && reconnecting)
var/stealth_admin = mob.client?.holder?.fakekey
@@ -426,7 +428,9 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(CONFIG_GET(flag/autoconvert_notes))
convert_notes_sql(ckey)
to_chat(src, get_message_output("message", ckey))
var/user_messages = get_message_output("message", ckey)
if(user_messages)
to_chat(src, user_messages)
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
to_chat(src, span_warning("Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you."))