Merge pull request #6836 from Citadel-Station-13/upstream-merge-37934
[MIRROR] Migrate goonchat pings to a subsystem
This commit is contained in:
@@ -105,19 +105,10 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
|
||||
//do not convert to to_chat()
|
||||
SEND_TEXT(owner, "<span class=\"userdanger\">Failed to load fancy chat, reverting to old chat. Certain features won't work.</span>")
|
||||
|
||||
pingLoop()
|
||||
|
||||
/datum/chatOutput/proc/showChat()
|
||||
winset(owner, "output", "is-visible=false")
|
||||
winset(owner, "browseroutput", "is-disabled=false;is-visible=true")
|
||||
|
||||
/datum/chatOutput/proc/pingLoop()
|
||||
set waitfor = FALSE
|
||||
|
||||
while (owner)
|
||||
ehjax_send(data = owner.is_afk(29) ? "softPang" : "pang") // SoftPang isn't handled anywhere but it'll always reset the opts.lastPang.
|
||||
sleep(30)
|
||||
|
||||
/datum/chatOutput/proc/ehjax_send(client/C = owner, window = "browseroutput", data)
|
||||
if(islist(data))
|
||||
data = json_encode(data)
|
||||
|
||||
Reference in New Issue
Block a user