Disabling timetable automation without ctrl no longer clears timetable

pull/390/head
Jonathan G Rennison 2 years ago
parent 5b7db9d849
commit ad47275d53

@ -5754,7 +5754,7 @@ STR_TIMETABLE_AUTOFILL :{BLACK}Autofill
STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Fill the timetable automatically with the values from the next journey (Ctrl+Click to try to keep waiting times)
STR_TIMETABLE_AUTOMATE :{BLACK}Automate
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}Manage the timetables automatically by updating the values for each journey (Ctrl+Click when disabling to keep the current timetable)
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}Manage the timetables automatically by updating the values for each journey
STR_TIMETABLE_AUTO_SEPARATION :{BLACK}Auto Separation
STR_TIMETABLE_AUTO_SEPARATION_TOOLTIP :{BLACK}Automatically adjust timetable start times to ensure vehicle separation

@ -6689,7 +6689,7 @@ STR_TIMETABLE_CLEAR_TIME_TOOLTIP_EXTRA :{BLACK}{STRING}
STR_TIMETABLE_CHANGE_SPEED_TOOLTIP_EXTRA :{BLACK}{STRING} (Ctrl+Click fixa a velocidade para todas as ordes)
STR_TIMETABLE_CLEAR_SPEED_TOOLTIP_EXTRA :{BLACK}{STRING} (Ctrl+Click despexa a velocidade para todas as ordes)
STR_TIMETABLE_AUTOMATE :{BLACK}Automatizar
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}Xestiona os horarios automáticamente actualizando os valores para cada viaxe (Ctrl+Click cando se deshabilita para manter o horario actual)
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}Xestiona os horarios automáticamente actualizando os valores para cada viaxe
STR_TIMETABLE_AUTO_SEPARATION :{BLACK}Auto Separation
STR_TIMETABLE_AUTO_SEPARATION_TOOLTIP :{BLACK}Automáticamente axusta a hora de comezo dos horarios para asegurar a separación dos vehículos
STR_TIMETABLE_SCHEDULED_DISPATCH :{BLACK}Saída programada

@ -5475,7 +5475,7 @@ STR_TIMETABLE_AUTOFILL :{BLACK}Erfassen
STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}Zeiten automatisch bei der nächsten Fahrt eintragen (Mit Strg+Klick wird versucht, die aktuellen Wartezeiten beizubehalten)
STR_TIMETABLE_AUTOMATE :{BLACK}Automatisieren
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}Verwaltet den Fahrplan durch automatisches Erfassen der Werte jeder Fahrt (Strg+Klick, um beim Deaktivieren den aktuellen Fahrplan beizubehalten)
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}Verwaltet den Fahrplan durch automatisches Erfassen der Werte jeder Fahrt
STR_TIMETABLE_AUTO_SEPARATION :{BLACK}Auto-Separierung
STR_TIMETABLE_AUTO_SEPARATION_TOOLTIP :{BLACK}Passt automatisch den Beginn des Fahrplans an, um die Fahrzeuge gleichmäßig über den gemeinsamen Fahrplan zu verteilen

@ -5756,7 +5756,7 @@ STR_TIMETABLE_AUTOFILL :{BLACK}자동
STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}다음 운행시 자동으로 값을 얻어 시간표를 완성합니다 (역에 머무르는 시간값을 유지하려면 CTRL+클릭하십시오)
STR_TIMETABLE_AUTOMATE :{BLACK}자동
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}각 운행마다 자동으로 값을 얻어 시간표를 만듭니다. (현재 시간표를 유지하지 않으려면 CTRL+클릭하십시오)
STR_TIMETABLE_AUTOMATE_TOOLTIP :{BLACK}각 운행마다 자동으로 값을 얻어 시간표를 만듭니다.
STR_TIMETABLE_AUTO_SEPARATION :{BLACK}자동 배차 조절
STR_TIMETABLE_AUTO_SEPARATION_TOOLTIP :{BLACK}시간표 시작 시간을 자동으로 조절하여 배차 간격을 맞춰 줍니다.

@ -566,7 +566,6 @@ CommandCost CmdAutofillTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1,
* @param p1 Vehicle index.
* @param p2 Various bitstuffed elements
* - p2 = (bit 0) - Set to 1 to enable, 0 to disable automation.
* - p2 = (bit 1) - Ctrl was pressed. Used when disabling to keep times.
* @param text unused
* @return the cost of this operation or an error
*/
@ -600,26 +599,9 @@ CommandCost CmdAutomateTimetable(TileIndex index, DoCommandFlag flags, uint32 p1
ClrBit(v2->vehicle_flags, VF_AUTOFILL_TIMETABLE);
ClrBit(v2->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
v2->ClearSeparation();
if (!HasBit(p2, 1)) {
/* Ctrl wasn't pressed, so clear all timetabled times. */
ClrBit(v2->vehicle_flags, VF_TIMETABLE_STARTED);
v2->timetable_start = 0;
v2->timetable_start_subticks = 0;
v2->lateness_counter = 0;
v2->current_loading_time = 0;
}
}
}
SetTimetableWindowsDirty(v);
if (!HasBit(p2, 0) && !HasBit(p2, 1)) {
OrderList *orders = v->orders;
if (orders != nullptr) {
for (int i = 0; i < orders->GetNumOrders(); i++) {
ChangeTimetable(v, i, 0, MTF_WAIT_TIME, false);
ChangeTimetable(v, i, 0, MTF_TRAVEL_TIME, false);
}
}
}
}
return CommandCost();

@ -1017,7 +1017,6 @@ struct TimetableWindow : GeneralVehicleWindow {
case WID_VT_AUTOMATE: {
uint32 p2 = 0;
if (!HasBit(v->vehicle_flags, VF_AUTOMATE_TIMETABLE)) SetBit(p2, 0);
if (_ctrl_pressed) SetBit(p2, 1);
DoCommandP(0, v->index, p2, CMD_AUTOMATE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
break;
}

Loading…
Cancel
Save