mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-27 05:52:43 +00:00
make bot names gray instead of bot emoji
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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[
|
||||
|
||||
Reference in New Issue
Block a user