From 1e1a14c8a8792f9338bb598bd2a1480e460bb375 Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Wed, 14 May 2025 01:53:36 -0400 Subject: [PATCH] PastelTheme --- src/core/configuration/PastelTheme.ts | 5 +++-- src/core/configuration/PastelThemeDark.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/configuration/PastelTheme.ts b/src/core/configuration/PastelTheme.ts index d0bbe5c6d..4527f6162 100644 --- a/src/core/configuration/PastelTheme.ts +++ b/src/core/configuration/PastelTheme.ts @@ -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]; diff --git a/src/core/configuration/PastelThemeDark.ts b/src/core/configuration/PastelThemeDark.ts index 502af2123..050bfa807 100644 --- a/src/core/configuration/PastelThemeDark.ts +++ b/src/core/configuration/PastelThemeDark.ts @@ -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];