mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Lag War Interlude: Fix chat scrolling + other misc fixes (#21855)
<img width="300" height="350" alt="image" src="https://github.com/user-attachments/assets/d36417c3-7531-4b5b-b1c2-9189501edd95" /> Port Monkestation/Monkestation2.0#6171 Port cmss13-devs/cmss13#8492 Hopefully fix TGUI scrolling and also chunks topic messages since apparently that's a potential issue. No clue if this will have any impact on chat failing to load.
This commit is contained in:
@@ -406,7 +406,7 @@ GLOBAL_LIST_INIT(localhost_addresses, list(
|
||||
send_resources()
|
||||
|
||||
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."))
|
||||
to_chat_immediate(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."))
|
||||
|
||||
Master.UpdateTickRate()
|
||||
fully_created = TRUE
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
/// Are byond mouse events beyond the window passed in to the ui
|
||||
var/mouse_hooked = FALSE
|
||||
|
||||
/// Any partial packets that we have received from TGUI, waiting to be sent
|
||||
var/partial_packets
|
||||
|
||||
/**
|
||||
* public
|
||||
*
|
||||
@@ -326,6 +329,31 @@
|
||||
// Pass act type messages to ui_act
|
||||
if(type && copytext(type, 1, 5) == "act/")
|
||||
var/act_type = copytext(type, 5)
|
||||
|
||||
var/id = href_list["packetId"]
|
||||
if(!isnull(id))
|
||||
id = text2num(id)
|
||||
|
||||
var/total = text2num(href_list["totalPackets"])
|
||||
|
||||
if(total > MAX_MESSAGE_CHUNKS)
|
||||
return
|
||||
|
||||
if(id == 1)
|
||||
partial_packets = new /list(total)
|
||||
|
||||
partial_packets[id] = href_list["packet"]
|
||||
|
||||
if(id != total)
|
||||
return
|
||||
|
||||
var/assembled_payload = ""
|
||||
for(var/packet in partial_packets)
|
||||
assembled_payload += packet
|
||||
|
||||
payload = json_decode(assembled_payload)
|
||||
partial_packets = null
|
||||
|
||||
log_tgui(user, "Action: [act_type] [href_list["payload"]]",
|
||||
window = window,
|
||||
src_object = src_object)
|
||||
|
||||
Reference in New Issue
Block a user