Compress huge saves with the browser's gzip (#176)

This commit is contained in:
Frederic Jung 2026-10-27 21:34:35 +01:00
parent 8c3ac4e9df
commit 146fae0faf
No known key found for this signature in database
5 changed files with 86 additions and 7 deletions

View file

@ -40,9 +40,9 @@ function boot(data){
renderAll();if(S.grace&&S.grace.until>S.day&&R.graceNets&&!S.grace.told){S.grace.told=1;toast(tr('loop.new_networks_on_the_map_this',{n:S.grace.until-S.day}),'goal',[{l:tr('common.open_noc'),act:'leftTab',args:{t:'noc'}}]);}
if(S.auNews){delete S.auNews;const c=Object.keys(S.pops).find(x=>CITY[x].au);toast(tr('loop.australia_got_more_australian'),'bad',[{l:tr('common.open'),act:'focusCity',args:{city:c}}],{a:'city',v:c});}
if(!whatsNew(true))toast(tr('loop.welcome_back_name_your_network_is',{name:esc(S.name),date:dateStr(S.day)}),'good');}
else{showTitle();whatsNew(false);if(sv)toast(tr('loop.your_saved_game_could_not_be'),'bad');}}
else{showTitle();whatsNew(false);if(sv||UI.gzBroken)toast(tr('loop.your_saved_game_could_not_be'),'bad');}}
renderHUD();renderLeft();
window.claude?.hot?.snapshot?.(()=>({S:S&&JSON.parse(JSON.stringify(S)),cam:{...cam}}));
if(!window.__TUBES_TEST__){requestAnimationFrame(frame);setTimeout(checkUpdate,4000);setInterval(checkUpdate,10*60*1000);}
}
window.claude?.hot?.ready ? window.claude.hot.ready(boot) : boot(window.claude?.hot?.data ?? {});
gzBoot(()=>window.claude?.hot?.ready ? window.claude.hot.ready(boot) : boot(window.claude?.hot?.data ?? {}));