mirror of https://github.com/OpenRCT2/OpenRCT2.git
Close #18744: Add cheat to allow regular path as queue
This commit is contained in:
parent
b67a80aaba
commit
db41864e22
|
@ -3639,6 +3639,8 @@ STR_6533 :{WINDOW_COLOUR_2}Excitement Factor: {BLACK}-{COMMA16}%
|
|||
STR_6534 :{WINDOW_COLOUR_2}Intensity Factor: {BLACK}-{COMMA16}%
|
||||
STR_6535 :{WINDOW_COLOUR_2}Nausea Factor: {BLACK}-{COMMA16}%
|
||||
STR_6536 :This park was saved in a later version of OpenRCT2. The park was saved in v{INT32}, you are currently on v{INT32}.
|
||||
STR_6537 :Allow using regular paths as queue
|
||||
STR_6538 :Shows regular paths in the queues dropdown of the Footpaths window.
|
||||
|
||||
#############
|
||||
# Scenarios #
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
0.4.4 (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#18744] Cheat to allow using a regular path as a queue path.
|
||||
- Improved: [#18826] [Plugin] Added all actions and their documentation to plugin API.
|
||||
|
||||
0.4.3 (2022-12-14)
|
||||
|
|
|
@ -3032,6 +3032,7 @@ declare global {
|
|||
sandboxMode: boolean;
|
||||
showAllOperatingModes: boolean;
|
||||
showVehiclesFromOtherTrackTypes: boolean;
|
||||
allowRegularPathAsQueue: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -149,6 +149,8 @@ enum WindowCheatsWidgetIdx
|
|||
WIDX_STAFF_GROUP,
|
||||
WIDX_STAFF_SPEED,
|
||||
WIDX_STAFF_SPEED_DROPDOWN_BUTTON,
|
||||
WIDX_PARK_CONSTRUCTION_GROUP,
|
||||
WIDX_ALLOW_REGULAR_PATH_AS_QUEUE,
|
||||
|
||||
WIDX_FIX_ALL = WIDX_TAB_CONTENT,
|
||||
WIDX_RENEW_RIDES,
|
||||
|
@ -282,6 +284,10 @@ static rct_widget window_cheats_misc_widgets[] =
|
|||
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, 392}, {238, 35}, 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
|
||||
|
||||
WIDGETS_END,
|
||||
};
|
||||
static rct_widget window_cheats_rides_widgets[] =
|
||||
|
@ -297,13 +303,13 @@ 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, 122}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_OPERATION ), // Construction group
|
||||
MakeWidget({ 5, 221}, {238, 122}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_OPERATION ), // Operation 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({ 5, 347}, {238, 101}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_AVAILABILITY ), // Construction group
|
||||
MakeWidget({ 5, 347}, {238, 101}, WindowWidgetType::Groupbox, WindowColour::Secondary, STR_CHEAT_GROUP_AVAILABILITY ), // Availability 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
|
||||
|
@ -475,6 +481,7 @@ public:
|
|||
SetCheckboxValue(WIDX_FREEZE_WEATHER, gCheatsFreezeWeather);
|
||||
SetCheckboxValue(WIDX_NEVERENDING_MARKETING, gCheatsNeverendingMarketing);
|
||||
SetCheckboxValue(WIDX_DISABLE_PLANT_AGING, gCheatsDisablePlantAging);
|
||||
SetCheckboxValue(WIDX_ALLOW_REGULAR_PATH_AS_QUEUE, gCheatsAllowRegularPathAsQueue);
|
||||
break;
|
||||
case WINDOW_CHEATS_PAGE_RIDES:
|
||||
SetCheckboxValue(WIDX_UNLOCK_OPERATING_LIMITS, gCheatsUnlockOperatingLimits);
|
||||
|
@ -896,6 +903,9 @@ private:
|
|||
CheatsSet(CheatType::SetForcedParkRating, _parkRatingSpinnerValue);
|
||||
}
|
||||
break;
|
||||
case WIDX_ALLOW_REGULAR_PATH_AS_QUEUE:
|
||||
CheatsSet(CheatType::AllowRegularPathAsQueue, !gCheatsAllowRegularPathAsQueue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -652,10 +652,18 @@ private:
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if (showQueues != ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0))
|
||||
// If regular paths can be used as queue, only hide the path if we’re _not_ looking at a queue,
|
||||
// but the path surface is one.
|
||||
if (gCheatsAllowRegularPathAsQueue && !showQueues && ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// If the cheat is disabled, hide queues from the regular path view and vice versa.
|
||||
else if (!gCheatsAllowRegularPathAsQueue && showQueues != ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (gFootpathSelection.LegacyPath == OBJECT_ENTRY_INDEX_NULL
|
||||
&& i == (showQueues ? gFootpathSelection.QueueSurface : gFootpathSelection.NormalSurface))
|
||||
{
|
||||
|
|
|
@ -52,6 +52,7 @@ bool gCheatsDisableRideValueAging = false;
|
|||
bool gCheatsIgnoreResearchStatus = false;
|
||||
bool gCheatsEnableAllDrawableTrackPieces = false;
|
||||
bool gCheatsAllowTrackPlaceInvalidHeights = false;
|
||||
bool gCheatsAllowRegularPathAsQueue = false;
|
||||
|
||||
void CheatsReset()
|
||||
{
|
||||
|
@ -77,6 +78,7 @@ void CheatsReset()
|
|||
gCheatsIgnoreResearchStatus = false;
|
||||
gCheatsEnableAllDrawableTrackPieces = false;
|
||||
gCheatsAllowTrackPlaceInvalidHeights = false;
|
||||
gCheatsAllowRegularPathAsQueue = false;
|
||||
}
|
||||
|
||||
void CheatsSet(CheatType cheatType, int32_t param1 /* = 0*/, int32_t param2 /* = 0*/)
|
||||
|
@ -125,6 +127,7 @@ 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::AllowRegularPathAsQueue, gCheatsAllowRegularPathAsQueue, count);
|
||||
|
||||
// Remember current position and update count.
|
||||
uint64_t endOffset = stream.GetPosition();
|
||||
|
@ -217,6 +220,9 @@ void CheatsSerialise(DataSerialiser& ds)
|
|||
case CheatType::NoCapOnQueueLengthDummy:
|
||||
ds << dummyBool;
|
||||
break;
|
||||
case CheatType::AllowRegularPathAsQueue:
|
||||
ds << gCheatsAllowRegularPathAsQueue;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -320,6 +326,8 @@ 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::AllowRegularPathAsQueue:
|
||||
return language_get_string(STR_CHEAT_ALLOW_PATH_AS_QUEUE);
|
||||
default:
|
||||
return "Unknown Cheat";
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ extern bool gCheatsAllowArbitraryRideTypeChanges;
|
|||
extern bool gCheatsIgnoreResearchStatus;
|
||||
extern bool gCheatsEnableAllDrawableTrackPieces;
|
||||
extern bool gCheatsAllowTrackPlaceInvalidHeights;
|
||||
extern bool gCheatsAllowRegularPathAsQueue;
|
||||
|
||||
enum class CheatType : int32_t
|
||||
{
|
||||
|
@ -86,6 +87,7 @@ enum class CheatType : int32_t
|
|||
RemoveDucks,
|
||||
AllowTrackPlaceInvalidHeights,
|
||||
NoCapOnQueueLengthDummy, // Removed; this dummy exists only for deserialisation parks that had it saved
|
||||
AllowRegularPathAsQueue,
|
||||
Count,
|
||||
};
|
||||
|
||||
|
|
|
@ -240,6 +240,9 @@ GameActions::Result SetCheatAction::Execute() const
|
|||
case CheatType::AllowTrackPlaceInvalidHeights:
|
||||
gCheatsAllowTrackPlaceInvalidHeights = _param1 != 0;
|
||||
break;
|
||||
case CheatType::AllowRegularPathAsQueue:
|
||||
gCheatsAllowRegularPathAsQueue = _param1 != 0;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
log_error("Unabled cheat: %d", _cheatType.id);
|
||||
|
@ -305,6 +308,8 @@ ParametersRange SetCheatAction::GetParameterRange(CheatType cheatType) const
|
|||
[[fallthrough]];
|
||||
case CheatType::EnableAllDrawableTrackPieces:
|
||||
[[fallthrough]];
|
||||
case CheatType::AllowRegularPathAsQueue:
|
||||
[[fallthrough]];
|
||||
case CheatType::OpenClosePark:
|
||||
return { { 0, 1 }, { 0, 0 } };
|
||||
case CheatType::AddMoney:
|
||||
|
|
|
@ -3928,6 +3928,9 @@ enum : uint16_t
|
|||
|
||||
STR_ERROR_PARK_VERSION_TOO_NEW_MESSAGE_2 = 6536,
|
||||
|
||||
STR_CHEAT_ALLOW_PATH_AS_QUEUE = 6537,
|
||||
STR_CHEAT_ALLOW_PATH_AS_QUEUE_TIP = 6538,
|
||||
|
||||
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
|
||||
/* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings
|
||||
};
|
||||
|
|
|
@ -40,6 +40,8 @@ namespace OpenRCT2::Scripting
|
|||
ctx, &ScCheats::disableLittering_get, &ScCheats::disableLittering_set, "disableLittering");
|
||||
dukglue_register_property(
|
||||
ctx, &ScCheats::disablePlantAging_get, &ScCheats::disablePlantAging_set, "disablePlantAging");
|
||||
dukglue_register_property(
|
||||
ctx, &ScCheats::allowRegularPathAsQueue_get, &ScCheats::allowRegularPathAsQueue_set, "allowRegularPathAsQueue");
|
||||
dukglue_register_property(
|
||||
ctx, &ScCheats::disableRideValueAging_get, &ScCheats::disableRideValueAging_set, "disableRideValueAging");
|
||||
dukglue_register_property(
|
||||
|
@ -159,6 +161,17 @@ namespace OpenRCT2::Scripting
|
|||
gCheatsDisablePlantAging = value;
|
||||
}
|
||||
|
||||
bool allowRegularPathAsQueue_get()
|
||||
{
|
||||
return gCheatsAllowRegularPathAsQueue;
|
||||
}
|
||||
|
||||
void allowRegularPathAsQueue_set(bool value)
|
||||
{
|
||||
ThrowIfGameStateNotMutable();
|
||||
gCheatsAllowRegularPathAsQueue = value;
|
||||
}
|
||||
|
||||
bool disableRideValueAging_get()
|
||||
{
|
||||
return gCheatsDisableRideValueAging;
|
||||
|
|
Loading…
Reference in New Issue