Lashtw commited on
Commit
e55bed4
·
1 Parent(s): 977cf1c

feat: 自動同步更新至 Hugging Face

Browse files
Files changed (1) hide show
  1. js/game.js +17 -0
js/game.js CHANGED
@@ -507,8 +507,25 @@ async function checkActiveSession() {
507
  game.merchantBuffs = { ...fg.merchantBuffs };
508
  changed = true;
509
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
510
  if (changed) {
511
  renderRes();
 
 
 
512
  updateBuildBtns();
513
  toast('👨‍🏫 教師已於管理後台調整軍資(' + (fresh.lastAdminOp.reason || '資源校正') + ')', 'info', 5000);
514
  }
 
507
  game.merchantBuffs = { ...fg.merchantBuffs };
508
  changed = true;
509
  }
510
+ if (fg.buildings) {
511
+ game.buildings = { ...fg.buildings };
512
+ changed = true;
513
+ }
514
+ if (fresh.progress) {
515
+ Object.assign(progress, fresh.progress);
516
+ changed = true;
517
+ }
518
+ if (fg.peakProd !== undefined) {
519
+ game.peakProd = fg.peakProd;
520
+ }
521
+ if (fg.peakBuildings) {
522
+ game.peakBuildings = { ...fg.peakBuildings };
523
+ }
524
  if (changed) {
525
  renderRes();
526
+ renderBuild();
527
+ renderMapSpots();
528
+ renderInMapTownPanel();
529
  updateBuildBtns();
530
  toast('👨‍🏫 教師已於管理後台調整軍資(' + (fresh.lastAdminOp.reason || '資源校正') + ')', 'info', 5000);
531
  }