mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 04:38:01 +00:00
[UI/Bugfix] Fixed the player info overlay displaying false when troops where equal to 0 (#298)
The player info was:  I fixed it to:  One thing I'm not sure about, is if we want to hide the attacking troops on 0 or always show it? In this PR it's always shown.
This commit is contained in:
@@ -205,14 +205,16 @@ export class PlayerInfoOverlay extends LitElement implements Layer {
|
||||
${player.name()}
|
||||
</div>
|
||||
<div class="text-sm opacity-80">Type: ${playerType}</div>
|
||||
${player.troops() >= 1 &&
|
||||
html`<div class="text-sm opacity-80" translate="no">
|
||||
Defending troops: ${renderTroops(player.troops())}
|
||||
</div>`}
|
||||
${attackingTroops >= 1 &&
|
||||
html`<div class="text-sm opacity-80" translate="no">
|
||||
Attacking troops: ${renderTroops(attackingTroops)}
|
||||
</div>`}
|
||||
${player.troops() >= 1
|
||||
? html`<div class="text-sm opacity-80" translate="no">
|
||||
Defending troops: ${renderTroops(player.troops())}
|
||||
</div>`
|
||||
: ""}
|
||||
${attackingTroops >= 1
|
||||
? html`<div class="text-sm opacity-80" translate="no">
|
||||
Attacking troops: ${renderTroops(attackingTroops)}
|
||||
</div>`
|
||||
: ""}
|
||||
<div class="text-sm opacity-80" translate="no">
|
||||
Gold: ${renderNumber(player.gold())}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user