equal
deleted
inserted
replaced
9 #include "depot.h" |
9 #include "depot.h" |
10 #include "waypoint.h" |
10 #include "waypoint.h" |
11 #include "command_func.h" |
11 #include "command_func.h" |
12 #include "station.h" |
12 #include "station.h" |
13 #include "player_func.h" |
13 #include "player_func.h" |
14 #include "news.h" |
14 #include "news_func.h" |
15 #include "saveload.h" |
15 #include "saveload.h" |
16 #include "vehicle_gui.h" |
16 #include "vehicle_gui.h" |
17 #include "cargotype.h" |
17 #include "cargotype.h" |
18 #include "aircraft.h" |
18 #include "aircraft.h" |
19 #include "strings_func.h" |
19 #include "strings_func.h" |
995 if (!DoCommandP(0, v->index + (i << 16), PackOrder(&bak->order[i]), NULL, |
995 if (!DoCommandP(0, v->index + (i << 16), PackOrder(&bak->order[i]), NULL, |
996 CMD_INSERT_ORDER | CMD_NO_TEST_IF_IN_NETWORK)) { |
996 CMD_INSERT_ORDER | CMD_NO_TEST_IF_IN_NETWORK)) { |
997 break; |
997 break; |
998 } |
998 } |
999 |
999 |
1000 /* Copy timetable */ |
1000 /* Copy timetable if enabled */ |
1001 if (!DoCommandP(0, v->index | (i << 16) | (1 << 25), |
1001 if (_patches.timetabling && !DoCommandP(0, v->index | (i << 16) | (1 << 25), |
1002 bak->order[i].wait_time << 16 | bak->order[i].travel_time, NULL, |
1002 bak->order[i].wait_time << 16 | bak->order[i].travel_time, NULL, |
1003 CMD_CHANGE_TIMETABLE | CMD_NO_TEST_IF_IN_NETWORK)) { |
1003 CMD_CHANGE_TIMETABLE | CMD_NO_TEST_IF_IN_NETWORK)) { |
1004 break; |
1004 break; |
1005 } |
1005 } |
1006 } |
1006 } |
1133 //DEBUG(misc, 3, "Triggered News Item for vehicle %d", v->index); |
1133 //DEBUG(misc, 3, "Triggered News Item for vehicle %d", v->index); |
1134 |
1134 |
1135 SetDParam(0, v->unitnumber); |
1135 SetDParam(0, v->unitnumber); |
1136 AddNewsItem( |
1136 AddNewsItem( |
1137 message, |
1137 message, |
1138 NEWS_FLAGS(NM_SMALL, NF_VIEWPORT | NF_VEHICLE, NT_ADVICE, 0), |
1138 NM_SMALL, NF_VIEWPORT | NF_VEHICLE, NT_ADVICE, DNC_NONE, |
1139 v->index, |
1139 v->index, |
1140 0 |
1140 0 |
1141 ); |
1141 ); |
1142 } |
1142 } |
1143 } |
1143 } |