Sync "Raise / lower cost to buy land"

This commit is contained in:
wolfreak99 2017-02-23 09:41:24 -05:00 committed by Michael Steenbeek
parent 8b3f0a4df8
commit 5616b1f260
2 changed files with 19 additions and 3 deletions

View File

@ -622,7 +622,7 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s
}
break;
case EDIT_SCENARIOOPTIONS_SETCOSTTOBUYLAND:
gLandPrice = max(MONEY(5, 00), min(MONEY(200, 00), *edx));
break;
case EDIT_SCENARIOOPTIONS_SETCOSTTOBUYCONSTRUCTIONRIGHTS:

View File

@ -1185,7 +1185,15 @@ static void window_editor_scenario_options_park_mousedown(sint32 widgetIndex, rc
switch (widgetIndex) {
case WIDX_LAND_COST_INCREASE:
if (gLandPrice < MONEY(200,00)) {
gLandPrice += MONEY(1,00);
game_do_command(
0,
GAME_COMMAND_FLAG_APPLY,
EDIT_SCENARIOOPTIONS_SETCOSTTOBUYLAND,
gLandPrice + MONEY(1,00),
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
0,
0
);
} else {
window_error_open(STR_CANT_INCREASE_FURTHER, STR_NONE);
}
@ -1193,7 +1201,15 @@ static void window_editor_scenario_options_park_mousedown(sint32 widgetIndex, rc
break;
case WIDX_LAND_COST_DECREASE:
if (gLandPrice > MONEY(5,00)) {
gLandPrice -= MONEY(1,00);
game_do_command(
0,
GAME_COMMAND_FLAG_APPLY,
EDIT_SCENARIOOPTIONS_SETCOSTTOBUYLAND,
gLandPrice - MONEY(1, 00),
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
0,
0
);
} else {
window_error_open(STR_CANT_REDUCE_FURTHER, STR_NONE);
}