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:
Jonathan G Rennison
2021-06-29 18:09:49 +01:00
parent f901da344e
commit 5698507d0b
7 changed files with 57 additions and 38 deletions

View File

@@ -28,7 +28,6 @@ static const StationID NEW_STATION = 0xFFFE;
static const StationID INVALID_STATION = 0xFFFF;
static const uint MAX_STATION_CARGO_HISTORY_DAYS = 24;
static const uint STATION_CARGO_HISTORY_FACTOR = 25;
typedef SmallStack<StationID, StationID, INVALID_STATION, 8, 0xFFFD> StationIDStack;