mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-17 01:12:39 +01:00
Codechange: Extend industry cargo history to 24 years.
Monthly data is stored for the current 24 months. Quarterly data is stored for a further 2-6 years. Yearly data is stored for a further 6-24 years.
This commit is contained in:
committed by
Peter Nelson
parent
8675d7b498
commit
d09dfd843c
@@ -1711,7 +1711,7 @@ struct IndustryProductionGraphWindow : BaseCargoGraphWindow {
|
||||
transported.dash = 2;
|
||||
auto transported_filler = Filler{transported, &Industry::ProducedHistory::transported};
|
||||
|
||||
FillFromHistory<GRAPH_NUM_MONTHS>(p.history, i->valid_history, produced_filler, transported_filler);
|
||||
FillFromHistory<GRAPH_NUM_MONTHS>(p.history, i->valid_history, HISTORY_MONTH, produced_filler, transported_filler);
|
||||
}
|
||||
|
||||
for (const auto &a : i->accepted) {
|
||||
@@ -1735,9 +1735,9 @@ struct IndustryProductionGraphWindow : BaseCargoGraphWindow {
|
||||
auto waiting_filler = Filler{waiting, &Industry::AcceptedHistory::waiting};
|
||||
|
||||
if (a.history == nullptr) {
|
||||
FillFromEmpty<GRAPH_NUM_MONTHS>(i->valid_history, accepted_filler, waiting_filler);
|
||||
FillFromEmpty<GRAPH_NUM_MONTHS>(i->valid_history, HISTORY_MONTH, accepted_filler, waiting_filler);
|
||||
} else {
|
||||
FillFromHistory<GRAPH_NUM_MONTHS>(*a.history, i->valid_history, accepted_filler, waiting_filler);
|
||||
FillFromHistory<GRAPH_NUM_MONTHS>(*a.history, i->valid_history, HISTORY_MONTH, accepted_filler, waiting_filler);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user