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:
Wildkins
2026-02-14 02:17:36 +00:00
committed by GitHub
parent 84d3a447ab
commit 04c8e9e78c
11 changed files with 125 additions and 30 deletions
+1 -1
View File
@@ -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
+28
View File
@@ -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)