make bot names gray instead of bot emoji

This commit is contained in:
Evan
2025-02-12 11:29:49 -08:00
parent a478e305d1
commit 3639997f05
3 changed files with 5 additions and 9 deletions
+5 -4
View File
@@ -161,11 +161,12 @@ export class NameLayer implements Layer {
element.appendChild(flagImg);
}
const textColor = player.type() == PlayerType.Human ? "#000000" : "#4D4D4D";
const nameDiv = document.createElement("div");
nameDiv.classList.add("player-name");
nameDiv.innerHTML =
(player.type() !== PlayerType.Human ? "🤖 " : "") + player.name();
nameDiv.style.color = this.theme.playerInfoColor(player.id()).toHex();
nameDiv.innerHTML = player.name();
nameDiv.style.color = textColor;
nameDiv.style.fontFamily = this.theme.font();
nameDiv.style.whiteSpace = "nowrap";
nameDiv.style.overflow = "hidden";
@@ -176,7 +177,7 @@ export class NameLayer implements Layer {
const troopsDiv = document.createElement("div");
troopsDiv.classList.add("player-troops");
troopsDiv.textContent = renderTroops(player.troops());
troopsDiv.style.color = this.theme.playerInfoColor(player.id()).toHex();
troopsDiv.style.color = textColor;
troopsDiv.style.fontFamily = this.theme.font();
troopsDiv.style.fontWeight = "bold";
troopsDiv.style.zIndex = "3";
-1
View File
@@ -119,7 +119,6 @@ export interface Config {
}
export interface Theme {
playerInfoColor(id: PlayerID): Colord;
territoryColor(playerInfo: PlayerInfo): Colord;
borderColor(playerInfo: PlayerInfo): Colord;
defendedBorderColor(playerInfo: PlayerInfo): Colord;
-4
View File
@@ -240,10 +240,6 @@ export const pastelTheme = new (class implements Theme {
private _spawnHighlightColor = colord({ r: 255, g: 213, b: 79 });
playerInfoColor(id: PlayerID): Colord {
return colord({ r: 50, g: 50, b: 50 });
}
territoryColor(playerInfo: PlayerInfo): Colord {
if (playerInfo.playerType == PlayerType.Human) {
return this.humanColors[