diff --git a/resources/lang/en.json b/resources/lang/en.json index 795f7db1b..c6d931b72 100644 --- a/resources/lang/en.json +++ b/resources/lang/en.json @@ -549,7 +549,8 @@ "yes": "Yes", "no": "No", "none": "None", - "alliances": "Alliances" + "alliances": "Alliances", + "flag": "Flag" }, "replay_panel": { "replay_speed": "Replay speed", diff --git a/src/client/graphics/layers/PlayerPanel.ts b/src/client/graphics/layers/PlayerPanel.ts index 7f4f425db..0f049a7cd 100644 --- a/src/client/graphics/layers/PlayerPanel.ts +++ b/src/client/graphics/layers/PlayerPanel.ts @@ -26,6 +26,7 @@ import { import { renderNumber, renderTroops } from "../../Utils"; import { UIState } from "../UIState"; import { ChatModal } from "./ChatModal"; +import Countries from "../../data/countries.json"; import { EmojiTable } from "./EmojiTable"; import { Layer } from "./Layer"; @@ -244,6 +245,11 @@ export class PlayerPanel extends LitElement implements Layer { const canTarget = this.actions?.interaction?.canTarget; const canEmbargo = this.actions?.interaction?.canEmbargo; + //flag icon in the playerPanel + const flagCode = other.cosmetics.flag; + const country = typeof flagCode === "string" ? Countries.find((c) => c.code === flagCode) : undefined; + const flagName = country?.name; + return html`