Fix #5730: Unable to uncheck 'No money' in the Scenario Editor

This commit is contained in:
Gymnasiast 2017-06-29 12:01:30 +02:00
parent 251ead0531
commit 194cc4dcb3
3 changed files with 18 additions and 4 deletions

View File

@ -11,9 +11,9 @@
- Improved: Construction rights can now be placed on park entrances.
- Improved: Mouse can now be dragged to select scenery when saving track designs
- Fix: [#259] Money making glitch involving swamps (original bug)
- Fix: [#441] Construction rights over entrance path erased
- Fix: [#441] Construction rights over entrance path erased (original bug)
- Fix: [#739] Crocodile Ride (Log Flume) never allows more than five boats (original bug)
- Fix: [#837] Can't move windows on title screen to where the toolbar would be
- Fix: [#837] Can't move windows on title screen to where the toolbar would be (original bug)
- Fix: [#1705] Time Twister's Medieval entrance has incorrect scrolling (original bug)
- Fix: [#3178, #5456] Paths with non-ASCII characters not handled properly on macOS.
- Fix: [#3681] Steel Twister rollercoaster always shows all track designs
@ -22,6 +22,7 @@
- Fix: [#5400] New Ride window does not focus properly on newly invented ride.
- Fix: [#5009] Ride rating calculations can overflow
- Fix: [#5489] Sprite index crash for car view on car ride.
- Fix: [#5730] Unable to uncheck 'No money' in the Scenario Editor.
- Fix: Non-invented vehicles can be used via track designs in select-by-track-type mode.
- Fix: Track components added by OpenRCT2 are now usable in older scenarios.
- Technical: [#5047] Add ride ratings tests

View File

@ -546,7 +546,7 @@ void game_command_edit_scenario_options(sint32* eax, sint32* ebx, sint32* ecx, s
gParkFlags |= PARK_FLAGS_NO_MONEY_SCENARIO;
}
else {
gParkFlags &= PARK_FLAGS_NO_MONEY_SCENARIO;
gParkFlags &= ~PARK_FLAGS_NO_MONEY_SCENARIO;
}
}
else {

View File

@ -499,17 +499,30 @@ static void window_editor_scenario_options_financial_mouseup(rct_window *w, rct_
window_editor_scenario_options_set_page(w, widgetIndex - WIDX_TAB_1);
break;
case WIDX_NO_MONEY:
{
sint32 newMoneySetting;
if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)
{
newMoneySetting = (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO) ? 0 : 1;
}
else
{
newMoneySetting = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : 1;
}
game_do_command(
0,
GAME_COMMAND_FLAG_APPLY,
EDIT_SCENARIOOPTIONS_SETNOMONEY,
gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : 1,
newMoneySetting,
GAME_COMMAND_EDIT_SCENARIO_OPTIONS,
0,
0
);
window_invalidate(w);
break;
}
case WIDX_FORBID_MARKETING:
game_do_command(
0,