Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit a76820d

Browse files
a
1 parent fd7dad0 commit a76820d

File tree

4 files changed

+91
-205
lines changed

4 files changed

+91
-205
lines changed

code/controllers/subsystem/statpanel.dm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,6 @@ SUBSYSTEM_DEF(statpanels)
243243
else if(length(GLOB.sdql2_queries) && target.stat_tab == "SDQL2")
244244
set_SDQL2_tab(target)
245245

246-
/// Stat panel window declaration
247-
/client/var/datum/tgui_window/stat_panel
248-
249246
/atom/proc/remove_from_cache()
250247
SSstatpanels.cached_images -= REF(src)
251248

@@ -279,7 +276,6 @@ SUBSYSTEM_DEF(statpanels)
279276
set name = "Panel Ready"
280277
set hidden = TRUE
281278

282-
statbrowser_ready = TRUE
283279
init_verbs()
284280

285281
/client/verb/update_verbs()

code/modules/client/client_procs.dm

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
340340
// Initialize tgui panel
341341
tgui_panel.Initialize()
342342
src << browse(file('html/statbrowser.html'), "window=statbrowser")
343-
addtimer(CALLBACK(src, PROC_REF(check_panel_loaded)), 5 SECONDS)
344-
345343

346344
if(alert_mob_dupe_login)
347345
spawn()
@@ -486,6 +484,9 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
486484
CL.login()
487485
else
488486
GLOB.connection_logs[ckey] = new/datum/connection_log()
487+
488+
statbrowser_ready = TRUE
489+
addtimer(CALLBACK(src, PROC_REF(check_panel_loaded)), 5 SECONDS)
489490

490491
//////////////
491492
//DISCONNECT//
@@ -1101,10 +1102,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
11011102
src << output("[url_encode(json_encode(panel_tabs))];[url_encode(json_encode(verblist))]", "statbrowser:init_verbs")
11021103

11031104
/client/proc/check_panel_loaded()
1104-
if(statbrowser_ready)
1105-
return
1106-
to_chat(src, span_userdanger("Statpanel failed to load, click <a href='byond://?src=[REF(src)];reload_statbrowser=1'>here</a> to reload the panel "))
1107-
tgui_panel.Initialize()
1105+
to_chat(src, span_userdanger("If statpanel failed to load, click <a href='byond://?src=[REF(src)];reload_statbrowser=1'>here</a> to reload the panel "))
11081106

11091107
/client/verb/reload_statpanel()
11101108
set name = "Reload Statpanel"

html/statbrowser.html

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,14 +1064,6 @@
10641064
tab_change("Status");
10651065
}
10661066

1067-
window.onload = function() {
1068-
NotifyByondOnload();
1069-
};
1070-
1071-
function NotifyByondOnload() {
1072-
window.location.href = "byond://winset?command=Panel-Ready";
1073-
}
1074-
10751067
function create_debug(){
10761068
if(!document.getElementById("Debug Stat Panel")) {
10771069
addPermanentTab("Debug Stat Panel");

0 commit comments

Comments
 (0)