From 45462bf9ecc879c24106ff2163f7c31a8b701467 Mon Sep 17 00:00:00 2001 From: Alberto Balbo Date: Sun, 8 Nov 2026 14:04:28 +0100 Subject: [PATCH] F6: scheda industria e schermata di connessione definitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La scheda dell'industria e la schermata di connessione si allineano alle immagini di riferimento 07 e 09. I dati che mancavano li calcola il Core con una funzione pura, e viaggiano in blocchi compatibili del protocollo. Il formato dei salvataggi non cambia (ADR 0021). - IndustryOutlook calcola la scheda in sola lettura: - fattori dell'efficienza e quello che la limita; - ingressi e uscite al mese, con giorni di scorta o di magazzino; - fornitori e clienti con prezzo, distanza e linea che li collega; - forza lavoro dai contratti dei pendolari; - punteggio di crescita del trimestre con le soglie; - prezzo medio, utile annuo, stazioni che la servono, sblocco dell'acquisto. IndustryMath.GrowthScore è ora l'unica formula del punteggio e la usa anche IndustrySystem: gli hash non cambiano. Nuovi parametri in balance.json, industry.outlook. - Protocollo: - IndustryCard: blocco 1 IndustrySheetInfo; - Welcome: blocco 1 ServerInfo (versione, sistema, Docker, tempo di attività, passo del ciclo, client collegati); - ClientWorld conserva lo stato del server e l'elenco dei salvataggi. - Client: - IndustryPanel a tutto schermo, con tre schede, il grafo della catena, impianti e crescita, e i comandi del proprietario; - ConnectScreen sostituisce MenuScreen: server locale o in rete, stato del server, partite salvate, «Connetti e riprendi» e «Nuova partita sul server» su una sessione di prova; - testi in strings.csv; - pilota automatico: schermate 19_scheda_industria e 20_connessione. - Test: - IndustryOutlookTests; - scheda e stato del server via WebSocket; - campioni del protocollo con i blocchi nuovi. 200 test, 181 senza i lenti. Refs #42. Co-Authored-By: Claude Opus 5.5 --- .../assets/i18n/strings.csv | 105 +++ .../scripts/App/AutoPilot.cs | 23 + client/RailEnterprise.Client/scripts/Main.cs | 59 +- .../scripts/Panels/IndustryPanel.cs | 625 +++++++++++++----- .../scripts/Panels/IndustryWidgets.cs | 185 ++++++ .../scripts/Screens/ConnectScreen.cs | 611 +++++++++++++++-- .../scripts/Screens/GameScreen.cs | 29 +- .../scripts/Screens/MenuScreen.cs | 56 -- .../scripts/Screens/MenuScreen.cs.uid | 1 - data/balance.json | 3 +- docs/ARCHITECTURE.md | 6 +- docs/PROTOCOL.md | 16 +- docs/STATE.md | 37 +- .../0021-scheda-industria-e-connessione.md | 103 +++ src/RailEnterprise.Core/Data/BalanceDefs.cs | 11 + src/RailEnterprise.Core/Data/DataValidator.cs | 2 + .../Economy/IndustryOutlook.cs | 515 +++++++++++++++ .../Simulation/Systems/IndustryMath.cs | 17 + .../Simulation/Systems/IndustrySystem.cs | 5 +- .../Client/ClientWorld.cs | 11 + .../Messages/CorporateMessages.cs | 16 +- .../Messages/IndustryMessages.cs | 269 ++++++++ .../Messages/ServerMessages.cs | 15 +- src/RailEnterprise.Server/GameHost.cs | 17 +- src/RailEnterprise.Server/Projection.cs | 43 +- .../Economy/IndustryOutlookTests.cs | 279 ++++++++ .../Protocol/ProtocolTests.cs | 31 + .../Server/ServerTests.cs | 49 ++ 28 files changed, 2810 insertions(+), 329 deletions(-) create mode 100644 client/RailEnterprise.Client/scripts/Panels/IndustryWidgets.cs delete mode 100644 client/RailEnterprise.Client/scripts/Screens/MenuScreen.cs delete mode 100644 client/RailEnterprise.Client/scripts/Screens/MenuScreen.cs.uid create mode 100644 docs/adr/0021-scheda-industria-e-connessione.md create mode 100644 src/RailEnterprise.Core/Economy/IndustryOutlook.cs create mode 100644 src/RailEnterprise.Protocol/Messages/IndustryMessages.cs create mode 100644 tests/RailEnterprise.Tests/Economy/IndustryOutlookTests.cs diff --git a/client/RailEnterprise.Client/assets/i18n/strings.csv b/client/RailEnterprise.Client/assets/i18n/strings.csv index dd4319d..c910eb2 100644 --- a/client/RailEnterprise.Client/assets/i18n/strings.csv +++ b/client/RailEnterprise.Client/assets/i18n/strings.csv @@ -1,9 +1,13 @@ keys,it,en +a piena capacità,,at full capacity Abitanti,,Population Accetta,,Accept Acquista,,Buy Aderisci con le tue azioni,,Tender your shares +adesso,,just now Aggiorna,,Refresh +al giorno,,per day +al lavoro ora,,at work now Alto,,High Ambra,,Amber Amministrazione controllata,,Receivership @@ -20,23 +24,29 @@ Assegna,,Assign Asta degli attivi,,Asset auction Attendi il pieno alla prima fermata (max 2 giorni),,Wait for full load at the first stop (max 2 days) Attiva,,Active +Attivo da,,Up for +automatico,,automatic Avvio del server locale…,,Starting the local server… Azioni proprie (non votano),,Treasury shares (no vote) Base,,Base Base d'asta,,Reserve price +bastano per,,enough for Binari,,Track Binari di stazione,,Platforms Blu,,Blue Budget di manutenzione,,Maintenance budget C'è già un'offerta in corso su questa compagnia: la trovi nell'elenco a sinistra.,,There is already a bid on this company: see the list on the left. Cantiere,,Construction +Capacità ridotta da un evento,,Capacity reduced by an event Capitalizz.,,Market cap Capitalizzazione,,Market cap +Caricamento di,,Loading Carico,,Load Cartella di manutenzione,,Maintenance record Cartella in arrivo dal server…,,Record on its way from the server… Cassa,,Cash Cassa dell'industria,,Industry cash +Catena produttiva,,Production chain Cavaliere bianco,,White knight Celeste,,Light blue "Chi offre di più alla chiusura compra treni, binari, stazioni e industrie della compagnia fallita.",,"The highest bidder at closing buys the bankrupt company's trains, track, stations and industries." @@ -334,11 +344,21 @@ capacità mancante da,,capacity short for carica,,load cavaliere bianco,,white knight città senza servizi per il personale,,towns without services for staff +Client collegati,,Connected clients +Collegato a,,Connected to +Collo di bottiglia,,Bottleneck +Condizione degli impianti,,Plant condition +Connetti a un server,,Connect to a server +Connetti e riprendi,,Connect and resume consumo,,use controlla la compagnia,,controls the company controllata da,,controlled by copertura,,coverage +Copertura degli ingressi,,Input coverage +Crea una linea verso questa industria,,Build a line to this industry +Creazione della nuova partita sul server…,,Creating the new game on the server… da,,from +dati compatibili,,compatible data degli utili come dividendo e non puoi chiedere prestiti.,,of profits as dividends and cannot take new loans. dei ricavi,,of revenue del capitale,,of the capital @@ -346,28 +366,44 @@ del capitale per ordine.,,of the capital per order. della cassa (il titolo sale); cavaliere bianco: un'alleata compra il flottante al prezzo dell'offerta più il,,of cash (the share price rises); white knight: an ally buys the free float at the bid price plus delle azioni entro il,,of the shares by di,,of +Disponibile al livello,,Available at level dividendo straordinario,,extra dividend +Dove gira il motore di gioco?,,Where does the game engine run? durata,,duration +e altre,,and e il,,and e personale sufficiente,,and enough staff +Fai un'offerta di acquisto,,Make a purchase offer fallita,,bankrupt "fallita, attivi all'asta",,"bankrupt, assets at auction" +Fattore di redditività,,Profitability factor ferma,,stopped ferma fino al,,stopped until fermo in linea,,stranded on the line fermo in salita,,stalled on grade +Forza lavoro,,Workforce g,,d +Giacimento residuo,,Remaining reserve +Gioca in locale,,Play locally giorni,,days giorni di fermo,,days of shutdown +giorni di produzione,,days of production giorni e liquida le minoranze al prezzo di mercato.,,days and buys out the minorities at market price. giorni e offre un premio tra il,,days and offers a premium between +giorni fa,,days ago giorno,,day gli impianti rendono pieno; sotto calano fino a,,plants run at full output; below they drop to guasto,,broken down guasto lieve,,minor failure hub mercato mondiale,,world market hub +i lavoratori,,workers il fondatore ha,,the founder holds +"Il mondo vive sempre in un server: sul tuo computer, avviato insieme al gioco, oppure in rete, dove la partita continua anche a gioco chiuso.",,"The world always lives in a server: on your computer, started together with the game, or on the network, where the game goes on even when the client is closed." +il personale qualificato,,skilled staff +Il server ha chiuso la connessione,,The server closed the connection +Il server non ha risposto,,The server did not respond impegnato,,committed +Impianti e crescita,,Plant and growth in arrivo,,arriving in attesa,,waiting in attesa di via libera,,waiting for clearance @@ -378,19 +414,33 @@ in officina,,in the workshop in scorta,,in stock in servizio,,in service in stazione,,at station +inattiva,,inactive incasso stimato,,estimated proceeds intervento prenotato,,intervention booked +L'industria è tua: gli utili entrano nel conto economico della compagnia.,,The industry is yours: its profits go into the company's income statement. la fusione è possibile dopo,,the merger is possible after la tua compagnia,,your company large,Grande,Large +Latenza,,Latency lavoratori,,workers lavori,,jobs le città raggiungibili non hanno lavoratori liberi,,reachable towns have no free workers +limitata da un evento,,limited by an event +limitata dagli impianti,,limited by the plant +limitata dai lavoratori,,limited by workers +limitata dal giacimento,,limited by the reserve +limitata dal personale,,limited by staff +limitata dalla redditività,,limited by profitability +limitata dalle materie prime,,limited by raw materials linea,,line livello,,level +Livello massimo raggiunto,,Maximum level reached +locale,,local macchinari,,machinery macchinari per il prossimo lavoro,,machinery for the next job macchinari per livello,,machinery per level +Mancano,,Missing +Mappa,,Map medium,Medio,Medium mesi,,months mila km,,thousand km @@ -498,22 +548,56 @@ in 30 giorni,,in 30 days lug,,Jul mag,,May mar,,Mar +Materie prime in ingresso,,Incoming raw materials mese,,month mesi e previsione a,,months and forecast for +minuti fa,,minutes ago +Moltiplicatore di resa,,Output multiplier "nei magazzini delle industrie e nelle stazioni, divise per la domanda mensile della mappa",,"in industry storage and at stations, divided by the map's monthly demand" +Nessun cliente nella regione,,No customer in the region +Nessun posto per i lavoratori,,No jobs for workers +Nessun posto per il personale,,No jobs for staff +Nessun vettore la serve: il livello resta fermo finché una linea non la collega.,,No carrier serves it: the level stays put until a line connects it. +Nessuna produzione,,No production +nessuna stazione la serve,,no station serves it nessuna tua stazione servita da una linea con treni ha questa destinazione nel bacino,,none of your stations served by a line with trains has this destination in its catchment +non collegata,,not connected non collegato,,not connected +Non collegato,,Not connected nov,,Nov +Nuova partita sul server,,New game on the server oggi,,today +ore fa,,hours ago ott,,Oct +Partita in corso,,Current game +perde un livello,,it loses a level +Personale qualificato,,Skilled staff +persone: portale in treno dalle città vicine.,,people: bring them by train from nearby towns. +presenti,,present prev.,,fcst. prezzo mondiale in calo,,world price falling prezzo mondiale in rialzo,,world price rising +Produzione,,Production +proprietari privati,,private owners +provenienze,,more origins +Punteggio di crescita,,Growth score quota mondiale dagli hub,,world share through the hubs +recupero,,recovery rispetto al ciclo per circa,,compared with the cycle for about +Scegli un'industria nell'elenco in alto.,,Choose an industry from the list above. +Scheda dell'industria,,Industry sheet +scorta,,stock serve,,needs +Server locale spento: scegli «Gioca in locale» per avviarlo,,Local server off: choose «Play locally» to start it +"Server su questo computer, avviato e chiuso con il gioco. Le partite restano qui.",,"Server on this computer, started and stopped with the game. Games stay here." +servita dalla stazione,,served by station servita dalla tua linea,,served by your line set,,Sep +Sistema,,System +sopra,,above +sotto,,below +spedito,,shipped +tick al secondo,,ticks per second unità/mese,,units/month è più alto del,,is higher by è più basso del,,is lower by @@ -561,6 +645,8 @@ Scalate ai concorrenti,,Takeovers of rivals Concessioni,,Concessions fondata nel,,founded in con,,with +magazzino,,storage +Partite salvate sul server,,Games saved on the server verso,,towards raggiunta nel,,reached in raggiunta,,reached @@ -576,14 +662,20 @@ Patrimonio netto di,,Net worth of città oltre,,towns over collegata su,,connected out of collegate su,,connected out of +merci su linea,,goods on a line +Prezzo medio realizzato,,Average realised price Rating creditizio,,Credit rating attuale,,current Binari e opere,,Track and structures Stazioni e depositi,,Stations and depots Materiale rotabile,,Rolling stock Industrie possedute,,Owned industries +magazzino pieno,,storage full Merce propria,,Own goods +Nessun fornitore nella regione,,No supplier in the region +"Non consuma materie prime: estrae, coltiva o raccoglie da sé.",,"It consumes no raw materials: it mines, farms or gathers on its own." Partecipazioni,,Shareholdings +"Server dedicato in rete, per esempio in Docker su un NAS. Più giocatori, partita sempre accesa.",,"Dedicated server on the network, for example in Docker on a NAS. Several players, the game is always on." Totale attivo,,Total assets Prestiti al,,Loans at Prestiti,,Loans @@ -611,6 +703,9 @@ Bancarotta dichiarata,,Bankruptcy declared La compagnia non ha riportato la cassa sopra zero entro il limite della difficoltà.,,The company did not bring its cash back above zero within the difficulty limit. in corso,,in progress finora,,so far +utile,,profit +Utile annuo stimato,,Estimated annual profit +Valore stimato,,Estimated value Voce,,Item Utile operativo,,Operating profit Flusso di cassa,,Cash flow @@ -633,6 +728,8 @@ Magazzini,,Storage Penali,,Penalties Costruzioni,,Construction Acquisto di treni,,Train purchases +ultimo trimestre,,last quarter +usura,,wear Vendita di treni,,Train sales Prestiti ricevuti,,Loans received Prestiti rimborsati,,Loans repaid @@ -660,6 +757,8 @@ Residuo,,Outstanding fisso,,fixed Rata mensile,,Monthly payment interessi,,interest +pieno tra,,full in +Ricorda questo server,,Remember this server scadenza,,maturity Estingui,,Pay off La cassa è tornata positiva,,Cash is back above zero @@ -670,6 +769,8 @@ Cassa negativa da {0}: bancarotta tra {1},,Cash negative for {0}: bankruptcy in neutro,,neutral "Il margine conta da quando ci sono almeno {0} mesi chiusi con ricavi (ora {1}): fino ad allora vale 0, così i primi incassi non fanno crollare il rating.",,"The margin counts once there are at least {0} closed months with revenue (now {1}): until then it is 0, so the first takings do not sink the rating." "Il punteggio {0} vale già {1}: il rating si aggiorna al prossimo calcolo mensile, a inizio mese.",,"The score {0} is already worth {1}: the rating is updated at the next monthly calculation, at the start of the month." +Simulazione,,Simulation +trimestri sale,,quarters it rises un margine di almeno {0},,a margin of at least {0} una leva non oltre {0},,leverage no higher than {0} una leva non oltre {0} (rimborsando {1}),,leverage no higher than {0} (by repaying {1}) @@ -677,3 +778,7 @@ una leva non oltre {0} (rimborsando {1}),,leverage no higher than {0} (by repayi Per il gradino {0} serve un punteggio di {1}: {2}.,,To reach {0} you need a score of {1}: {2}. In bancarotta non si possono chiedere prestiti,,Loans cannot be requested while bankrupt Fido disponibile {0} su {1}. Tasso di un nuovo prestito: {2} fisso (base {3} + rating {4} {5}) per {6} anni.,,Available credit {0} of {1}. Rate of a new loan: {2} fixed (base {3} + rating {4} {5}) for {6} years. +Verifica connessione,,Test connection +Versione,,Version +Versione del gioco,,Game version +viaggio medio,,average trip diff --git a/client/RailEnterprise.Client/scripts/App/AutoPilot.cs b/client/RailEnterprise.Client/scripts/App/AutoPilot.cs index 7394a92..412f6a6 100644 --- a/client/RailEnterprise.Client/scripts/App/AutoPilot.cs +++ b/client/RailEnterprise.Client/scripts/App/AutoPilot.cs @@ -254,5 +254,28 @@ public partial class AutoPilot : Node _game.OpenChronicle(); await Until(() => _game.ChronicleVisible, "cronaca", 30); await Shot("15_cronaca", 30); + _game.CloseChronicle(); + + // F6, scheda dell'industria (immagine 07): un'industria di trasformazione vicino alla linea, + // con catena produttiva, forza lavoro e crescita + var processing = World.Industries.Values + .Where(i => !i.Closed && i.Level > 0 && World.Data.Industries.FirstOrDefault(d => d.Id == i.Type)?.Recipe.Inputs.Count > 0) + .OrderBy(i => MapScale.V(i.Position).DistanceTo(anchor)).ThenBy(i => i.Id).FirstOrDefault() ?? industry; + _game.OpenIndustry(processing.Id); + await Until(() => World.IndustryCards.TryGetValue(processing.Id, out var c) && c.Sheet is not null, "scheda completa dell'industria", 30); + _game.ScrollPanel(0); + await Shot("19_scheda_industria", 40); + + // F6, schermata di connessione (immagine 09) sopra la partita: sessione di prova sul server + // locale con il suo stato e l'elenco dei salvataggi (uno appena fatto) + Session.Send(new Save { Name = "Collaudo" }); + var launcher = Session.LocalServer ?? throw new InvalidOperationException("collaudo senza server locale"); + var connect = new ConnectScreen(World.Data, remember: false); + _game.AddChild(connect); + await Frame(); + await connect.ProbeRemote(new Uri($"ws://127.0.0.1:{launcher.Port}/ws"), launcher.Token); + await Until(() => connect.Loaded, "stato del server e salvataggi", 30); + await Shot("20_connessione", 30); + connect.QueueFree(); } } diff --git a/client/RailEnterprise.Client/scripts/Main.cs b/client/RailEnterprise.Client/scripts/Main.cs index 2c2d1aa..5360af3 100644 --- a/client/RailEnterprise.Client/scripts/Main.cs +++ b/client/RailEnterprise.Client/scripts/Main.cs @@ -8,7 +8,7 @@ using static RailEnterprise.Client.App.Localization; namespace RailEnterprise.Client; /// -/// Nodo radice: tema e traduzioni, dati del gioco, passaggio tra menu, collegamento e partita; +/// Nodo radice: tema e traduzioni, dati del gioco, passaggio tra schermata di connessione e partita; /// alla chiusura termina la sessione e l'eventuale server locale. /// public partial class Main : Node @@ -56,12 +56,20 @@ public partial class Main : Node AddChild(screen); } + /// Schermata iniziale e di connessione (immagine 09): server locale o in rete, stato, salvataggi. private void ShowMenu(string status = "") { - var menu = new MenuScreen(); - menu.LocalGame += StartLocal; - menu.ConnectToServer += ShowConnect; - menu.LanguageChanged += code => + if (_data is null) + { + // senza dati non si può aprire nessuna sessione: resta solo il messaggio + var label = UiTheme.Text(status, 16, Palette.Danger); + label.SetAnchorsAndOffsetsPreset(Control.LayoutPreset.Center); + Swap(label); + return; + } + var screen = new ConnectScreen(_data); + screen.PlayRequested += ShowGame; + screen.LanguageChanged += code => { var cfg = new ConfigFile(); cfg.Load(SettingsPath); @@ -70,32 +78,11 @@ public partial class Main : Node TranslationServer.SetLocale(code); ShowMenu(); }; - Swap(menu); - if (status.Length > 0) menu.SetStatus(status); - } - - private void ShowConnect() - { - var screen = new ConnectScreen(); - screen.Back += () => ShowMenu(); - screen.ConnectRequested += async (uri, token, label) => - { - if (_data is null) return; - screen.SetStatus(T("Collegamento in corso…"), busy: true); - try - { - using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(10)); - var session = await GameSession.ConnectAsync(_data, uri, token, label, cts.Token); - ShowGame(session); - } - catch (Exception e) - { - screen.SetStatus($"{T("Collegamento non riuscito")}: {e.Message}", busy: false); - } - }; Swap(screen); + if (status.Length > 0) screen.SetStatus(status, error: true); } + /// Collaudo: server locale da zero e subito in partita, senza la schermata di connessione. private async void StartLocal() { if (_data is null) return; @@ -105,13 +92,11 @@ public partial class Main : Node ShowMenu(T("Server locale non trovato: compila src/RailEnterprise.Server o imposta RE_SERVER_PATH.")); return; } - if (_screen is MenuScreen menu) menu.SetStatus(T("Avvio del server locale…")); var launcher = new LocalServerLauncher(); try { - string dataDir = ProjectSettings.GlobalizePath(_autopilot is null ? "user://server" : "user://autopilot-server"); - // il collaudo parte sempre da una partita nuova - if (_autopilot is not null && Directory.Exists(dataDir)) Directory.Delete(dataDir, true); + string dataDir = ProjectSettings.GlobalizePath("user://autopilot-server"); + if (Directory.Exists(dataDir)) Directory.Delete(dataDir, true); int port = await launcher.StartAsync(server, dataDir, TimeSpan.FromSeconds(60)); var session = await GameSession.ConnectAsync(_data, new Uri($"ws://127.0.0.1:{port}/ws"), launcher.Token, T("Partita locale")); session.LocalServer = launcher; @@ -141,10 +126,10 @@ public partial class Main : Node public override void _Notification(int what) { - if (what == NotificationWMCloseRequest && _session is not null) - { - _session.DisposeAsync().AsTask().Wait(TimeSpan.FromSeconds(3)); - _session = null; - } + if (what != NotificationWMCloseRequest) return; + // anche la sessione di prova della schermata di connessione chiude il suo server locale + var session = _session ?? (_screen as ConnectScreen)?.TakeSession(); + _session = null; + session?.DisposeAsync().AsTask().Wait(TimeSpan.FromSeconds(3)); } } diff --git a/client/RailEnterprise.Client/scripts/Panels/IndustryPanel.cs b/client/RailEnterprise.Client/scripts/Panels/IndustryPanel.cs index e0b4914..1aa43b0 100644 --- a/client/RailEnterprise.Client/scripts/Panels/IndustryPanel.cs +++ b/client/RailEnterprise.Client/scripts/Panels/IndustryPanel.cs @@ -11,20 +11,35 @@ using static RailEnterprise.Client.App.Localization; namespace RailEnterprise.Client.Panels; /// -/// Industrie (sezione 11): elenco delle industrie della regione e pannello del proprietario -/// dell'industria scelta: condizione degli impianti con il moltiplicatore di efficienza, budget di -/// manutenzione, scorta di ricambi e macchinari, storico dei fermi, «Fermo programmato», -/// «Ammoderna», «Ordina ricambi»; per le industrie dei privati il prezzo chiesto e «Acquista». -/// La scheda del proprietario arriva su richiesta dal server (IndustryCard). +/// Scheda dell'industria a tutto schermo (immagine di riferimento 07, sezione 11): in alto nome, +/// livello, proprietà, stazione che la serve, valore stimato e l'anello dell'efficienza con il +/// fattore che la limita; sotto tre schede (materie prime in ingresso, forza lavoro, produzione), il +/// grafo della catena produttiva con fornitori, città dei pendolari e clienti, e la scheda «Impianti +/// e crescita» con condizione, punteggio trimestrale e soglie, comandi del proprietario e storico dei +/// fermi. Tutti i numeri arrivano dal server nella scheda (IndustryCard, blocco 1: ADR 0021); il +/// pannello li chiede una volta al secondo e li mostra com'è. /// public partial class IndustryPanel : VBoxContainer { private readonly GameSession _session; - private readonly ItemList _list = new() { CustomMinimumSize = new Vector2(0, 150) }; + private readonly OptionButton _chooser = new() { CustomMinimumSize = new Vector2(320, 44), FitToLongestItem = false }; private readonly List _ids = []; - private readonly VBoxContainer _header = PanelKit.Column(8); + private readonly Label _title = UiTheme.TitleLabel("", 44); + private readonly Label _subtitle = UiTheme.Text("", 15, Palette.TextSecondary); + private readonly Label _ownerLine = UiTheme.Text("", 14, Palette.TextSecondary); + private readonly Label _valuation = UiTheme.Text("", 26, Palette.AmberLight, bold: true); + private readonly EfficiencyRing _ring = new(); + private readonly Label _limit = UiTheme.Text("", 13, Palette.TextSecondary); + private readonly VBoxContainer _notices = PanelKit.Column(6); + private readonly ScrollContainer _scroll = new() { HorizontalScrollMode = ScrollContainer.ScrollMode.Disabled, SizeFlagsVertical = SizeFlags.ExpandFill }; + private readonly VBoxContainer _inputs = PanelKit.Column(8); + private readonly VBoxContainer _workforce = PanelKit.Column(8); + private readonly VBoxContainer _production = PanelKit.Column(8); + private readonly ChainGraph _graph = new(); + private readonly VBoxContainer _chainFooter = PanelKit.Column(8); + private readonly VBoxContainer _plants = PanelKit.Column(8); private readonly VBoxContainer _controls = PanelKit.Column(8); - private readonly VBoxContainer _details = PanelKit.Column(6); + private readonly VBoxContainer _history = PanelKit.Column(4); private readonly Label _status = UiTheme.Text("", 13, Palette.TextSecondary); private readonly List