Merge branch 'main' into bomb-confirmation

This commit is contained in:
Ryan
2026-01-08 09:26:56 +00:00
committed by GitHub
22 changed files with 571 additions and 115 deletions
+1
View File
@@ -23,6 +23,7 @@ export const MapDescription: Record<keyof typeof GameMapType, string> = {
Asia: "Asia",
Mars: "Mars",
SouthAmerica: "South America",
BritanniaClassic: "Britannia Classic",
Britannia: "Britannia",
GatewayToTheAtlantic: "Gateway to the Atlantic",
Australia: "Australia",
@@ -73,6 +73,12 @@ export class PlayerInfoOverlay extends LitElement implements Layer {
@state()
private unit: UnitView | null = null;
@state()
private isWilderness: boolean = false;
@state()
private isIrradiatedWilderness: boolean = false;
@state()
private _isInfoVisible: boolean = false;
@@ -106,6 +112,8 @@ export class PlayerInfoOverlay extends LitElement implements Layer {
this.setVisible(false);
this.unit = null;
this.player = null;
this.isWilderness = false;
this.isIrradiatedWilderness = false;
}
public maybeShow(x: number, y: number) {
@@ -126,6 +134,13 @@ export class PlayerInfoOverlay extends LitElement implements Layer {
this.playerProfile = p;
});
this.setVisible(true);
} else if (owner && !owner.isPlayer() && this.game.isLand(tile)) {
if (this.game.hasFallout(tile)) {
this.isIrradiatedWilderness = true;
} else {
this.isWilderness = true;
}
this.setVisible(true);
} else if (!this.game.isLand(tile)) {
const units = this.game
.units(UnitType.Warship, UnitType.TradeShip, UnitType.TransportShip)
@@ -520,6 +535,15 @@ export class PlayerInfoOverlay extends LitElement implements Layer {
<div
class="bg-gray-800/70 backdrop-blur-xs shadow-xs rounded-lg shadow-lg transition-all duration-300 text-white text-lg md:text-base ${containerClasses}"
>
${this.isWilderness || this.isIrradiatedWilderness
? html`<div class="p-2 font-bold">
${translateText(
this.isIrradiatedWilderness
? "player_info_overlay.irradiated_wilderness_title"
: "player_info_overlay.wilderness_title",
)}
</div>`
: ""}
${this.player !== null ? this.renderPlayerInfo(this.player) : ""}
${this.unit !== null ? this.renderUnitInfo(this.unit) : ""}
</div>
+7
View File
@@ -16,6 +16,13 @@
border-color: var(--color-gray-200, currentColor);
}
input,
textarea,
select {
background-color: #fff;
color: #000;
}
input::placeholder,
textarea::placeholder {
color: var(--color-gray-400);