Add a "if breakdowns enabled" mode to the no depot order warn setting

This commit is contained in:
Jonathan G Rennison
2022-11-17 23:28:57 +00:00
parent cf6f509859
commit 4990a25e48
4 changed files with 21 additions and 6 deletions

View File

@@ -2719,7 +2719,12 @@ void CheckOrders(const Vehicle *v)
if (v->orders != nullptr) v->orders->DebugCheckSanity();
#endif
if (message == INVALID_STRING_ID && !has_depot_order && v->type != VEH_AIRCRAFT && _settings_client.gui.no_depot_order_warn) message = STR_NEWS_VEHICLE_NO_DEPOT_ORDER;
if (message == INVALID_STRING_ID && !has_depot_order && v->type != VEH_AIRCRAFT) {
if (_settings_client.gui.no_depot_order_warn == 1 ||
(_settings_client.gui.no_depot_order_warn == 2 && _settings_game.difficulty.vehicle_breakdowns != 0)) {
message = STR_NEWS_VEHICLE_NO_DEPOT_ORDER;
}
}
/* We don't have a problem */
if (message == INVALID_STRING_ID) return;