display team count (#648)

## 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
This commit is contained in:
Aotumuri
2025-05-05 05:25:50 +09:00
committed by GitHub
parent a182596d2c
commit 3d3f1261e9
3 changed files with 16 additions and 2 deletions
+2 -1
View File
@@ -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",
+2 -1
View File
@@ -137,7 +137,8 @@
},
"public_lobby": {
"join": "次のゲームに参加",
"waiting": "人が参加しています..."
"waiting": "人が参加しています...",
"teams": "チームの数:"
},
"username": {
"enter_username": "ユーザー名を入力",
+12
View File
@@ -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`
<button
@click=${() => this.lobbyClicked(lobby)}
@@ -130,6 +135,13 @@ export class PublicLobby extends LitElement {
? translateText("game_mode.teams")
: translateText("game_mode.ffa")}
</div>
${teamCount !== null
? html`
<div class="text-md font-medium text-blue-100">
${translateText("public_lobby.teams")} ${teamCount}
</div>
`
: null}
</div>
<div class="flex flex-col items-center">
<div class="text-md font-medium text-blue-100 mb-2">