summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-12-11 17:44:55 +0000
committerglx <glx@openttd.org>2007-12-11 17:44:55 +0000
commit946fa3b9ee0f8747d9ada619f3c87b1860dd7ff3 (patch)
tree9e4371e18fc5fde0bd00876c036c6fefbe55eff1 /src/order_gui.cpp
parentfd23999fb90fa61ba4242c4adcfb469205b070ea (diff)
downloadopenttd-946fa3b9ee0f8747d9ada619f3c87b1860dd7ff3.tar.xz
(svn r11618) -Fix: buoys are just waypoints, so don't allow load/unload/transfert for them
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 8c3ff29b4..356782a39 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -152,7 +152,15 @@ static void DrawOrdersWindow(Window *w)
if (order != NULL) {
switch (order->type) {
- case OT_GOTO_STATION: break;
+ case OT_GOTO_STATION:
+ if (!GetStation(order->dest)->IsBuoy()) break;
+ /* Fall-through */
+
+ case OT_GOTO_WAYPOINT:
+ w->DisableWidget(ORDER_WIDGET_FULL_LOAD);
+ w->DisableWidget(ORDER_WIDGET_UNLOAD);
+ w->DisableWidget(ORDER_WIDGET_TRANSFER);
+ break;
case OT_GOTO_DEPOT:
w->DisableWidget(ORDER_WIDGET_TRANSFER);
@@ -163,12 +171,6 @@ static void DrawOrdersWindow(Window *w)
SetDParam(2,STR_SERVICE);
break;
- case OT_GOTO_WAYPOINT:
- w->DisableWidget(ORDER_WIDGET_FULL_LOAD);
- w->DisableWidget(ORDER_WIDGET_UNLOAD);
- w->DisableWidget(ORDER_WIDGET_TRANSFER);
- break;
-
default: // every other orders
w->DisableWidget(ORDER_WIDGET_NON_STOP);
w->DisableWidget(ORDER_WIDGET_FULL_LOAD);