Sync "Raise / lower park entry fee"

This commit is contained in:
wolfreak99 2017-02-23 09:48:49 -05:00 committed by Michael Steenbeek
parent e5fac3c765
commit 527cce062f
2 changed files with 20 additions and 3 deletions

View File

@ -631,7 +631,8 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s
break;
case EDIT_SCENARIOOPTIONS_SETPARKCHARGEENTRYFEE:
gParkEntranceFee = max(MONEY(0, 00), min(MONEY(100, 00), *edx));
window_invalidate_by_class(WC_PARK_INFORMATION);
break;
case EDIT_SCENARIOOPTIONS_SETFORBIDTREEREMOVAL:

View File

@ -1249,7 +1249,15 @@ static void window_editor_scenario_options_park_mousedown(sint32 widgetIndex, rc
break;
case WIDX_ENTRY_PRICE_INCREASE:
if (gParkEntranceFee < MONEY(100,00)) {
gParkEntranceFee += MONEY(1,00);
game_do_command(
0,
GAME_COMMAND_FLAG_APPLY,
EDIT_SCENARIOOPTIONS_SETPARKCHARGEENTRYFEE,
gParkEntranceFee + MONEY(1,00),
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
0,
0
);
} else {
window_error_open(STR_CANT_INCREASE_FURTHER, STR_NONE);
}
@ -1257,7 +1265,15 @@ static void window_editor_scenario_options_park_mousedown(sint32 widgetIndex, rc
break;
case WIDX_ENTRY_PRICE_DECREASE:
if (gParkEntranceFee > MONEY(0,00)) {
gParkEntranceFee -= MONEY(1,00);
game_do_command(
0,
GAME_COMMAND_FLAG_APPLY,
EDIT_SCENARIOOPTIONS_SETPARKCHARGEENTRYFEE,
gParkEntranceFee - MONEY(1,00),
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
0,
0
);
} else {
window_error_open(STR_CANT_REDUCE_FURTHER, STR_NONE);
}