Increase limit on Loan Interest from 80% to 255%

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
This commit is contained in:
73 2022-09-27 06:20:01 -04:00 committed by GitHub
parent 84abc2ab83
commit a8073f6bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 5 deletions

View file

@ -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.

View file

@ -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<uint8_t>(MaxBankLoanInterestRate, gBankLoanInterestRate - 1);
auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::AnnualInterestRate, interest);
GameActions::Execute(&scenarioSetSetting);
}

View file

@ -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<money64>(gMaxBankLoan, 0.00_GBP, 5000000.00_GBP);
gBankLoanInterestRate = std::clamp<uint8_t>(gBankLoanInterestRate, 5, 80);
gBankLoanInterestRate = std::clamp<uint8_t>(gBankLoanInterestRate, 5, MaxBankLoanInterestRate);
}
climate_reset(gClimate);

View file

@ -89,7 +89,7 @@ GameActions::Result ScenarioSetSettingAction::Execute() const
window_invalidate_by_class(WindowClass::Finances);
break;
case ScenarioSetSetting::AnnualInterestRate:
gBankLoanInterestRate = std::clamp<uint8_t>(_value, 0, 80);
gBankLoanInterestRate = std::clamp<uint8_t>(_value, 0, MaxBankLoanInterestRate);
window_invalidate_by_class(WindowClass::Finances);
break;
case ScenarioSetSetting::ForbidMarketingCampaigns:

View file

@ -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;

View file

@ -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;