F6: scheda industria e schermata di connessione definitive
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
7eec322202
commit
45462bf9ec
28 files changed
+2810
-329
No files matched your search
@@ -35,6 +35,7 @@ public static class ProtocolTests
|
||||
},
|
||||
DataHash = 12345,
|
||||
Difficulty = "imprenditore",
|
||||
Server = new ServerInfo { Version = "0.6.1", Os = "Linux 6.8", Container = true, UptimeSeconds = 518_400, TickMs = 50, Sessions = 1, MaxSessions = 16, Local = false },
|
||||
};
|
||||
yield return new Reject { Code = RejectCode.BadToken, Reason = "Token errato" };
|
||||
yield return new Pong { Nonce = 7, ServerTick = 123456 };
|
||||
@@ -117,6 +118,36 @@ public static class ProtocolTests
|
||||
MaintenanceSpentYear = new Money(9999), PartsTarget = 9, PartsPerMonth = 3, PartsOrdered = 20, MachineryRequired = 6, UpgradeCost = new Money(3_000_000),
|
||||
Valuation = new Money(4_500_000), Cash = new Money(2_000_000), BreakdownChancePerYear = 0.3f,
|
||||
Stops = [new IndustryStopInfo { Day = 300, Days = 12, Kind = 1 }, new IndustryStopInfo { Day = 500, Days = 30, Kind = 3 }],
|
||||
Sheet = new IndustrySheetInfo
|
||||
{
|
||||
Level = 3, MaxLevel = 5, Efficiency = 0.6f, Limit = 3, CovInput = 0.73f, CovWorkers = 0.8f, CovStaff = 0.6f, CoverageWindowDays = 30,
|
||||
ProfitFactor = 1.05f, Depletion = 1, EventCapacity = 1, ReserveFraction = -1, StorageDays = 30,
|
||||
Inputs =
|
||||
[
|
||||
new IndustryFlowInfo
|
||||
{
|
||||
Good = 2, FullMonth = 480, CurrentMonth = 350, Stock = 105, Storage = 480, Days = 9, Limiting = true,
|
||||
Partners = [new ChainPartnerInfo { Kind = 0, Target = 1, MonthlyUnits = 500, Price = 4_200, Line = 5, DistanceKm = 9.4f }],
|
||||
},
|
||||
],
|
||||
Outputs =
|
||||
[
|
||||
new IndustryFlowInfo
|
||||
{
|
||||
Good = 4, FullMonth = 500, CurrentMonth = 300, Stock = 40, Storage = 500, Days = 46, Limiting = false,
|
||||
Partners = [new ChainPartnerInfo { Kind = 1, Target = 0, MonthlyUnits = 4000, Price = 15_600, Line = -1, DistanceKm = 4.2f }],
|
||||
},
|
||||
],
|
||||
Workers = new WorkforceInfo
|
||||
{
|
||||
Jobs = 200, Present = 160, OnSite = 60, Coverage = 0.8f, Missing = 40, Reason = 5, ReasonLine = 1, AverageMinutes = 38, SourceCount = 2,
|
||||
Sources = [new WorkforceSourceInfo { Town = 0, Headcount = 120, Coverage = 0.95f, Line = 1, Carrier = 0, Minutes = 35, Walking = false }],
|
||||
},
|
||||
Staff = new WorkforceInfo { Jobs = 20, Present = 12, Missing = 8, Reason = 4, ReasonLine = -1, AverageMinutes = -1 },
|
||||
AveragePrice = 15_600, AnnualProfit = new Money(41_000_000), LastScore = 0.62f, Shipped = 0.8f, Coverage = 0.6f, Profit = 0.55f, Score = 0.69f,
|
||||
UpgradeThreshold = 0.75f, DowngradeThreshold = 0.35f, UpgradeQuarters = 2, QuartersAbove = 1, QuarterDay = 45, QuarterDays = 90, Served = true,
|
||||
ServingStations = [2, 7], ServingLine = 1, ForSale = true, BuyUnlocked = false, BuyTier = 3, BuyProgress = 0.58f,
|
||||
},
|
||||
};
|
||||
yield return new Chronicle
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user