1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Fix #7205: Park entrance fee cannot be set higher than £100

This commit is contained in:
Gymnasiast
2018-02-21 21:37:24 +01:00
committed by Michael Steenbeek
parent 08bcbe3912
commit 7a2a73b418
5 changed files with 6 additions and 5 deletions

View File

@@ -1288,7 +1288,7 @@ static void window_editor_scenario_options_park_mousedown(rct_window *w, rct_wid
window_invalidate(w);
break;
case WIDX_ENTRY_PRICE_INCREASE:
if (gParkEntranceFee < MONEY(100,00)) {
if (gParkEntranceFee < MAX_ENTRANCE_FEE) {
game_do_command(
0,
GAME_COMMAND_FLAG_APPLY,

View File

@@ -1215,7 +1215,7 @@ static void window_park_price_mousedown(rct_window *w, rct_widgetindex widgetInd
window_park_set_page(w, widgetIndex - WIDX_TAB_1);
break;
case WIDX_INCREASE_PRICE:
newFee = Math::Min(MONEY(200,00), gParkEntranceFee + MONEY(1,00));
newFee = Math::Min(MAX_ENTRANCE_FEE, gParkEntranceFee + MONEY(1,00));
park_set_entrance_fee(newFee);
break;
case WIDX_DECREASE_PRICE:

View File

@@ -333,7 +333,7 @@ namespace Editor
gParkFlags &= ~PARK_FLAGS_SPRITES_INITIALISED;
gGuestInitialCash = Math::Clamp((money16)MONEY(10, 00), gGuestInitialCash, (money16)MONEY(100, 00));
gGuestInitialCash = Math::Clamp((money16)MONEY(10, 00), gGuestInitialCash, (money16)MAX_ENTRANCE_FEE);
gInitialCash = Math::Min(gInitialCash, 100000);
finance_reset_cash_to_initial();
@@ -726,7 +726,7 @@ namespace Editor
}
break;
case EDIT_SCENARIOOPTIONS_SETPARKCHARGEENTRYFEE:
gParkEntranceFee = Math::Clamp(MONEY(0, 00), *edx, MONEY(100, 00));
gParkEntranceFee = Math::Clamp(MONEY(0, 00), *edx, MAX_ENTRANCE_FEE);
window_invalidate_by_class(WC_PARK_INFORMATION);
break;
case EDIT_SCENARIOOPTIONS_SETFORBIDTREEREMOVAL:

View File

@@ -56,7 +56,7 @@ public:
{
return std::make_unique<GameActionResult>(GA_ERROR::DISALLOWED, STR_NONE);
}
if (_fee < MONEY_FREE || _fee > MONEY(100,00))
if (_fee < MONEY_FREE || _fee > MAX_ENTRANCE_FEE)
{
return std::make_unique<GameActionResult>(GA_ERROR::INVALID_PARAMETERS, STR_NONE);
}

View File

@@ -23,6 +23,7 @@
#define DECRYPT_MONEY(money) ((money32)rol32((money) ^ 0xF4EC9621, 13))
#define ENCRYPT_MONEY(money) ((money32)(ror32((money), 13) ^ 0xF4EC9621))
#define MAX_ENTRANCE_FEE MONEY(200,00)
enum {
PARK_FLAGS_PARK_OPEN = (1 << 0),