(svn r12661) -Add: ability to send a vehicle (using default orders) to the nearest depot.

This commit is contained in:
rubidium
2008-04-11 15:58:46 +00:00
parent 3919c30c2d
commit cebe2001ba
5 changed files with 142 additions and 41 deletions

View File

@@ -135,11 +135,22 @@ static void DrawTimetableWindow(Window *w)
case OT_GOTO_DEPOT:
if (v->type == VEH_AIRCRAFT) {
SetDParam(0, STR_GO_TO_HANGAR);
SetDParam(2, order->GetDestination());
if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
SetDParam(1, STR_GO_TO_NEAREST_DEPOT);
SetDParam(3, STR_ORDER_NEAREST_HANGAR);
} else {
SetDParam(1, STR_GO_TO_HANGAR);
SetDParam(3, order->GetDestination());
}
SetDParam(4, STR_EMPTY);
} else {
SetDParam(0, STR_GO_TO_DEPOT);
SetDParam(2, GetDepot(order->GetDestination())->town_index);
if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) {
SetDParam(1, STR_GO_TO_NEAREST_DEPOT);
SetDParam(3, STR_ORDER_NEAREST_DEPOT);
} else {
SetDParam(1, STR_GO_TO_DEPOT);
SetDParam(3, GetDepot(order->GetDestination())->town_index);
}
switch (v->type) {
case VEH_TRAIN: SetDParam(3, STR_ORDER_TRAIN_DEPOT); break;