(svn r11618) -Fix: buoys are just waypoints, so don't allow load/unload/transfert for them

This commit is contained in:
glx
2007-12-11 17:44:55 +00:00
parent 6f73382317
commit fb1d768924
3 changed files with 20 additions and 8 deletions

View File

@@ -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);