diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 6083d24768..c2e3bf099e 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -31,6 +31,7 @@ - Change: [#17655] Lower default price for the Crooked House. - Change: [#17745] Make maintenance cost of Mini-Golf more balanced. - Change: [#17762] Use vertical tabs in the New Game dialog. +- Change: [#18113] Increased limit of Loan Interest in Scenario Editor to 255%. - Fix: [#5141] Headless server is counted as a player. - Fix: [#7466] Coaster track not drawn at tunnel exit. - Fix: [#10535] Guests getting stuck at specific level crossings. diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index c1357610a2..b923be431b 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -508,7 +508,7 @@ private: Invalidate(); break; case WIDX_INTEREST_RATE_INCREASE: - if (gBankLoanInterestRate < 80) + if (gBankLoanInterestRate < MaxBankLoanInterestRate) { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::AnnualInterestRate, gBankLoanInterestRate + 1); @@ -523,7 +523,7 @@ private: case WIDX_INTEREST_RATE_DECREASE: if (gBankLoanInterestRate > 0) { - auto interest = std::min(80, gBankLoanInterestRate - 1); + auto interest = std::min(MaxBankLoanInterestRate, gBankLoanInterestRate - 1); auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::AnnualInterestRate, interest); GameActions::Execute(&scenarioSetSetting); } diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 7026e3c10f..a518f2cf98 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -30,6 +30,7 @@ #include "interface/Window_internal.h" #include "localisation/Localisation.h" #include "localisation/LocalisationService.h" +#include "management/Finance.h" #include "management/NewsItem.h" #include "object/DefaultObjects.h" #include "object/ObjectManager.h" @@ -377,7 +378,7 @@ namespace Editor gMaxBankLoan = std::clamp(gMaxBankLoan, 0.00_GBP, 5000000.00_GBP); - gBankLoanInterestRate = std::clamp(gBankLoanInterestRate, 5, 80); + gBankLoanInterestRate = std::clamp(gBankLoanInterestRate, 5, MaxBankLoanInterestRate); } climate_reset(gClimate); diff --git a/src/openrct2/actions/ScenarioSetSettingAction.cpp b/src/openrct2/actions/ScenarioSetSettingAction.cpp index 02202b1d65..a44d2affd0 100644 --- a/src/openrct2/actions/ScenarioSetSettingAction.cpp +++ b/src/openrct2/actions/ScenarioSetSettingAction.cpp @@ -89,7 +89,7 @@ GameActions::Result ScenarioSetSettingAction::Execute() const window_invalidate_by_class(WindowClass::Finances); break; case ScenarioSetSetting::AnnualInterestRate: - gBankLoanInterestRate = std::clamp(_value, 0, 80); + gBankLoanInterestRate = std::clamp(_value, 0, MaxBankLoanInterestRate); window_invalidate_by_class(WindowClass::Finances); break; case ScenarioSetSetting::ForbidMarketingCampaigns: diff --git a/src/openrct2/management/Finance.h b/src/openrct2/management/Finance.h index 99a0a5f7b0..61f3a1a0ac 100644 --- a/src/openrct2/management/Finance.h +++ b/src/openrct2/management/Finance.h @@ -34,6 +34,8 @@ enum class ExpenditureType : int32_t #define EXPENDITURE_TABLE_MONTH_COUNT 16 #define FINANCE_GRAPH_SIZE 128 +constexpr const uint8_t MaxBankLoanInterestRate = 255; + extern const money32 research_cost_table[RESEARCH_FUNDING_COUNT]; extern money64 gInitialCash; diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 81bcf0bc56..00c4afb846 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -42,7 +42,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "19" +#define NETWORK_STREAM_VERSION "20" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;