Skip to content

Commit

Permalink
Close OpenRCT2#20942: Add button to remove park fences
Browse files Browse the repository at this point in the history
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
  • Loading branch information
lewyche and Gymnasiast committed Aug 11, 2024
1 parent 924f7ec commit 9b3e1bc
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 37 deletions.
1 change: 1 addition & 0 deletions data/language/en-GB.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3727,6 +3727,7 @@ STR_6652 :Error Window
STR_6653 :All sources shown
STR_6654 :Showing {POP16}{UINT16} sources
STR_6655 :Only ‘{POP16}{STRINGID}’
STR_6656 :Remove all fences from the park

#############
# Scenarios #
Expand Down
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
0.4.14 (in development)
------------------------------------------------------------------------
- Feature: [#15750] Allow using different types of park entrance in one park.
- Feature: [#20942] Allow removing all park fences from the Cheats window.
- Feature: [#22392] [Plugin] Expose ride vehicle’s spin to the plugin API.
- Feature: [#22414] Finance graphs can be resized.
- Change: [#21659] Increase the Hybrid Roller Coaster’s maximum lift speed to 17 km/h (11 mph).
Expand Down
1 change: 1 addition & 0 deletions src/openrct2-ui/UiStringIds.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ namespace OpenRCT2
STR_CHEAT_NEVERENDING_MARKETING_TIP = 5741,
STR_CHEAT_OBJECTIVE_GROUP = 6394,
STR_CHEAT_OPEN_PARK_TIP = 5796,
STR_CHEAT_REMOVE_PARK_FENCES_TIP = 6656,
STR_CHEAT_OWN_ALL_LAND_TIP = 6121,
STR_CHEAT_REMOVE_ALL_GUESTS_TIP = 5360,
STR_CHEAT_RENEW_RIDES_TIP = 5791,
Expand Down
59 changes: 32 additions & 27 deletions src/openrct2-ui/windows/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ enum WindowCheatsWidgetIdx
WIDX_REMOVE_ALL_GUESTS,

WIDX_GENERAL_GROUP = WIDX_TAB_CONTENT,
WIDX_OPEN_CLOSE_PARK,
WIDX_REMOVE_PARK_FENCES,
WIDX_CREATE_DUCKS,
WIDX_OPEN_CLOSE_PARK,
WIDX_OWN_ALL_LAND,
WIDX_REMOVE_DUCKS,
WIDX_OBJECTIVE_GROUP,
Expand Down Expand Up @@ -259,35 +260,36 @@ static Widget window_cheats_guests_widgets[] =
static Widget window_cheats_misc_widgets[] =
{
MAIN_CHEATS_WIDGETS,
MakeWidget ({ 5, 48}, {238, 60}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GENERAL_GROUP ), // General group
MakeWidget ({ 11, 62}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_OPEN_PARK, STR_CHEAT_OPEN_PARK_TIP ), // open / close park
MakeWidget ({ 5, 48}, {238, 81}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GENERAL_GROUP ), // General group
MakeWidget ({127, 62}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_REMOVE_PARK_FENCES, STR_CHEAT_REMOVE_PARK_FENCES_TIP ), // Remove park fences
MakeWidget ({ 11, 83}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CREATE_DUCKS, STR_CREATE_DUCKS_TIP ), // Create ducks
MakeWidget ({127, 62}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_OWN_ALL_LAND, STR_CHEAT_OWN_ALL_LAND_TIP ), // Own all land
MakeWidget ({ 11, 104}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_OPEN_PARK, STR_CHEAT_OPEN_PARK_TIP ), // open / close park
MakeWidget ({ 11, 62}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_OWN_ALL_LAND, STR_CHEAT_OWN_ALL_LAND_TIP ), // Own all land
MakeWidget ({127, 83}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_REMOVE_DUCKS, STR_REMOVE_DUCKS_TIP ), // Remove ducks

MakeWidget ({ 5, 112}, {238, 75}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_OBJECTIVE_GROUP ), // Objective group
MakeWidget ({ 11, 127}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_NEVERENDING_MARKETING, STR_CHEAT_NEVERENDING_MARKETING_TIP), // never ending marketing campaigns
MakeWidget ({ 11, 144}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORCE_PARK_RATING ), // Force park rating
MakeSpinnerWidgets({156, 142}, { 81, 14}, WindowWidgetType::Spinner, WindowColour::Secondary ), // park rating (3 widgets)
MakeWidget ({ 11, 162}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_WIN_SCENARIO ), // Win scenario
MakeWidget ({127, 162}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_HAVE_FUN ), // Have fun!

MakeWidget ({ 5, 190}, {238, 50}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_WEATHER_GROUP ), // Weather group
MakeWidget ({126, 204}, {111, 14}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_CHANGE_WEATHER_TOOLTIP ), // Force weather
MakeWidget ({225, 205}, { 11, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_CHANGE_WEATHER_TOOLTIP ), // Force weather
MakeWidget ({ 11, 222}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_FREEZE_WEATHER, STR_CHEAT_FREEZE_WEATHER_TIP ), // Freeze weather

MakeWidget ({ 5, 244}, {238, 99}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_MAINTENANCE_GROUP ), // Maintenance group
MakeWidget ({ 11, 259}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_REMOVE_LITTER ), // Remove litter
MakeWidget ({127, 259}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_FIX_VANDALISM ), // Fix vandalism
MakeWidget ({ 11, 280}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_CLEAR_GRASS ), // Clear grass
MakeWidget ({127, 280}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_MOWED_GRASS ), // Mowed grass
MakeWidget ({ 11, 301}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_WATER_PLANTS ), // Water plants
MakeWidget ({ 11, 322}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_PLANT_AGING, STR_CHEAT_DISABLE_PLANT_AGING_TIP ), // Disable plant ageing

MakeWidget ({ 5, 347}, {238, 35}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_STAFF_GROUP ), // Staff group
MakeWidget ({126, 361}, {111, 14}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Staff speed
MakeWidget ({225, 362}, { 11, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), // Staff speed
MakeWidget ({ 5, 131}, {238, 75}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_OBJECTIVE_GROUP ), // Objective group
MakeWidget ({ 11, 146}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_NEVERENDING_MARKETING, STR_CHEAT_NEVERENDING_MARKETING_TIP), // never ending marketing campaigns
MakeWidget ({ 11, 163}, {281, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORCE_PARK_RATING ), // Force park rating
MakeSpinnerWidgets({156, 161}, { 81, 14}, WindowWidgetType::Spinner, WindowColour::Secondary ), // park rating (3 widgets)
MakeWidget ({ 11, 181}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_WIN_SCENARIO ), // Win scenario
MakeWidget ({127, 181}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_HAVE_FUN ), // Have fun!

MakeWidget ({ 5, 207}, {238, 50}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_WEATHER_GROUP ), // Weather group
MakeWidget ({126, 221}, {111, 14}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, STR_NONE, STR_CHANGE_WEATHER_TOOLTIP ), // Force weather
MakeWidget ({225, 222}, { 11, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_CHANGE_WEATHER_TOOLTIP ), // Force weather
MakeWidget ({ 11, 239}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_FREEZE_WEATHER, STR_CHEAT_FREEZE_WEATHER_TIP ), // Freeze weather

MakeWidget ({ 5, 257}, {238, 99}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_MAINTENANCE_GROUP ), // Maintenance group
MakeWidget ({ 11, 271}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_REMOVE_LITTER ), // Remove litter
MakeWidget ({127, 271}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_FIX_VANDALISM ), // Fix vandalism
MakeWidget ({ 11, 292}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_CLEAR_GRASS ), // Clear grass
MakeWidget ({127, 292}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_MOWED_GRASS ), // Mowed grass
MakeWidget ({ 11, 313}, CHEAT_BUTTON, WindowWidgetType::Button, WindowColour::Secondary, STR_CHEAT_WATER_PLANTS ), // Water plants
MakeWidget ({ 11, 334}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_PLANT_AGING, STR_CHEAT_DISABLE_PLANT_AGING_TIP ), // Disable plant ageing

MakeWidget ({ 5, 357}, {238, 35}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_STAFF_GROUP ), // Staff group
MakeWidget ({126, 371}, {111, 14}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Staff speed
MakeWidget ({225, 372}, { 11, 12}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), // Staff speed

MakeWidget ({ 5, 392}, {238, 56}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_CONSTRUCTION ), // Construction group
MakeWidget ({ 11, 407}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ALLOW_PATH_AS_QUEUE, STR_CHEAT_ALLOW_PATH_AS_QUEUE_TIP ), // Allow regular footpaths as queue path
Expand Down Expand Up @@ -911,6 +913,9 @@ static StringId window_cheats_page_titles[] = {
case WIDX_OWN_ALL_LAND:
CheatsSet(CheatType::OwnAllLand);
break;
case WIDX_REMOVE_PARK_FENCES:
CheatsSet(CheatType::RemoveParkFences);
break;
case WIDX_NEVERENDING_MARKETING:
CheatsSet(CheatType::NeverEndingMarketing, !gameState.Cheats.NeverendingMarketing);
break;
Expand Down
10 changes: 0 additions & 10 deletions src/openrct2/interface/InteractiveConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1408,15 +1408,6 @@ static int32_t ConsoleCommandRemoveFloatingObjects(InteractiveConsole& console,
return 0;
}

static int32_t ConsoleCommandRemoveParkFences(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv)
{
auto action = CheatSetAction(CheatType::RemoveParkFences);
GameActions::Execute(&action);

console.WriteFormatLine("Park fences have been removed.");
return 0;
}

static int32_t ConsoleCommandShowLimits(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv)
{
const auto& tileElements = GetTileElements();
Expand Down Expand Up @@ -2027,7 +2018,6 @@ static constexpr ConsoleCommand console_command_table[] = {
{ "object_count", ConsoleCommandCountObjects, "Shows the number of objects of each type in the scenario.", "object_count" },
{ "open", ConsoleCommandOpen, "Opens the window with the give name.", "open <window>." },
{ "quit", ConsoleCommandClose, "Closes the console.", "quit" },
{ "remove_park_fences", ConsoleCommandRemoveParkFences, "Removes all park fences from the surface", "remove_park_fences" },
{ "remove_unused_objects", ConsoleCommandRemoveUnusedObjects, "Removes all the unused objects from the object selection.",
"remove_unused_objects" },
{ "remove_floating_objects", ConsoleCommandRemoveFloatingObjects, "Removes floating objects", "remove_floating_objects" },
Expand Down

0 comments on commit 9b3e1bc

Please sign in to comment.