diff options
author | rubidium <rubidium@openttd.org> | 2013-02-17 14:59:27 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-02-17 14:59:27 +0000 |
commit | 4367224b35d849ebe0079e7aea0b3939399f5ffd (patch) | |
tree | b428bf54d643a37f238705390c72786ca9f91718 /src/station_gui.cpp | |
parent | cdb0a7695820ac088df6736cb59ac9989f945c8e (diff) | |
download | openttd-4367224b35d849ebe0079e7aea0b3939399f5ffd.tar.xz |
(svn r25013) -Feature: show the amount of cargo that has already been reserved by full loading vehicles in the station (fonsinchen)
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index b0709e2c2..b25568866 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -938,7 +938,7 @@ struct StationViewWindow : public Window { this->cargo_rows[i] = 0; } else { /* Add an entry for total amount of cargo of this type waiting. */ - cargolist->push_back(CargoData(i, INVALID_STATION, st->goods[i].cargo.Count())); + cargolist->push_back(CargoData(i, INVALID_STATION, st->goods[i].cargo.TotalCount())); /* Set the row for this cargo entry for the expand/hide button */ this->cargo_rows[i] = (uint16)cargolist->size(); @@ -969,6 +969,12 @@ struct StationViewWindow : public Window { if (!added) cargolist->push_back(CargoData(i, cp->SourceStation(), cp->Count())); } } + if (st->goods[i].cargo.ReservedCount() > 0) { + SetBit(*transfers, i); + if (HasBit(this->cargo, i)) { + cargolist->push_back(CargoData(i, NEW_STATION, st->goods[i].cargo.ReservedCount())); + } + } } } } @@ -1019,6 +1025,10 @@ struct StationViewWindow : public Window { } else { DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_STATION_VIEW_WAITING_CARGO, TC_FROMSTRING, SA_RIGHT); } + } else if (cd->source == NEW_STATION) { + SetDParam(0, cd->cargo); + SetDParam(1, cd->count); + DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_STATION_VIEW_RESERVED, TC_FROMSTRING, SA_RIGHT); } else { SetDParam(0, cd->cargo); SetDParam(1, cd->count); |