mirror of https://github.com/OpenRCT2/OpenRCT2.git
Sync "Raise / lower initial loan size"
This commit is contained in:
parent
0932854f7c
commit
e096314f89
|
@ -572,7 +572,9 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s
|
||||||
window_invalidate_by_class(WC_BOTTOM_TOOLBAR);
|
window_invalidate_by_class(WC_BOTTOM_TOOLBAR);
|
||||||
break;
|
break;
|
||||||
case EDIT_SCENARIOOPTIONS_SETINITIALLOAN:
|
case EDIT_SCENARIOOPTIONS_SETINITIALLOAN:
|
||||||
|
gBankLoan = max(MONEY(0,00), min(MONEY(5000000,00), *edx));
|
||||||
|
gMaxBankLoan = max(gBankLoan, gMaxBankLoan);
|
||||||
|
window_invalidate_by_class(WC_FINANCES);
|
||||||
break;
|
break;
|
||||||
case EDIT_SCENARIOOPTIONS_SETMAXIMUMLOANSIZE:
|
case EDIT_SCENARIOOPTIONS_SETMAXIMUMLOANSIZE:
|
||||||
|
|
||||||
|
|
|
@ -568,8 +568,15 @@ static void window_editor_scenario_options_financial_mousedown(sint32 widgetInde
|
||||||
break;
|
break;
|
||||||
case WIDX_INITIAL_LOAN_INCREASE:
|
case WIDX_INITIAL_LOAN_INCREASE:
|
||||||
if (gBankLoan < MONEY(5000000,00)) {
|
if (gBankLoan < MONEY(5000000,00)) {
|
||||||
gBankLoan += MONEY(1000,00);
|
game_do_command(
|
||||||
gMaxBankLoan = max(gBankLoan, gMaxBankLoan);
|
0,
|
||||||
|
GAME_COMMAND_FLAG_APPLY,
|
||||||
|
EDIT_SCENARIOOPTIONS_SETINITIALLOAN,
|
||||||
|
gBankLoan + MONEY(1000,00),
|
||||||
|
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
window_error_open(STR_CANT_INCREASE_INIT_LOAN, STR_NONE);
|
window_error_open(STR_CANT_INCREASE_INIT_LOAN, STR_NONE);
|
||||||
}
|
}
|
||||||
|
@ -577,8 +584,15 @@ static void window_editor_scenario_options_financial_mousedown(sint32 widgetInde
|
||||||
break;
|
break;
|
||||||
case WIDX_INITIAL_LOAN_DECREASE:
|
case WIDX_INITIAL_LOAN_DECREASE:
|
||||||
if (gBankLoan > MONEY(0,00)) {
|
if (gBankLoan > MONEY(0,00)) {
|
||||||
gBankLoan -= MONEY(1000,00);
|
game_do_command(
|
||||||
gMaxBankLoan = max(gBankLoan, gMaxBankLoan);
|
0,
|
||||||
|
GAME_COMMAND_FLAG_APPLY,
|
||||||
|
EDIT_SCENARIOOPTIONS_SETINITIALLOAN,
|
||||||
|
gBankLoan - MONEY(1000,00),
|
||||||
|
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
window_error_open(STR_CANT_REDUCE_INIT_LOAN, STR_NONE);
|
window_error_open(STR_CANT_REDUCE_INIT_LOAN, STR_NONE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue