diff --git a/src/client/graphics/layers/PlayerPanel.ts b/src/client/graphics/layers/PlayerPanel.ts index fc598de53..5301ba2b1 100644 --- a/src/client/graphics/layers/PlayerPanel.ts +++ b/src/client/graphics/layers/PlayerPanel.ts @@ -184,7 +184,9 @@ export class PlayerPanel extends LitElement implements Layer { let other = this.g.owner(this.tile); if (!other.isPlayer()) { - throw new Error("Tile is not owned by a player"); + this.hide(); + console.warn("Tile is not owned by a player"); + return; } other = other as PlayerView; diff --git a/src/client/graphics/layers/RadialMenu.ts b/src/client/graphics/layers/RadialMenu.ts index a459764ff..719df47a2 100644 --- a/src/client/graphics/layers/RadialMenu.ts +++ b/src/client/graphics/layers/RadialMenu.ts @@ -350,9 +350,12 @@ export class RadialMenu implements Layer { actions: PlayerActions, tile: TileRef, ) { - this.activateMenuElement(Slot.Build, "#ebe250", buildIcon, () => { - this.buildMenu.showMenu(tile); - }); + if (!this.g.inSpawnPhase()) { + this.activateMenuElement(Slot.Build, "#ebe250", buildIcon, () => { + this.buildMenu.showMenu(tile); + }); + } + if (this.g.hasOwner(tile)) { this.activateMenuElement(Slot.Info, "#64748B", infoIcon, () => { this.playerPanel.show(actions, tile);