mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 14:54:30 +01:00
Rename CheatSetAction to fit naming pattern
This commit is contained in:
committed by
Gymnasiast
parent
32dd535044
commit
f8ab17749d
@@ -16,13 +16,13 @@
|
||||
#include "../PlatformEnvironment.h"
|
||||
#include "../ReplayManager.h"
|
||||
#include "../Version.h"
|
||||
#include "../actions/CheatSetAction.h"
|
||||
#include "../actions/ClimateSetAction.h"
|
||||
#include "../actions/ParkSetParameterAction.h"
|
||||
#include "../actions/RideFreezeRatingAction.h"
|
||||
#include "../actions/RideSetPriceAction.h"
|
||||
#include "../actions/RideSetSettingAction.h"
|
||||
#include "../actions/ScenarioSetSettingAction.h"
|
||||
#include "../actions/SetCheatAction.h"
|
||||
#include "../actions/StaffSetCostumeAction.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../core/Console.hpp"
|
||||
@@ -764,14 +764,14 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
||||
money32 money = ToMoney64FromGBP(double_val[0]);
|
||||
if (gCash != money)
|
||||
{
|
||||
auto setCheatAction = SetCheatAction(CheatType::SetMoney, money);
|
||||
setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
auto cheatSetAction = CheatSetAction(CheatType::SetMoney, money);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
if (res->Error != GameActions::Status::Ok)
|
||||
console.WriteLineError("set money command failed, likely due to permissions.");
|
||||
else
|
||||
console.Execute("get money");
|
||||
});
|
||||
GameActions::Execute(&setCheatAction);
|
||||
GameActions::Execute(&cheatSetAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -938,14 +938,14 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
||||
}
|
||||
else if (argv[0] == "no_money" && invalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
auto setCheatAction = SetCheatAction(CheatType::NoMoney, int_val[0] != 0);
|
||||
setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
auto cheatSetAction = CheatSetAction(CheatType::NoMoney, int_val[0] != 0);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
if (res->Error != GameActions::Status::Ok)
|
||||
console.WriteLineError("set no_money command failed, likely due to permissions.");
|
||||
else
|
||||
console.Execute("get no_money");
|
||||
});
|
||||
GameActions::Execute(&setCheatAction);
|
||||
GameActions::Execute(&cheatSetAction);
|
||||
}
|
||||
else if (argv[0] == "difficult_park_rating" && invalidArguments(&invalidArgs, int_valid[0]))
|
||||
{
|
||||
@@ -1094,14 +1094,14 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
||||
{
|
||||
if (gCheatsSandboxMode != (int_val[0] != 0))
|
||||
{
|
||||
auto setCheatAction = SetCheatAction(CheatType::SandboxMode, int_val[0] != 0);
|
||||
setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
auto cheatSetAction = CheatSetAction(CheatType::SandboxMode, int_val[0] != 0);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
if (res->Error != GameActions::Status::Ok)
|
||||
console.WriteLineError("Network error: Permission denied!");
|
||||
else
|
||||
console.Execute("get cheat_sandbox_mode");
|
||||
});
|
||||
GameActions::Execute(&setCheatAction);
|
||||
GameActions::Execute(&cheatSetAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1112,14 +1112,14 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
||||
{
|
||||
if (gCheatsDisableClearanceChecks != (int_val[0] != 0))
|
||||
{
|
||||
auto setCheatAction = SetCheatAction(CheatType::DisableClearanceChecks, int_val[0] != 0);
|
||||
setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
auto cheatSetAction = CheatSetAction(CheatType::DisableClearanceChecks, int_val[0] != 0);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
if (res->Error != GameActions::Status::Ok)
|
||||
console.WriteLineError("Network error: Permission denied!");
|
||||
else
|
||||
console.Execute("get cheat_disable_clearance_checks");
|
||||
});
|
||||
GameActions::Execute(&setCheatAction);
|
||||
GameActions::Execute(&cheatSetAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1130,14 +1130,14 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv)
|
||||
{
|
||||
if (gCheatsDisableSupportLimits != (int_val[0] != 0))
|
||||
{
|
||||
auto setCheatAction = SetCheatAction(CheatType::DisableSupportLimits, int_val[0] != 0);
|
||||
setCheatAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
auto cheatSetAction = CheatSetAction(CheatType::DisableSupportLimits, int_val[0] != 0);
|
||||
cheatSetAction.SetCallback([&console](const GameAction*, const GameActions::Result* res) {
|
||||
if (res->Error != GameActions::Status::Ok)
|
||||
console.WriteLineError("Network error: Permission denied!");
|
||||
else
|
||||
console.Execute("get cheat_disable_support_limits");
|
||||
});
|
||||
GameActions::Execute(&setCheatAction);
|
||||
GameActions::Execute(&cheatSetAction);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user