From 3d3f1261e9b38ed6db740ee60130d6706360709e Mon Sep 17 00:00:00 2001 From: Aotumuri Date: Mon, 5 May 2025 05:25:50 +0900 Subject: [PATCH] display team count (#648) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description: I added a display for the number of teams in public lobbies. ![スクリーンショット 2025-05-04 20 59 02](https://github.com/user-attachments/assets/ab24de77-fcac-4c2d-b272-2bc3ce29187f) ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: aotumuri --- resources/lang/en.json | 3 ++- resources/lang/ja.json | 3 ++- src/client/PublicLobby.ts | 12 ++++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/resources/lang/en.json b/resources/lang/en.json index d1cfe0f78..e3679dbe4 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -145,7 +145,8 @@ }, "public_lobby": { "join": "Join next Game", - "waiting": "players waiting" + "waiting": "players waiting", + "teams": "Team count:" }, "username": { "enter_username": "Enter your username", diff --git a/resources/lang/ja.json b/resources/lang/ja.json index a268941c9..b88aa456f 100644 --- a/resources/lang/ja.json +++ b/resources/lang/ja.json @@ -137,7 +137,8 @@ }, "public_lobby": { "join": "次のゲームに参加", - "waiting": "人が参加しています..." + "waiting": "人が参加しています...", + "teams": "チームの数:" }, "username": { "enter_username": "ユーザー名を入力", diff --git a/src/client/PublicLobby.ts b/src/client/PublicLobby.ts index 9170ca22c..acb463c4a 100644 --- a/src/client/PublicLobby.ts +++ b/src/client/PublicLobby.ts @@ -94,6 +94,11 @@ export class PublicLobby extends LitElement { const playersRemainingBeforeMax = lobby.gameConfig.maxPlayers - lobby.numClients; + const teamCount = + lobby.gameConfig.gameMode === GameMode.Team + ? lobby.gameConfig.playerTeams || 0 + : null; + return html`