Change station cargo history storage format
Use uint16 to avoid truncation issues Don't reserve memory for unused cargoes Store history as ring buffer Update history graph immediately on storage date Show total waiting cargo
This commit is contained in:
@@ -1366,6 +1366,12 @@ struct StationViewWindow : public Window {
|
||||
SetViewportCatchmentStation(Station::Get(this->window_number), false);
|
||||
}
|
||||
|
||||
void OnInit() override
|
||||
{
|
||||
const Station *st = Station::Get(this->window_number);
|
||||
SetWidgetDisabledState(WID_SV_HISTORY, st->station_cargo_history_cargoes == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a certain cargo entry characterized by source/next/dest station, cargo ID and amount of cargo at the
|
||||
* right place in the cargo view. I.e. update as many rows as are expanded following that characterization.
|
||||
|
Reference in New Issue
Block a user