diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-03 21:13:32 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | a38bbefe1b28ac59b2a9fef45765fa3890cde32e (patch) | |
tree | 8d842f88a25db5ce231ce5bdb0d39914b7e2ed70 /src/timetable_gui.cpp | |
parent | 549caca39cebc8c988f4e51d79d353cab4646d58 (diff) | |
download | openttd-a38bbefe1b28ac59b2a9fef45765fa3890cde32e.tar.xz |
Codechange: Untangle command code, flags and error string for DoCommand*.
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r-- | src/timetable_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 9f9bfad5a..00ab50115 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -142,7 +142,7 @@ static void FillTimetableArrivalDepartureTable(const Vehicle *v, VehicleOrderID */ static void ChangeTimetableStartCallback(const Window *w, Date date) { - DoCommandP(CMD_SET_TIMETABLE_START | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE), 0, w->window_number, date); + DoCommandP(CMD_SET_TIMETABLE_START, STR_ERROR_CAN_T_TIMETABLE_VEHICLE, 0, w->window_number, date); } @@ -578,25 +578,25 @@ struct TimetableWindow : Window { case WID_VT_CLEAR_TIME: { // Clear waiting time. uint32 p1 = PackTimetableArgs(v, this->sel_index, false); - DoCommandP(CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE), 0, p1, 0); + DoCommandP(CMD_CHANGE_TIMETABLE, STR_ERROR_CAN_T_TIMETABLE_VEHICLE, 0, p1, 0); break; } case WID_VT_CLEAR_SPEED: { // Clear max speed button. uint32 p1 = PackTimetableArgs(v, this->sel_index, true); - DoCommandP(CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE), 0, p1, UINT16_MAX); + DoCommandP(CMD_CHANGE_TIMETABLE, STR_ERROR_CAN_T_TIMETABLE_VEHICLE, 0, p1, UINT16_MAX); break; } case WID_VT_RESET_LATENESS: // Reset the vehicle's late counter. - DoCommandP(CMD_SET_VEHICLE_ON_TIME | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE), 0, v->index, 0); + DoCommandP(CMD_SET_VEHICLE_ON_TIME, STR_ERROR_CAN_T_TIMETABLE_VEHICLE, 0, v->index, 0); break; case WID_VT_AUTOFILL: { // Autofill the timetable. uint32 p2 = 0; if (!HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(p2, 0); if (_ctrl_pressed) SetBit(p2, 1); - DoCommandP(CMD_AUTOFILL_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE), 0, v->index, p2); + DoCommandP(CMD_AUTOFILL_TIMETABLE, STR_ERROR_CAN_T_TIMETABLE_VEHICLE, 0, v->index, p2); break; } @@ -629,7 +629,7 @@ struct TimetableWindow : Window { uint32 p2 = std::min<uint32>(val, UINT16_MAX); - DoCommandP(CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE), 0, p1, p2); + DoCommandP(CMD_CHANGE_TIMETABLE, STR_ERROR_CAN_T_TIMETABLE_VEHICLE, 0, p1, p2); } void OnResize() override |