mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-08-13 03:10:44 +00:00
in spawn phase highligh player as green if on the same team
This commit is contained in:
@@ -119,6 +119,14 @@ export class TerritoryLayer implements Layer {
|
|||||||
if (!centerTile) {
|
if (!centerTile) {
|
||||||
continue;
|
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(
|
for (const tile of this.game.bfs(
|
||||||
centerTile,
|
centerTile,
|
||||||
euclDistFN(centerTile, 9, true),
|
euclDistFN(centerTile, 9, true),
|
||||||
@@ -126,7 +134,7 @@ export class TerritoryLayer implements Layer {
|
|||||||
if (!this.game.hasOwner(tile)) {
|
if (!this.game.hasOwner(tile)) {
|
||||||
this.paintHighlightCell(
|
this.paintHighlightCell(
|
||||||
new Cell(this.game.x(tile), this.game.y(tile)),
|
new Cell(this.game.x(tile), this.game.y(tile)),
|
||||||
this.theme.spawnHighlightColor(),
|
color,
|
||||||
255,
|
255,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user