From 69d7488b8b018390877bceaed5288cf64e99cee8 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Sat, 1 Feb 2025 17:30:20 +0100 Subject: [PATCH] Drop climate variable from in-game console --- src/openrct2/interface/InteractiveConsole.cpp | 45 ------------------- 1 file changed, 45 deletions(-) diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 5aafff73fd..e9b25e2eb0 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -19,7 +19,6 @@ #include "../ReplayManager.h" #include "../Version.h" #include "../actions/CheatSetAction.h" -#include "../actions/ClimateSetAction.h" #include "../actions/GameSetSpeedAction.h" #include "../actions/ParkSetDateAction.h" #include "../actions/ParkSetParameterAction.h" @@ -89,13 +88,6 @@ using namespace OpenRCT2; using arguments_t = std::vector; using OpenRCT2::Date; -static constexpr const char* kClimateNames[] = { - "cool_and_wet", - "warm", - "hot_and_dry", - "cold", -}; - static int32_t ConsoleParseInt(const std::string& src, bool* valid); static double ConsoleParseDouble(const std::string& src, bool* valid); @@ -674,11 +666,6 @@ static void ConsoleCommandGet(InteractiveConsole& console, const arguments_t& ar { console.WriteFormatLine("park_open %d", (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) != 0); } - else if (argv[0] == "climate") - { - console.WriteFormatLine( - "climate %s (%d)", kClimateNames[EnumValue(gameState.Climate)], EnumValue(gameState.Climate)); - } else if (argv[0] == "game_speed") { console.WriteFormatLine("game_speed %d", gGameSpeed); @@ -913,37 +900,6 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar console, varName, ScenarioSetSetting::CostToBuyConstructionRights, std::clamp(ToMoney64FromGBP(double_val[0]), 0.00_GBP, 200.00_GBP)); } - else if (varName == "climate") - { - uint8_t newClimate = static_cast(ClimateType::Count); - invalidArgs = true; - - if (int_valid[0]) - { - newClimate = static_cast(int_val[0]); - invalidArgs = false; - } - else - { - for (newClimate = 0; newClimate < static_cast(ClimateType::Count); newClimate++) - { - if (argv[1] == kClimateNames[newClimate]) - { - invalidArgs = false; - break; - } - } - } - - if (invalidArgs) - { - console.WriteLine(LanguageGetString(STR_INVALID_CLIMATE_ID)); - } - else - { - ConsoleSetVariableAction(console, varName, ClimateType{ newClimate }); - } - } else if (varName == "game_speed" && InvalidArguments(&invalidArgs, int_valid[0])) { ConsoleSetVariableAction(console, varName, std::clamp(int_val[0], 1, 8)); @@ -1794,7 +1750,6 @@ static constexpr const utf8* console_variable_table[] = { "land_rights_cost", "construction_rights_cost", "park_open", - "climate", "game_speed", "console_small_font", "location",