From e5fac3c7659012afd8dbaeef6e934486736bdfec Mon Sep 17 00:00:00 2001 From: wolfreak99 Date: Thu, 23 Feb 2017 09:43:51 -0500 Subject: [PATCH] Sync "Raise / lower cost to buy construction rights" --- src/openrct2/editor.c | 2 +- .../windows/editor_scenario_options.c | 20 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/openrct2/editor.c b/src/openrct2/editor.c index c529c4242b..7213090e5e 100644 --- a/src/openrct2/editor.c +++ b/src/openrct2/editor.c @@ -625,7 +625,7 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s gLandPrice = max(MONEY(5, 00), min(MONEY(200, 00), *edx)); break; case EDIT_SCENARIOOPTIONS_SETCOSTTOBUYCONSTRUCTIONRIGHTS: - + gLandRightsCost = max(MONEY(5,00), min(MONEY(200,00), *edx)); break; case EDIT_SCENARIOOPTIONS_SETPARKCHARGEMETHOD: diff --git a/src/openrct2/windows/editor_scenario_options.c b/src/openrct2/windows/editor_scenario_options.c index 584596ab28..552b2f1dc3 100644 --- a/src/openrct2/windows/editor_scenario_options.c +++ b/src/openrct2/windows/editor_scenario_options.c @@ -1217,7 +1217,15 @@ static void window_editor_scenario_options_park_mousedown(sint32 widgetIndex, rc break; case WIDX_CONSTRUCTION_RIGHTS_COST_INCREASE: if (gConstructionRightsPrice < MONEY(200,00)) { - gConstructionRightsPrice += MONEY(1,00); + game_do_command( + 0, + GAME_COMMAND_FLAG_APPLY, + EDIT_SCENARIOOPTIONS_SETCOSTTOBUYCONSTRUCTIONRIGHTS, + gConstructionRightsPrice + MONEY(1,00), + GAME_COMMAND_EDIT_SCENARIO_OPTIONS, + 0, + 0 + ); } else { window_error_open(STR_CANT_INCREASE_FURTHER, STR_NONE); } @@ -1225,7 +1233,15 @@ static void window_editor_scenario_options_park_mousedown(sint32 widgetIndex, rc break; case WIDX_CONSTRUCTION_RIGHTS_COST_DECREASE: if (gConstructionRightsPrice > MONEY(5,00)) { - gConstructionRightsPrice -= MONEY(1,00); + game_do_command( + 0, + GAME_COMMAND_FLAG_APPLY, + EDIT_SCENARIOOPTIONS_SETCOSTTOBUYCONSTRUCTIONRIGHTS, + gConstructionRightsPrice - MONEY(1,00), + GAME_COMMAND_EDIT_SCENARIO_OPTIONS, + 0, + 0 + ); } else { window_error_open(STR_CANT_REDUCE_FURTHER, STR_NONE); }