diff options
author | celestar <celestar@openttd.org> | 2008-08-18 16:52:40 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2008-08-18 16:52:40 +0000 |
commit | 23a48b2815c6cea2857cd44748f4e9eec42658c5 (patch) | |
tree | 5b0ecf13a8ec0041ff1289769acbddf67dda4426 /src/roadveh_gui.cpp | |
parent | 99efe9aaae2f7d6d39ab694e0be9981b738661ec (diff) | |
download | openttd-23a48b2815c6cea2857cd44748f4e9eec42658c5.tar.xz |
(svn r14098) -Fix: Make the 'Transfer Credit' display aware of the entire consist, not only the first vehicle
Diffstat (limited to 'src/roadveh_gui.cpp')
-rw-r--r-- | src/roadveh_gui.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp index c9190008b..7dd2239f5 100644 --- a/src/roadveh_gui.cpp +++ b/src/roadveh_gui.cpp @@ -25,6 +25,7 @@ void DrawRoadVehDetails(const Vehicle *v, int x, int y) { uint y_offset = RoadVehHasArticPart(v) ? 15 : 0; StringID str; + Money feeder_share = 0; SetDParam(0, v->engine_type); SetDParam(1, v->build_year); @@ -70,6 +71,7 @@ void DrawRoadVehDetails(const Vehicle *v, int x, int y) SetDParam(1, u->cargo.Count()); SetDParam(2, u->cargo.Source()); str = STR_8813_FROM; + feeder_share += u->cargo.FeederShare(); } DrawString(x, y + 21 + y_offset, str, TC_FROMSTRING); @@ -88,12 +90,13 @@ void DrawRoadVehDetails(const Vehicle *v, int x, int y) SetDParam(1, v->cargo.Count()); SetDParam(2, v->cargo.Source()); str = STR_8813_FROM; + feeder_share += v->cargo.FeederShare(); } DrawString(x, y + 21 + y_offset, str, TC_FROMSTRING); } /* Draw Transfer credits text */ - SetDParam(0, v->cargo.FeederShare()); + SetDParam(0, feeder_share); DrawString(x, y + 33 + y_offset, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING); } |