summaryrefslogtreecommitdiff
path: root/src/roadveh_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-06-24 13:49:13 +0000
committerrubidium <rubidium@openttd.org>2008-06-24 13:49:13 +0000
commitc3009c34eeaae84afe2967649e953ac82d9093d9 (patch)
treeafb9a0a6291ebaa41ba4578867f885f0f9fe5503 /src/roadveh_gui.cpp
parent5b973282de54ad5b1a53326d4cd5d5fc8c41a1ad (diff)
downloadopenttd-c3009c34eeaae84afe2967649e953ac82d9093d9.tar.xz
(svn r13623) -Codechange: only show the 'load' of articulated RV parts that have a capacity instead of showing 'empty' parts when a vehicle is completely full.
Diffstat (limited to 'src/roadveh_gui.cpp')
-rw-r--r--src/roadveh_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/roadveh_gui.cpp b/src/roadveh_gui.cpp
index 7796b7889..23f5989e5 100644
--- a/src/roadveh_gui.cpp
+++ b/src/roadveh_gui.cpp
@@ -23,7 +23,7 @@
void DrawRoadVehDetails(const Vehicle *v, int x, int y)
{
- uint y_offset = RoadVehHasArticPart(v) ? 15 :0;
+ uint y_offset = RoadVehHasArticPart(v) ? 15 : 0;
StringID str;
SetDParam(0, v->engine_type);
@@ -62,6 +62,8 @@ void DrawRoadVehDetails(const Vehicle *v, int x, int y)
DrawStringTruncated(x, y + 10 + y_offset, STR_JUST_STRING, TC_BLUE, 380 - x);
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
+ if (u->cargo_cap == 0) continue;
+
str = STR_8812_EMPTY;
if (!u->cargo.Empty()) {
SetDParam(0, u->cargo_type);