Adds helpers to avoid << use

This commit is contained in:
CitadelStationBot
2017-08-08 22:28:16 -05:00
parent 41f42aabca
commit cc7ad81f79
85 changed files with 241 additions and 217 deletions
+3 -4
View File
@@ -100,7 +100,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
sendClientData()
//do not convert to to_chat()
owner << {"<span class="userdanger">If you can see this, update byond.</span>"}
SEND_TEXT(owner, "<span class=\"userdanger\">If you can see this, update byond.</span>")
pingLoop()
@@ -172,7 +172,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
/proc/icon2base64(icon/icon, iconKey = "misc")
if (!isicon(icon))
return FALSE
GLOB.iconCache[iconKey] << icon
WRITE_FILE(GLOB.iconCache[iconKey], icon)
var/iconData = GLOB.iconCache.ExportText(iconKey)
var/list/partial = splittext(iconData, "{")
return replacetext(copytext(partial[2], 3, -5), "\n", "")
@@ -224,7 +224,6 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
//Ok so I did my best but I accept that some calls to this will be for shit like sound and images
//It stands that we PROBABLY don't want to output those to the browser output so just handle them here
if (istype(message, /image) || istype(message, /sound) || istype(target, /savefile))
target << message
CRASH("Invalid message! [message]")
if(!istext(message))
@@ -255,7 +254,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
continue
//Send it to the old style output window.
C << original_message
SEND_TEXT(C, original_message)
if(!C.chatOutput || C.chatOutput.broken) // A player who hasn't updated his skin file.
continue