diff --git a/src/client/graphics/layers/NameLayer.ts b/src/client/graphics/layers/NameLayer.ts index b45eec776..997569a0a 100644 --- a/src/client/graphics/layers/NameLayer.ts +++ b/src/client/graphics/layers/NameLayer.ts @@ -163,6 +163,10 @@ export class NameLayer implements Layer { iconsDiv.style.position = 'absolute' iconsDiv.style.display = 'flex' iconsDiv.style.zIndex = '1' // Lower z-index to appear behind + iconsDiv.style.width = '100%' // Add this + iconsDiv.style.height = '100%' // Add this + iconsDiv.style.top = '0' // Add this + iconsDiv.style.left = '0' // Add this element.appendChild(iconsDiv) this.container.appendChild(element) diff --git a/src/core/GameView.ts b/src/core/GameView.ts index fd551da65..9343b755c 100644 --- a/src/core/GameView.ts +++ b/src/core/GameView.ts @@ -166,7 +166,7 @@ export class PlayerView implements Player { return [] } isTraitor(): boolean { - return false + return this.data.isTraitor } canTarget(other: Player): boolean { return false diff --git a/src/core/game/Game.ts b/src/core/game/Game.ts index a62aabffc..1b2a8eba3 100644 --- a/src/core/game/Game.ts +++ b/src/core/game/Game.ts @@ -429,6 +429,7 @@ export interface PlayerUpdate { troops: number, targetTroopRatio: number alliances: number[] + isTraitor: boolean } diff --git a/src/core/game/PlayerImpl.ts b/src/core/game/PlayerImpl.ts index f3101a260..bf1577b49 100644 --- a/src/core/game/PlayerImpl.ts +++ b/src/core/game/PlayerImpl.ts @@ -76,7 +76,8 @@ export class PlayerImpl implements MutablePlayer { workers: this.workers(), troops: this.troops(), targetTroopRatio: this.targetTroopRatio(), - alliances: this.alliances().map(a => a.other(this).smallID()) + alliances: this.alliances().map(a => a.other(this).smallID()), + isTraitor: this.isTraitor(), } }