Allow 4 active awards for more than 1 month at a time

This commit is contained in:
73 2023-01-02 14:38:29 -05:00 committed by GitHub
parent 73738bbdc8
commit bf3cc83a7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View File

@ -3,6 +3,7 @@
- Feature: [#18537] Add shift/control modifiers to window close buttons, closing all but the given window or all windows of the same type, respectively.
- Feature: [#18732] [Plugin] API to get the guests thoughts.
- Feature: [#18744] Cheat to allow using a regular path as a queue path.
- Improved: [#18749] Ability to have 4 active awards for more than one month in a row.
- Improved: [#18826] [Plugin] Added all actions and their documentation to plugin API.
- Fix: [#18467] “Selected only” Object Selection filter is active in Track Designs Manager, and cannot be toggled.
- Fix: [#18905] Ride Construction window theme is not applied correctly.

View File

@ -606,6 +606,20 @@ void award_update_all()
{
PROFILED_FUNCTION();
// Decrease award times
for (auto& award : _currentAwards)
{
--award.Time;
}
// Remove any 0 time awards
auto res = std::remove_if(
std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; });
if (res != std::end(_currentAwards))
{
_currentAwards.erase(res, std::end(_currentAwards));
window_invalidate_by_class(WindowClass::ParkInformation);
}
// Only add new awards if park is open
if (gParkFlags & PARK_FLAGS_PARK_OPEN)
{
@ -639,19 +653,4 @@ void award_update_all()
}
}
}
// Decrease award times
for (auto& award : _currentAwards)
{
--award.Time;
}
// Remove any 0 time awards
auto res = std::remove_if(
std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; });
if (res != std::end(_currentAwards))
{
_currentAwards.erase(res, std::end(_currentAwards));
window_invalidate_by_class(WindowClass::ParkInformation);
}
}