mirror of https://github.com/OpenTTD/OpenTTD.git
(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.
This commit is contained in:
parent
5b973282de
commit
c3009c34ee
|
@ -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);
|
DrawStringTruncated(x, y + 10 + y_offset, STR_JUST_STRING, TC_BLUE, 380 - x);
|
||||||
|
|
||||||
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
|
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
|
||||||
|
if (u->cargo_cap == 0) continue;
|
||||||
|
|
||||||
str = STR_8812_EMPTY;
|
str = STR_8812_EMPTY;
|
||||||
if (!u->cargo.Empty()) {
|
if (!u->cargo.Empty()) {
|
||||||
SetDParam(0, u->cargo_type);
|
SetDParam(0, u->cargo_type);
|
||||||
|
|
|
@ -1309,7 +1309,7 @@ struct VehicleDetailsWindow : Window {
|
||||||
|
|
||||||
/* Add space for the cargo amount for each part. */
|
/* Add space for the cargo amount for each part. */
|
||||||
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
|
for (const Vehicle *u = v; u != NULL; u = u->Next()) {
|
||||||
height_extension += 11;
|
if (u->cargo_cap != 0) height_extension += 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResizeWindow(this, 0, height_extension);
|
ResizeWindow(this, 0, height_extension);
|
||||||
|
|
Loading…
Reference in New Issue