From d750d9d65d107c1255b29bffa5ef576af0dcb34a Mon Sep 17 00:00:00 2001 From: Leonard Craft III Date: Tue, 26 Sep 2023 13:23:07 -0500 Subject: [PATCH] Support best-of-n room titles (#2154) --- js/client.js | 3 +++ src/panel-mainmenu.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/js/client.js b/js/client.js index 78e9c856d8..5596dbf967 100644 --- a/js/client.js +++ b/js/client.js @@ -1256,6 +1256,9 @@ function toId() { var columnChanged = false; window.NonBattleGames = {rps: 'Rock Paper Scissors'}; + for (var i = 3; i <= 9; i = i + 2) { + window.NonBattleGames['bestof' + i] = 'Best-of-' + i; + } window.BattleFormats = {}; for (var j = 1; j < formatsList.length; j++) { if (isSection) { diff --git a/src/panel-mainmenu.tsx b/src/panel-mainmenu.tsx index cdab4197de..66f7ff9823 100644 --- a/src/panel-mainmenu.tsx +++ b/src/panel-mainmenu.tsx @@ -97,6 +97,9 @@ class MainMenuRoom extends PSRoom { let column = 0; window.NonBattleGames = {rps: 'Rock Paper Scissors'}; + for (let i = 3; i <= 9; i = i + 2) { + window.NonBattleGames['bestof' + i] = 'Best-of-' + i; + } window.BattleFormats = {}; for (let j = 1; j < formatsList.length; j++) { const entry = formatsList[j];