[MIRROR] do an actual timeout test for chat inits (#8539)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2
2024-06-17 02:34:55 -07:00
committed by GitHub
parent d10d65c09a
commit 96ada5e654
2 changed files with 9 additions and 1 deletions

View File

@@ -48,13 +48,13 @@
assets = list( assets = list(
get_asset_datum(/datum/asset/simple/tgui_panel), get_asset_datum(/datum/asset/simple/tgui_panel),
)) ))
window.reinitialize() // Workaround for an early init fail...
window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome)) window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome))
window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/tgfont)) window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/tgfont))
window.send_asset(get_asset_datum(/datum/asset/spritesheet/chat)) window.send_asset(get_asset_datum(/datum/asset/spritesheet/chat))
// Other setup // Other setup
request_telemetry() request_telemetry()
addtimer(CALLBACK(src, PROC_REF(on_initialize_timed_out)), 5 SECONDS) addtimer(CALLBACK(src, PROC_REF(on_initialize_timed_out)), 5 SECONDS)
window.send_message("testTelemetryCommand")
/** /**
* private * private

View File

@@ -36,6 +36,14 @@ export const telemetryMiddleware = (store) => {
Byond.sendMessage('telemetry', { connections }); Byond.sendMessage('telemetry', { connections });
return; return;
} }
// For whatever reason we didn't get the telemetry, re-request
if (type === 'testTelemetryCommand') {
setTimeout(() => {
if (!telemetry) {
Byond.sendMessage('ready');
}
}, 500);
}
// Keep telemetry up to date // Keep telemetry up to date
if (type === 'backend/update') { if (type === 'backend/update') {
next(action); next(action);