mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 21:54:19 +00:00
PastelTheme
This commit is contained in:
@@ -65,8 +65,9 @@ export const pastelTheme = new (class implements Theme {
|
||||
}
|
||||
|
||||
territoryColor(player: PlayerView): Colord {
|
||||
if (player.team() !== null) {
|
||||
return this.teamColor(player.team());
|
||||
const team = player.team();
|
||||
if (team !== null) {
|
||||
return this.teamColor(team);
|
||||
}
|
||||
if (player.info().playerType === PlayerType.Human) {
|
||||
return humanColors[simpleHash(player.id()) % humanColors.length];
|
||||
|
||||
@@ -65,8 +65,9 @@ export const pastelThemeDark = new (class implements Theme {
|
||||
}
|
||||
|
||||
territoryColor(player: PlayerView): Colord {
|
||||
if (player.team() !== null) {
|
||||
return this.teamColor(player.team());
|
||||
const team = player.team();
|
||||
if (team !== null) {
|
||||
return this.teamColor(team);
|
||||
}
|
||||
if (player.info().playerType === PlayerType.Human) {
|
||||
return humanColors[simpleHash(player.id()) % humanColors.length];
|
||||
|
||||
Reference in New Issue
Block a user