{#if isObserver} {@const p1 = obsPlayers[0]} {@const p2 = obsPlayers[1]} {@const s1 = supplyFor(p1)} {@const s2 = supplyFor(p2)} {@const prod1 = productionFor(p1)} {@const con1 = constructingFor(p1)} {@const prod2 = productionFor(p2)} {@const con2 = constructingFor(p2)}
{p1?.player_name ?? '…'}
Minerals {p1?.minerals ?? 0} Gas {p1?.gas ?? 0} Supply {s1.used}/{s1.max}
{#if con1.length > 0 || prod1.length > 0}
{#each con1 as bld} {@const pct = Math.round((1 - bld.remaining / bld.maxTicks) * 100)}
{bld.type}
{bld.label}
{/each} {#if con1.length > 0 && prod1.length > 0}
{/if} {#each prod1 as prod} {@const pct = Math.round((1 - prod.minRemaining / prod.maxTicks) * 100)}
{prod.type} {#if prod.count > 1}{prod.count}{/if}
{prod.label}
{/each}
{/if}
{minutes}:{seconds}
{#if con2.length > 0 || prod2.length > 0}
{#each prod2 as prod} {@const pct = Math.round((1 - prod.minRemaining / prod.maxTicks) * 100)}
{prod.type} {#if prod.count > 1}{prod.count}{/if}
{prod.label}
{/each} {#if con2.length > 0 && prod2.length > 0}
{/if} {#each con2 as bld} {@const pct = Math.round((1 - bld.remaining / bld.maxTicks) * 100)}
{bld.type}
{bld.label}
{/each}
{/if}
Minerals {p2?.minerals ?? 0} Gas {p2?.gas ?? 0} Supply {s2.used}/{s2.max}
{p2?.player_name ?? '…'}
{:else}
Minerals {p?.minerals ?? 0} Gas {p?.gas ?? 0} Supply {supply.used}/{supply.max}
{#if hasActivity}
{#each constructingBuildings as bld} {@const pct = Math.round((1 - bld.remaining / bld.maxTicks) * 100)}
{bld.type}
{bld.label}
{/each} {#if constructingBuildings.length > 0 && hasProduction}
{/if} {#each productionByType as prod} {@const pct = Math.round((1 - prod.minRemaining / prod.maxTicks) * 100)}
{prod.type} {#if prod.count > 1} {prod.count} {/if}
{prod.label}
{/each}
{/if}
{minutes}:{seconds}
{enemy?.player_name ?? '…'}
{/if}