mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 20:43:04 +01:00
Move cheats to struct in GameState_t
This commit is contained in:
@@ -211,7 +211,7 @@ static int32_t ConsoleCommandRides(InteractiveConsole& console, const arguments_
|
||||
auto res = SetOperatingSetting(RideId::FromUnderlying(ride_index), RideSetSetting::RideType, type);
|
||||
if (res == kMoney64Undefined)
|
||||
{
|
||||
if (!gCheatsAllowArbitraryRideTypeChanges)
|
||||
if (!GetGameState().Cheats.AllowArbitraryRideTypeChanges)
|
||||
{
|
||||
console.WriteFormatLine(
|
||||
"That didn't work. Try enabling the 'Allow arbitrary ride type changes' cheat");
|
||||
@@ -721,15 +721,15 @@ static int32_t ConsoleCommandGet(InteractiveConsole& console, const arguments_t&
|
||||
}
|
||||
else if (argv[0] == "cheat_sandbox_mode")
|
||||
{
|
||||
console.WriteFormatLine("cheat_sandbox_mode %d", gCheatsSandboxMode);
|
||||
console.WriteFormatLine("cheat_sandbox_mode %d", GetGameState().Cheats.SandboxMode);
|
||||
}
|
||||
else if (argv[0] == "cheat_disable_clearance_checks")
|
||||
{
|
||||
console.WriteFormatLine("cheat_disable_clearance_checks %d", gCheatsDisableClearanceChecks);
|
||||
console.WriteFormatLine("cheat_disable_clearance_checks %d", GetGameState().Cheats.DisableClearanceChecks);
|
||||
}
|
||||
else if (argv[0] == "cheat_disable_support_limits")
|
||||
{
|
||||
console.WriteFormatLine("cheat_disable_support_limits %d", gCheatsDisableSupportLimits);
|
||||
console.WriteFormatLine("cheat_disable_support_limits %d", GetGameState().Cheats.DisableSupportLimits);
|
||||
}
|
||||
else if (argv[0] == "current_rotation")
|
||||
{
|
||||
@@ -1111,7 +1111,7 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t&
|
||||
}
|
||||
else if (argv[0] == "cheat_sandbox_mode" && InvalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
if (gCheatsSandboxMode != (int_val[0] != 0))
|
||||
if (GetGameState().Cheats.SandboxMode != (int_val[0] != 0))
|
||||
{
|
||||
auto cheatSetAction = CheatSetAction(CheatType::SandboxMode, int_val[0] != 0);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
@@ -1129,7 +1129,7 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t&
|
||||
}
|
||||
else if (argv[0] == "cheat_disable_clearance_checks" && InvalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
if (gCheatsDisableClearanceChecks != (int_val[0] != 0))
|
||||
if (GetGameState().Cheats.DisableClearanceChecks != (int_val[0] != 0))
|
||||
{
|
||||
auto cheatSetAction = CheatSetAction(CheatType::DisableClearanceChecks, int_val[0] != 0);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
@@ -1147,7 +1147,7 @@ static int32_t ConsoleCommandSet(InteractiveConsole& console, const arguments_t&
|
||||
}
|
||||
else if (argv[0] == "cheat_disable_support_limits" && InvalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
if (gCheatsDisableSupportLimits != (int_val[0] != 0))
|
||||
if (GetGameState().Cheats.DisableSupportLimits != (int_val[0] != 0))
|
||||
{
|
||||
auto cheatSetAction = CheatSetAction(CheatType::DisableSupportLimits, int_val[0] != 0);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
|
||||
Reference in New Issue
Block a user