From 980de7353d083d9f8fdf1660862ccb3882235c0f Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 23 Apr 2024 17:16:15 +0100 Subject: [PATCH] TBTR: Fix replacement servicing condition when using infinite money --- src/tbtr_template_vehicle.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tbtr_template_vehicle.cpp b/src/tbtr_template_vehicle.cpp index 590e2533c3..d4a5e8687e 100644 --- a/src/tbtr_template_vehicle.cpp +++ b/src/tbtr_template_vehicle.cpp @@ -160,6 +160,7 @@ bool ShouldServiceTrainForTemplateReplacement(const Train *t, const TemplateVehi if (needed_money > c->money) return false; TBTRDiffFlags diff = TrainTemplateDifference(t, tv); if (diff & TBTRDF_CONSIST) { + if (_settings_game.difficulty.infinite_money) return true; /* Check money. * We want 2*(the price of the whole template) without looking at the value of the vehicle(s) we are going to sell, or not need to buy. */ for (const TemplateVehicle *tv_unit = tv; tv_unit != nullptr; tv_unit = tv_unit->GetNextUnit()) {