mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-29 12:02:13 +00:00
thead_split: add is traitor, fix icon scaling issue
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -166,7 +166,7 @@ export class PlayerView implements Player {
|
||||
return []
|
||||
}
|
||||
isTraitor(): boolean {
|
||||
return false
|
||||
return this.data.isTraitor
|
||||
}
|
||||
canTarget(other: Player): boolean {
|
||||
return false
|
||||
|
||||
@@ -429,6 +429,7 @@ export interface PlayerUpdate {
|
||||
troops: number,
|
||||
targetTroopRatio: number
|
||||
alliances: number[]
|
||||
isTraitor: boolean
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user