mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-22 12:47:16 +01:00
[MIRROR] Dependencyup 02.2026 (#12395)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
2d847d431a
commit
9eab6f3bf5
@@ -237,17 +237,19 @@
|
||||
/proc/tgui_Topic(href_list)
|
||||
// Skip non-tgui topics
|
||||
if(!href_list["tgui"])
|
||||
return TRUE
|
||||
return FALSE
|
||||
var/type = href_list["type"]
|
||||
// Unconditionally collect tgui logs
|
||||
if(type == "log")
|
||||
log_tgui(usr, href_list["message"])
|
||||
var/context = href_list["window_id"]
|
||||
if (href_list["ns"])
|
||||
context += " ([href_list["ns"]])"
|
||||
log_tgui(usr, href_list["message"],
|
||||
context = context)
|
||||
// Reload all tgui windows
|
||||
if(type == "cacheReloaded")
|
||||
// Note: Find a solution for the below causing asset CDN to stop working
|
||||
// which doesn't prevent players from using the dev server on prod
|
||||
// whenever the asset CDN is actually used (currently using rsc only)
|
||||
if(/* !check_rights(R_ADMIN) || */ usr.client.tgui_cache_reloaded)
|
||||
// Debugging should work, it can be bypassed anyway
|
||||
if(/*!check_rights(R_ADMIN) ||*/ usr.client.tgui_cache_reloaded)
|
||||
return TRUE
|
||||
// Mark as reloaded
|
||||
usr.client.tgui_cache_reloaded = TRUE
|
||||
@@ -264,16 +266,24 @@
|
||||
if(window_id)
|
||||
window = usr.client.tgui_windows[window_id]
|
||||
if(!window)
|
||||
// #ifdef TGUI_DEBUGGING // Always going to log these
|
||||
log_tgui(usr, "Error: Couldn't find the window datum, force closing.")
|
||||
// #endif
|
||||
log_tgui(usr,
|
||||
"Error: Couldn't find the window datum, force closing.",
|
||||
context = window_id)
|
||||
SStgui.force_close_window(usr, window_id)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// Decode payload
|
||||
var/payload
|
||||
if(href_list["payload"])
|
||||
payload = json_decode(href_list["payload"])
|
||||
var/payload_text = href_list["payload"]
|
||||
|
||||
if (!rustg_json_is_valid(payload_text))
|
||||
log_tgui(usr, "Error: Invalid JSON")
|
||||
return TRUE
|
||||
|
||||
payload = json_decode(payload_text)
|
||||
|
||||
// Pass message to window
|
||||
if(window)
|
||||
window.on_message(type, payload, href_list)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user