diff --git a/distribution/changelog.txt b/distribution/changelog.txt index c0fb676784..af442c0a18 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -17,6 +17,7 @@ - Fix: [#26421] Wrong scenery tab highlighted when more than 64 scenery groups are selected. - Fix: [#26425] Benches don’t reduce watching spots from 4 to 2 while other path additions do (should be reversed). - Fix: [#26432] Guests choose to head for rides they have already ridden if they don’t have a map. +- Fix: [#26492] Drag tool shows per-tile error instead of total cost when running out of money midway through placement. 0.5.0 (2026-04-12) ------------------------------------------------------------------------ diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 72eacf7c17..9143c15f18 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -1319,6 +1319,18 @@ namespace OpenRCT2::Ui::Windows return; } + if (!(getGameState().park.flags & PARK_FLAGS_NO_MONEY) && totalCost > getGameState().park.cash) + { + Audio::Play3D(Audio::SoundId::error, lastLocation); + _footpathErrorOccured = true; + + auto* windowMgr = GetWindowManager(); + Formatter ft; + ft.Add(totalCost); + windowMgr->ShowError(STR_CANT_BUILD_FOOTPATH_HERE, STR_NOT_ENOUGH_CASH_REQUIRES, ft); + return; + } + // All queries passed, now execute bool anySuccess = false; money64 cost = 0; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 3ceda67f12..77852fff50 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -3291,6 +3291,20 @@ namespace OpenRCT2::Ui::Windows return; } + if (!(getGameState().park.flags & PARK_FLAGS_NO_MONEY) && totalCost > getGameState().park.cash) + { + Audio::Play3D(Audio::SoundId::error, lastLocation); + + auto* windowMgr = GetWindowManager(); + Formatter ft; + ft.Add(totalCost); + windowMgr->ShowError(STR_CANT_BUILD_THIS_HERE, STR_NOT_ENOUGH_CASH_REQUIRES, ft); + + _provisionalTiles.clear(); + _inDragMode = false; + return; + } + // All queries passed, now execute bool anySuccessful = false;