mirror of https://github.com/OpenRCT2/OpenRCT2.git
Sync "Raise / lower guest initial happiness"
This commit is contained in:
parent
d21d500b4a
commit
c0dc1718a4
|
@ -594,7 +594,7 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EDIT_SCENARIOOPTIONS_SETAVERAGECASHPERGUEST:
|
case EDIT_SCENARIOOPTIONS_SETAVERAGECASHPERGUEST:
|
||||||
|
gGuestInitialCash = max(MONEY(0, 00), min(MONEY(1000, 00), *edx));
|
||||||
break;
|
break;
|
||||||
case EDIT_SCENARIOOPTIONS_SETGUESTINITIALHAPPINESS:
|
case EDIT_SCENARIOOPTIONS_SETGUESTINITIALHAPPINESS:
|
||||||
|
|
||||||
|
|
|
@ -863,7 +863,15 @@ static void window_editor_scenario_options_guests_mousedown(sint32 widgetIndex,
|
||||||
switch (widgetIndex) {
|
switch (widgetIndex) {
|
||||||
case WIDX_CASH_PER_GUEST_INCREASE:
|
case WIDX_CASH_PER_GUEST_INCREASE:
|
||||||
if (gGuestInitialCash < MONEY(1000, 00)) {
|
if (gGuestInitialCash < MONEY(1000, 00)) {
|
||||||
gGuestInitialCash += MONEY(1, 00);
|
game_do_command(
|
||||||
|
0,
|
||||||
|
GAME_COMMAND_FLAG_APPLY,
|
||||||
|
EDIT_SCENARIOOPTIONS_SETAVERAGECASHPERGUEST,
|
||||||
|
gGuestInitialCash + MONEY(1, 00),
|
||||||
|
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
window_error_open(STR_CANT_INCREASE_FURTHER, STR_NONE);
|
window_error_open(STR_CANT_INCREASE_FURTHER, STR_NONE);
|
||||||
}
|
}
|
||||||
|
@ -871,7 +879,15 @@ static void window_editor_scenario_options_guests_mousedown(sint32 widgetIndex,
|
||||||
break;
|
break;
|
||||||
case WIDX_CASH_PER_GUEST_DECREASE:
|
case WIDX_CASH_PER_GUEST_DECREASE:
|
||||||
if (gGuestInitialCash > MONEY(0, 00)) {
|
if (gGuestInitialCash > MONEY(0, 00)) {
|
||||||
gGuestInitialCash -= MONEY(1, 00);
|
game_do_command(
|
||||||
|
0,
|
||||||
|
GAME_COMMAND_FLAG_APPLY,
|
||||||
|
EDIT_SCENARIOOPTIONS_SETAVERAGECASHPERGUEST,
|
||||||
|
gGuestInitialCash - MONEY(1, 00),
|
||||||
|
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
window_error_open(STR_CANT_REDUCE_FURTHER, STR_NONE);
|
window_error_open(STR_CANT_REDUCE_FURTHER, STR_NONE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue