Skip to content

Commit

Permalink
Merge pull request #16925
Browse files Browse the repository at this point in the history
  • Loading branch information
Broxzier committed Apr 5, 2022
2 parents fbf355c + 791b3ad commit ddffa9e
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 92 deletions.
3 changes: 1 addition & 2 deletions data/language/en-GB.txt
Expand Up @@ -3676,8 +3676,7 @@ STR_6484 :See-Through vegetation toggle
STR_6485 :See-Through vehicles toggle
STR_6486 :See-Through guests toggle
STR_6487 :See-Through staff toggle
STR_6488 :Remove queue line cap
STR_6489 :This cheat removes the normal cap of 1000 peeps on ride queue lines
STR_6488 :{RED}Guests are complaining about the length of the queues in your park.{NEWLINE}Consider shortening problematic queues, or increase the ride鈥檚 throughput.

#############
# Scenarios #
Expand Down
2 changes: 1 addition & 1 deletion distribution/changelog.txt
Expand Up @@ -23,7 +23,6 @@
- Feature: [#16806] Parkobj can load sprites from RCT image archives.
- Feature: [#16831] Allow ternary colours for small and large scenery objects.
- Feature: [#16872] [Plugin] Add support for custom images.
- Feature: [#16855] Added new cheat to remove the cap on queue lengths.
- Improved: [#3517] Cheats are now saved with the park.
- Improved: [#10150] Ride stations are now properly checked if they鈥檙e sheltered.
- Improved: [#10664, #16072] Visibility status can be modified directly in the Tile Inspector's list.
Expand All @@ -36,6 +35,7 @@
- Improved: [#16408] Improve --version cli option to report more compatibility information.
- Improved: [#16740] Allow staff patrol areas to be defined with individual tiles rather than groups of 4x4.
- Improved: [#16764] [Plugin] Add hook 'map.save', called before the map is about is saved.
- Improved: [#16925] The queue length of 1000 guests is lifted, and a warning for too long queues is added instead.
- Change: [#14484] Make the Heartline Twister coaster ratings a little bit less hateful.
- Change: [#16077] When importing SV6 files, the RCT1 land types are only added when they were actually used.
- Change: [#16424] Following an entity in the title sequence no longer toggles underground view when it's underground.
Expand Down
18 changes: 6 additions & 12 deletions src/openrct2-ui/windows/Cheats.cpp
Expand Up @@ -166,7 +166,6 @@ enum WindowCheatsWidgetIdx
WIDX_DISABLE_BRAKES_FAILURE,
WIDX_DISABLE_ALL_BREAKDOWNS,
WIDX_DISABLE_RIDE_VALUE_AGING,
WIDX_NO_CAP_ON_QUEUE_LENGTH,
WIDX_TRACK_PIECES_GROUP,
WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES,
WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES,
Expand Down Expand Up @@ -298,18 +297,17 @@ static rct_widget window_cheats_rides_widgets[] =
MakeWidget({ 11, 153}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES, STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES_TIP ), // Show all drawable track pieces
MakeWidget({ 11, 174}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK, STR_CHEAT_ENABLE_CHAIN_LIFT_ON_ALL_TRACK_TIP ), // Enable chain lift on all track
MakeWidget({ 11, 195}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS, STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS_TIP), // Allow track place at invalid heights
MakeWidget({ 5, 221}, {238, 143}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_OPERATION ), // Operation group
MakeWidget({ 5, 221}, {238, 122}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_OPERATION ), // Construction group
MakeWidget({ 11, 237}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_SHOW_ALL_OPERATING_MODES ), // Show all operating modes
MakeWidget({ 11, 258}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_UNLOCK_OPERATING_LIMITS, STR_CHEAT_UNLOCK_OPERATING_LIMITS_TIP ), // 410 km/h lift hill etc.
MakeWidget({ 11, 279}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_BRAKES_FAILURE, STR_CHEAT_DISABLE_BRAKES_FAILURE_TIP ), // Disable brakes failure
MakeWidget({ 11, 300}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_BREAKDOWNS, STR_CHEAT_DISABLE_BREAKDOWNS_TIP ), // Disable all breakdowns
MakeWidget({ 11, 321}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_RIDE_VALUE_AGING, STR_CHEAT_DISABLE_RIDE_VALUE_AGING_TIP ), // Disable ride ageing
MakeWidget({ 11, 342}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_NO_CAP_ON_QUEUE_LENGTH, STR_CHEAT_NO_CAP_ON_QUEUE_LENGTH_TOOLTIP ), // No cap on ride queue lengths
MakeWidget({ 5, 368}, {238, 101}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_AVAILABILITY ), // Availability group
MakeWidget({ 11, 384}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES, STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES_TIP), // Allow arbitrary ride type changes
MakeWidget({ 11, 405}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES ), // Show vehicles from other track types
MakeWidget({ 11, 426}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT, STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT_TIP ), // Disable train length limits
MakeWidget({ 11, 447}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_IGNORE_RESEARCH_STATUS, STR_CHEAT_IGNORE_RESEARCH_STATUS_TIP ), // Ignore Research Status
MakeWidget({ 5, 347}, {238, 101}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_AVAILABILITY ), // Construction group
MakeWidget({ 11, 363}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES, STR_CHEAT_ALLOW_ARBITRARY_RIDE_TYPE_CHANGES_TIP), // Allow arbitrary ride type changes
MakeWidget({ 11, 384}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES ), // Show vehicles from other track types
MakeWidget({ 11, 405}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT, STR_CHEAT_DISABLE_TRAIN_LENGTH_LIMIT_TIP ), // Disable train length limits
MakeWidget({ 11, 426}, CHEAT_CHECK, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_CHEAT_IGNORE_RESEARCH_STATUS, STR_CHEAT_IGNORE_RESEARCH_STATUS_TIP ), // Ignore Research Status
WIDGETS_END,
};

Expand Down Expand Up @@ -492,7 +490,6 @@ class CheatsWindow final : public Window
SetCheckboxValue(WIDX_IGNORE_RESEARCH_STATUS, gCheatsIgnoreResearchStatus);
SetCheckboxValue(WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES, gCheatsEnableAllDrawableTrackPieces);
SetCheckboxValue(WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS, gCheatsAllowTrackPlaceInvalidHeights);
SetCheckboxValue(WIDX_NO_CAP_ON_QUEUE_LENGTH, gCheatsNoCapOnQueueLength);
break;
}

Expand Down Expand Up @@ -1085,9 +1082,6 @@ class CheatsWindow final : public Window
case WIDX_DISABLE_RIDE_VALUE_AGING:
CheatsSet(CheatType::DisableRideValueAging, !gCheatsDisableRideValueAging);
break;
case WIDX_NO_CAP_ON_QUEUE_LENGTH:
CheatsSet(CheatType::NoCapOnQueueLength, !gCheatsNoCapOnQueueLength);
break;
case WIDX_IGNORE_RESEARCH_STATUS:
CheatsSet(CheatType::IgnoreResearchStatus, !gCheatsIgnoreResearchStatus);
break;
Expand Down
11 changes: 4 additions & 7 deletions src/openrct2/Cheats.cpp
Expand Up @@ -52,7 +52,6 @@ bool gCheatsDisableRideValueAging = false;
bool gCheatsIgnoreResearchStatus = false;
bool gCheatsEnableAllDrawableTrackPieces = false;
bool gCheatsAllowTrackPlaceInvalidHeights = false;
bool gCheatsNoCapOnQueueLength = false;

void CheatsReset()
{
Expand All @@ -78,7 +77,6 @@ void CheatsReset()
gCheatsIgnoreResearchStatus = false;
gCheatsEnableAllDrawableTrackPieces = false;
gCheatsAllowTrackPlaceInvalidHeights = false;
gCheatsNoCapOnQueueLength = false;
}

void CheatsSet(CheatType cheatType, int32_t param1 /* = 0*/, int32_t param2 /* = 0*/)
Expand Down Expand Up @@ -127,7 +125,6 @@ void CheatsSerialise(DataSerialiser& ds)
CheatEntrySerialise(ds, CheatType::IgnoreResearchStatus, gCheatsIgnoreResearchStatus, count);
CheatEntrySerialise(ds, CheatType::EnableAllDrawableTrackPieces, gCheatsEnableAllDrawableTrackPieces, count);
CheatEntrySerialise(ds, CheatType::AllowTrackPlaceInvalidHeights, gCheatsAllowTrackPlaceInvalidHeights, count);
CheatEntrySerialise(ds, CheatType::NoCapOnQueueLength, gCheatsNoCapOnQueueLength, count);

// Remember current position and update count.
uint64_t endOffset = stream.GetPosition();
Expand All @@ -147,6 +144,8 @@ void CheatsSerialise(DataSerialiser& ds)
int32_t type = 0;
ds << type;

static bool dummyBool;

switch (static_cast<CheatType>(type))
{
case CheatType::SandboxMode:
Expand Down Expand Up @@ -215,8 +214,8 @@ void CheatsSerialise(DataSerialiser& ds)
case CheatType::AllowTrackPlaceInvalidHeights:
ds << gCheatsAllowTrackPlaceInvalidHeights;
break;
case CheatType::NoCapOnQueueLength:
ds << gCheatsNoCapOnQueueLength;
case CheatType::NoCapOnQueueLengthDummy:
ds << dummyBool;
break;
default:
break;
Expand Down Expand Up @@ -321,8 +320,6 @@ const char* CheatsGetName(CheatType cheatType)
return language_get_string(STR_CHEAT_ENABLE_ALL_DRAWABLE_TRACK_PIECES);
case CheatType::AllowTrackPlaceInvalidHeights:
return language_get_string(STR_CHEAT_ALLOW_TRACK_PLACE_INVALID_HEIGHTS);
case CheatType::NoCapOnQueueLength:
return language_get_string(STR_CHEAT_NO_CAP_ON_QUEUE_LENGTH);
default:
return "Unknown Cheat";
}
Expand Down
3 changes: 1 addition & 2 deletions src/openrct2/Cheats.h
Expand Up @@ -33,7 +33,6 @@ extern bool gCheatsAllowArbitraryRideTypeChanges;
extern bool gCheatsIgnoreResearchStatus;
extern bool gCheatsEnableAllDrawableTrackPieces;
extern bool gCheatsAllowTrackPlaceInvalidHeights;
extern bool gCheatsNoCapOnQueueLength;

enum class CheatType : int32_t
{
Expand Down Expand Up @@ -86,7 +85,7 @@ enum class CheatType : int32_t
CreateDucks,
RemoveDucks,
AllowTrackPlaceInvalidHeights,
NoCapOnQueueLength,
NoCapOnQueueLengthDummy, // Removed; this dummy exists only for deserialisation parks that had it saved
Count,
};

Expand Down
5 changes: 0 additions & 5 deletions src/openrct2/actions/SetCheatAction.cpp
Expand Up @@ -240,9 +240,6 @@ GameActions::Result SetCheatAction::Execute() const
case CheatType::AllowTrackPlaceInvalidHeights:
gCheatsAllowTrackPlaceInvalidHeights = _param1 != 0;
break;
case CheatType::NoCapOnQueueLength:
gCheatsNoCapOnQueueLength = _param1 != 0;
break;
default:
{
log_error("Unabled cheat: %d", _cheatType.id);
Expand Down Expand Up @@ -308,8 +305,6 @@ ParametersRange SetCheatAction::GetParameterRange(CheatType cheatType) const
[[fallthrough]];
case CheatType::EnableAllDrawableTrackPieces:
[[fallthrough]];
case CheatType::NoCapOnQueueLength:
[[fallthrough]];
case CheatType::OpenClosePark:
return { { 0, 1 }, { 0, 0 } };
case CheatType::AddMoney:
Expand Down
6 changes: 0 additions & 6 deletions src/openrct2/entity/Guest.cpp
Expand Up @@ -1947,12 +1947,6 @@ bool Guest::ShouldGoOnRide(Ride* ride, StationIndex entranceNum, bool atQueue, b
if (peepAtRide)
{
auto& station = ride->GetStation(entranceNum);
// Peeps won't join a queue that has 1000 peeps already in it.
if (station.QueueLength >= MAX_RIDE_QUEUE_LENGTH && !gCheatsNoCapOnQueueLength)
{
peep_tried_to_enter_full_queue(this, ride);
return false;
}

// Rides without queues can only have one peep waiting at a time.
if (!atQueue)
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/entity/Guest.h
Expand Up @@ -25,6 +25,7 @@
#define PEEP_VANDALISM_WARNING_THRESHOLD 15
#define PEEP_NOEXIT_WARNING_THRESHOLD 8
#define PEEP_LOST_WARNING_THRESHOLD 8
#define PEEP_TOO_LONG_QUEUE_THRESHOLD 25

#define PEEP_MAX_HAPPINESS 255
#define PEEP_MAX_HUNGER 255
Expand Down

0 comments on commit ddffa9e

Please sign in to comment.