From 7182b2508d4a43da8ab51e3c3cab7f03b08a11e5 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 19 Dec 2004 21:03:16 +0000 Subject: (svn r1177) Enable non-stop flag for waypoints --- lang/english.txt | 1 + order_cmd.c | 3 ++- order_gui.c | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lang/english.txt b/lang/english.txt index 57306926d..faf265d49 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -1086,6 +1086,7 @@ STR_HEADING_FOR_WAYPOINT :{LTBLUE}Heading for {WAYPOINT} STR_HEADING_FOR_WAYPOINT_VEL :{LTBLUE}Heading for {WAYPOINT}, {VELOCITY} STR_GO_TO_WAYPOINT :Go via {WAYPOINT} +STR_GO_NON_STOP_TO_WAYPOINT :Go non-stop via {WAYPOINT} STR_WAYPOINTNAME_CITY :Waypoint {TOWN} STR_WAYPOINTNAME_CITY_SERIAL :Waypoint {TOWN} #{COMMA16} diff --git a/order_cmd.c b/order_cmd.c index 2ce7da4d6..4627dc679 100644 --- a/order_cmd.c +++ b/order_cmd.c @@ -177,7 +177,8 @@ int32 CmdModifyOrder(int x, int y, uint32 flags, uint32 p1, uint32 p2) sched = &v->schedule_ptr[sel]; if (sched->type != OT_GOTO_STATION && - (sched->type != OT_GOTO_DEPOT || (p2 >> 8) == 1)) + (sched->type != OT_GOTO_DEPOT || (p2 >> 8) == 1) && + (sched->type != OT_GOTO_WAYPOINT || (p2 >> 8) != 2)) return CMD_ERROR; if (flags & DC_EXEC) { diff --git a/order_gui.c b/order_gui.c index 0722215e0..f3bd90a51 100644 --- a/order_gui.c +++ b/order_gui.c @@ -72,6 +72,12 @@ static void DrawOrdersWindow(Window *w) SETBIT(w->disabled_state, 9); /* unload */ SetDParam(2,STR_SERVICE); break; + + case OT_GOTO_WAYPOINT: + SETBIT(w->disabled_state, 8); /* full load */ + SETBIT(w->disabled_state, 9); /* unload */ + break; + default: SETBIT(w->disabled_state, 6); /* nonstop */ SETBIT(w->disabled_state, 8); /* full load */ @@ -118,7 +124,7 @@ static void DrawOrdersWindow(Window *w) SetDParam(1, s); } else if (ord.type == OT_GOTO_WAYPOINT) { SetDParam(2, ord.station); - SetDParam(1, STR_GO_TO_WAYPOINT); + SetDParam(1, (ord.flags & OF_NON_STOP) ? STR_GO_NON_STOP_TO_WAYPOINT : STR_GO_TO_WAYPOINT); } } { -- cgit v1.2.3-70-g09d2