mirror of https://github.com/OpenRCT2/OpenRCT2.git
Sync "Raise / lower guest initial happiness"
This commit is contained in:
parent
c0dc1718a4
commit
48ad60308e
|
@ -597,7 +597,7 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s
|
||||||
gGuestInitialCash = max(MONEY(0, 00), min(MONEY(1000, 00), *edx));
|
gGuestInitialCash = max(MONEY(0, 00), min(MONEY(1000, 00), *edx));
|
||||||
break;
|
break;
|
||||||
case EDIT_SCENARIOOPTIONS_SETGUESTINITIALHAPPINESS:
|
case EDIT_SCENARIOOPTIONS_SETGUESTINITIALHAPPINESS:
|
||||||
|
gGuestInitialHappiness = max(40, min(250, *edx));
|
||||||
break;
|
break;
|
||||||
case EDIT_SCENARIOOPTIONS_SETGUESTINITIALHUNGER:
|
case EDIT_SCENARIOOPTIONS_SETGUESTINITIALHUNGER:
|
||||||
|
|
||||||
|
|
|
@ -895,7 +895,15 @@ static void window_editor_scenario_options_guests_mousedown(sint32 widgetIndex,
|
||||||
break;
|
break;
|
||||||
case WIDX_GUEST_INITIAL_HAPPINESS_INCREASE:
|
case WIDX_GUEST_INITIAL_HAPPINESS_INCREASE:
|
||||||
if (gGuestInitialHappiness < 250) {
|
if (gGuestInitialHappiness < 250) {
|
||||||
gGuestInitialHappiness += 4;
|
game_do_command(
|
||||||
|
0,
|
||||||
|
GAME_COMMAND_FLAG_APPLY,
|
||||||
|
EDIT_SCENARIOOPTIONS_SETGUESTINITIALHAPPINESS,
|
||||||
|
gGuestInitialHappiness + 4,
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
@ -903,7 +911,15 @@ static void window_editor_scenario_options_guests_mousedown(sint32 widgetIndex,
|
||||||
break;
|
break;
|
||||||
case WIDX_GUEST_INITIAL_HAPPINESS_DECREASE:
|
case WIDX_GUEST_INITIAL_HAPPINESS_DECREASE:
|
||||||
if (gGuestInitialHappiness > 40) {
|
if (gGuestInitialHappiness > 40) {
|
||||||
gGuestInitialHappiness -= 4;
|
game_do_command(
|
||||||
|
0,
|
||||||
|
GAME_COMMAND_FLAG_APPLY,
|
||||||
|
EDIT_SCENARIOOPTIONS_SETGUESTINITIALHAPPINESS,
|
||||||
|
gGuestInitialHappiness - 4,
|
||||||
|
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