This UI component displays the placement outlook for a match, showing current VP, coins, income estimates, and game status. It uses localization and UI text utilities to render information for the viewer and all other players.
@namespace CitySim
@using CitySim.DesignSystem
@using CitySim.Match
@using CitySim.Cards
@using CitySim.Punchboard
@inherits Sandbox.UI.Panel
<root>
@if(Outlook is { } outlook) {
<PlotterSurface><ChildContent>
<div class="outlook-title">@(GameText.Plain(Card?.Name))</div>
<div class="outlook-gain">@(GameText.Get("ui.placement_outlook_view.gain_vp_now", outlook.Awards.Where(a=>a.Player==Viewer).Sum(a=>a.Vp)))</div>
@if(outlook.Awards.Where(a=>a.Player==Viewer).Sum(a=>a.Coins) is var coins && coins!=0) {<div>@(GameText.Get("ui.placement_outlook_view.gain_coins_now", coins))</div> }
@foreach(var award in outlook.Awards.Where(a=>a.Player!=Viewer && a.Vp!=0).GroupBy(a=>a.Player)) {
<div class="outlook-rival">@(GameText.Get("ui.placement_outlook_view.vp_now", Match.Players[award.Key].Name, award.Sum(a=>a.Vp)))</div>
}
@if(outlook.NextIncome!=0 || outlook.RemainingIncome!=0 || Card?.Effects.Any(e=>e.Hook==EffectHook.Payout)==true) {
<div>@(GameText.Get("ui.placement_outlook_view.your_income_coins_next_payout", outlook.NextIncome))</div>
<div>@(GameText.Get("ui.placement_outlook_view.coins_over_payouts_left", outlook.RemainingIncome, outlook.PayoutsLeft))</div>
<div class="outlook-note">@(GameText.Get("ui.placement_outlook_view.income_estimate_uses_current_buildings"))</div>
}
@if(outlook.EndVp!=0) { <div>@(GameText.Get("ui.placement_outlook_view.end_game_card_bonuses_vp", outlook.EndVp))</div> }
</ChildContent></PlotterSurface>
}
</root>
@code {
[Parameter] public PlacementOutlook Outlook {get;set;}
[Parameter] public CardDef Card {get;set;}
[Parameter] public MatchState Match {get;set;}
[Parameter] public Guid Viewer {get;set;}
}