Sync "Raise / lower cost to buy land"

This commit is contained in:
wolfreak99 authored and Michael Steenbeek committed 2017-04-11 14:26:33 +02:00
1 parent 8b3f0a4df8
commit 5616b1f260
2 files changed
+19 -3

No files matched your search

+1 -1
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:
+18 -2
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);
}