Allow choosing your own runechat color

This commit is contained in:
ShadowLarkens
2024-09-27 07:33:52 -07:00
parent f88820729f
commit 200981ded9
2 changed files with 25 additions and 0 deletions
+7
View File
@@ -123,6 +123,13 @@ var/list/runechat_image_cache = list()
target.chat_color_darkened = colorize_string(target.name, 0.85, 0.85)
target.chat_color_name = target.name
// Always force it back to a pref if they have one
if(ismob(target))
var/mob/M = target
if(M?.client?.prefs?.runechat_color != COLOR_BLACK)
target.chat_color = M.client.prefs.runechat_color
target.chat_color_darkened = M.client.prefs.runechat_color
// Get rid of any URL schemes that might cause BYOND to automatically wrap something in an anchor tag
var/static/regex/url_scheme = new(@"[A-Za-z][A-Za-z0-9+-\.]*:\/\/", "g")
text = replacetext(text, url_scheme, "")