summaryrefslogtreecommitdiff
path: root/src/ship_gui.cpp
diff options
context:
space:
mode:
authorrichk <richk@openttd.org>2007-03-02 18:49:11 +0000
committerrichk <richk@openttd.org>2007-03-02 18:49:11 +0000
commitcd7b71092b8c7668684cbd380168ead74516d3eb (patch)
tree1dca484c3713d4e52180c82b4ffc306b7e222e87 /src/ship_gui.cpp
parent27fc1300e21c511d674469850ba9ed989709b8aa (diff)
downloadopenttd-cd7b71092b8c7668684cbd380168ead74516d3eb.tar.xz
(svn r8978) -Feature: Rewrite of transfer system.
This major feature-fix keeps track of the value of transfers offloaded at a station, and hands on to a loading vehicle a credit note proportionate to the cargo loaded. The transferring vehicle is paid only for the distance it has travelled. eg. B-C in a transfer chain A-B-C-D. When the final cargo is delivered, these credit notes are cashed, and the final vehicle is paid for A-D minus any credit notes it is carrying. The company bank balance increases by the value of the A-D route. You still need to set up a profitable route; it is still easy to make a loss on transfers by bad planning. :)
Diffstat (limited to 'src/ship_gui.cpp')
-rw-r--r--src/ship_gui.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp
index 0215ec327..6d656630f 100644
--- a/src/ship_gui.cpp
+++ b/src/ship_gui.cpp
@@ -76,7 +76,7 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e)
{
SetDParam(0, v->service_interval);
SetDParam(1, v->date_of_last_service);
- DrawString(13, 90, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
+ DrawString(13, 102, _patches.servint_ispercent?STR_SERVICING_INTERVAL_PERCENT:STR_883C_SERVICING_INTERVAL_DAYS, 0);
}
DrawShipImage(v, 3, 57, INVALID_VEHICLE);
@@ -98,6 +98,11 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e)
str = STR_8813_FROM;
}
DrawString(74, 78, str, 0);
+
+ /* Draw Transfer credits text */
+ SetDParam(0, v->cargo_feeder_share);
+ DrawString(74, 89, STR_FEEDER_CARGO_VALUE, 0);
+
} break;
case WE_CLICK: {
@@ -141,15 +146,15 @@ static const Widget _ship_details_widgets[] = {
{ WWT_CAPTION, RESIZE_NONE, 14, 11, 364, 0, 13, STR_9811_DETAILS, STR_018C_WINDOW_TITLE_DRAG_THIS},
{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 365, 404, 0, 13, STR_01AA_NAME, STR_982F_NAME_SHIP},
{ WWT_PANEL, RESIZE_NONE, 14, 0, 404, 14, 55, 0x0, STR_NULL},
-{ WWT_PANEL, RESIZE_NONE, 14, 0, 404, 56, 88, 0x0, STR_NULL},
-{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 89, 94, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL},
-{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 95, 100, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL},
-{ WWT_PANEL, RESIZE_NONE, 14, 11, 404, 89, 100, 0x0, STR_NULL},
+{ WWT_PANEL, RESIZE_NONE, 14, 0, 404, 56, 100, 0x0, STR_NULL},
+{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 101, 106, STR_0188, STR_884D_INCREASE_SERVICING_INTERVAL},
+{ WWT_PUSHTXTBTN, RESIZE_NONE, 14, 0, 10, 107, 112, STR_0189, STR_884E_DECREASE_SERVICING_INTERVAL},
+{ WWT_PANEL, RESIZE_NONE, 14, 11, 404, 101, 112, 0x0, STR_NULL},
{ WIDGETS_END},
};
static const WindowDesc _ship_details_desc = {
- WDP_AUTO, WDP_AUTO, 405, 101,
+ WDP_AUTO, WDP_AUTO, 405, 113,
WC_VEHICLE_DETAILS,WC_VEHICLE_VIEW,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS,
_ship_details_widgets,