Display every game in the lobby

Show all 6 potential games while in the lobby

  1. // ==UserScript==
  2. // @name Display every game in the lobby
  3. // @author commander
  4. // @version 0.0.2
  5. // @license GPL-3.0
  6. // @namespace https://github.com/asger-finding/tanktrouble-userscripts
  7. // @match https://tanktrouble.com/*
  8. // @match https://beta.tanktrouble.com/*
  9. // @exclude *://classic.tanktrouble.com/
  10. // @description Show all 6 potential games while in the lobby
  11. // @run-at document-end
  12. // @grant none
  13. // @noframes
  14. // ==/UserScript==
  15.  
  16. UIConstants.GAME_ICON_POOL_SIZE = 6;
  17. UIConstants.GAME_ICON_COUNT = 6;
  18. UIConstants.GAME_ICON_WIDTH /= 1.9;
  19. UIConstants.GAME_ICON_HEIGHT /= 1.9;
  20.  
  21. UIGameIconImage.prototype.spawn = function(x, y, gameState, favouriteActiveQueuedCounts) {
  22. this.reset(x, y);
  23. this.gameId = gameState.getId();
  24. this.mode = gameState.getMode();
  25. this.ranked = gameState.getRanked();
  26. this.playerStates = gameState.getPlayerStates();
  27. this.favouriteActiveQueuedCounts = favouriteActiveQueuedCounts;
  28. this._updateUI();
  29. const delay = 50 + (Math.random() * 200);
  30. if (this.removeTween) this.removeTween.stop();
  31.  
  32. this.game.add.tween(this.scale).to({
  33. x: UIConstants.ASSET_SCALE / 1.9,
  34. y: UIConstants.ASSET_SCALE / 1.9
  35. }, UIConstants.ELEMENT_POP_IN_TIME, Phaser.Easing.Back.Out, true, delay);
  36. };

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址