@@ -5107,12 +5107,13 @@ STR_ERROR_NO_RAIL_WAYPOINT
STR_ERROR_NO_BUOY :{WHITE}There is no buoy
# Timetable related errors
STR_ERROR_CAN_T_TIMETABLE_VEHICLE :{WHITE}Can't timetable vehicle...
STR_ERROR_TIMETABLE_ONLY_WAIT_AT_STATIONS :{WHITE}Vehicles can only wait at stations
STR_ERROR_TIMETABLE_NOT_STOPPING_HERE :{WHITE}This vehicle is not stopping at this station
STR_ERROR_TIMETABLE_INCOMPLETE :{WHITE}... timetable is incomplete
# Sign related errors
STR_ERROR_TOO_MANY_SIGNS :{WHITE}... too many signs
STR_ERROR_CAN_T_PLACE_SIGN_HERE :{WHITE}Can't place sign here...
STR_ERROR_CAN_T_CHANGE_SIGN_NAME :{WHITE}Can't change sign name...
STR_ERROR_CAN_T_DELETE_SIGN :{WHITE}Can't delete sign...
@@ -303,13 +303,13 @@ CommandCost CmdSetTimetableStart(DoComma
int total_duration = v->orders->GetTimetableTotalDuration();
/* Don't let a timetable start more than 15 years into the future or 1 year in the past. */
if (start_date < 0 || start_date > MAX_DAY) return CMD_ERROR;
if (start_date - _date > MAX_TIMETABLE_START_YEARS * DAYS_IN_LEAP_YEAR) return CMD_ERROR;
if (_date - start_date > DAYS_IN_LEAP_YEAR) return CMD_ERROR;
if (timetable_all && !v->orders->IsCompleteTimetable()) return CMD_ERROR;
if (timetable_all && !v->orders->IsCompleteTimetable()) return CommandCost(STR_ERROR_TIMETABLE_INCOMPLETE);
if (timetable_all && start_date + total_duration / DAY_TICKS > MAX_DAY) return CMD_ERROR;
if (flags & DC_EXEC) {
std::vector<Vehicle *> vehs;
if (timetable_all) {
@@ -569,13 +569,13 @@ struct TimetableWindow : Window {
this->CloseChildWindows();
this->sel_index = (selected == INVALID_ORDER || selected == this->sel_index) ? -1 : selected;
break;
}
case WID_VT_START_DATE: // Change the date that the timetable starts.
ShowSetDateWindow(this, v->index, _date, _cur_year, _cur_year + MAX_TIMETABLE_START_YEARS, ChangeTimetableStartCallback, reinterpret_cast<void *>(static_cast<uintptr_t>(v->orders->IsCompleteTimetable() && _ctrl_pressed)));
ShowSetDateWindow(this, v->index, _date, _cur_year, _cur_year + MAX_TIMETABLE_START_YEARS, ChangeTimetableStartCallback, reinterpret_cast<void *>(static_cast<uintptr_t>(_ctrl_pressed)));
case WID_VT_CHANGE_TIME: { // "Wait For" button.
this->query_widget = WID_VT_CHANGE_TIME;
int selected = this->sel_index;
VehicleOrderID real = (selected + 1) / 2;
Status change: