From 7b4f235540e184a34e70925227ec94f44cd06d99 Mon Sep 17 00:00:00 2001 From: evan Date: Wed, 30 Apr 2025 14:09:51 -0700 Subject: [PATCH] in spawn phase highligh player as green if on the same team --- src/client/graphics/layers/TerritoryLayer.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client/graphics/layers/TerritoryLayer.ts b/src/client/graphics/layers/TerritoryLayer.ts index 88ec807c3..ce1b9a705 100644 --- a/src/client/graphics/layers/TerritoryLayer.ts +++ b/src/client/graphics/layers/TerritoryLayer.ts @@ -119,6 +119,14 @@ export class TerritoryLayer implements Layer { if (!centerTile) { continue; } + let color = this.theme.spawnHighlightColor(); + if ( + this.game.myPlayer() != null && + this.game.myPlayer() != human && + this.game.myPlayer().isFriendly(human) + ) { + color = this.theme.selfColor(); + } for (const tile of this.game.bfs( centerTile, euclDistFN(centerTile, 9, true), @@ -126,7 +134,7 @@ export class TerritoryLayer implements Layer { if (!this.game.hasOwner(tile)) { this.paintHighlightCell( new Cell(this.game.x(tile), this.game.y(tile)), - this.theme.spawnHighlightColor(), + color, 255, ); }