diff --git a/src/openrct2/actions/ClimateSetAction.cpp b/src/openrct2/actions/ClimateSetAction.cpp deleted file mode 100644 index 960c499303..0000000000 --- a/src/openrct2/actions/ClimateSetAction.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014-2025 OpenRCT2 developers - * - * For a complete list of all authors, please refer to contributors.md - * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is licensed under the GNU General Public License version 3. - *****************************************************************************/ - -#include "ClimateSetAction.h" - -#include "../Diagnostic.h" -#include "../GameState.h" - -using namespace OpenRCT2; - -ClimateSetAction::ClimateSetAction(ClimateType climate) - : _climate(climate) -{ -} - -void ClimateSetAction::AcceptParameters(GameActionParameterVisitor& visitor) -{ - visitor.Visit("climate", _climate); -} - -uint16_t ClimateSetAction::GetActionFlags() const -{ - return GameAction::GetActionFlags(); -} - -void ClimateSetAction::Serialise(DataSerialiser& stream) -{ - GameAction::Serialise(stream); - - stream << DS_TAG(_climate); -} - -GameActions::Result ClimateSetAction::Query() const -{ - if (_climate >= ClimateType::Count) - { - LOG_ERROR("Invalid climate type %u", _climate); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_INVALID_CLIMATE_ID, STR_ERR_VALUE_OUT_OF_RANGE); - } - - return GameActions::Result(); -} - -GameActions::Result ClimateSetAction::Execute() const -{ - ClimateReset(); - - GfxInvalidateScreen(); - - return GameActions::Result(); -} diff --git a/src/openrct2/actions/ClimateSetAction.h b/src/openrct2/actions/ClimateSetAction.h deleted file mode 100644 index 049746b612..0000000000 --- a/src/openrct2/actions/ClimateSetAction.h +++ /dev/null @@ -1,31 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014-2025 OpenRCT2 developers - * - * For a complete list of all authors, please refer to contributors.md - * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is licensed under the GNU General Public License version 3. - *****************************************************************************/ - -#pragma once - -#include "../world/Climate.h" -#include "GameAction.h" - -class ClimateSetAction final : public GameActionBase -{ -private: - ClimateType _climate{}; - -public: - ClimateSetAction() = default; - ClimateSetAction(ClimateType climate); - - void AcceptParameters(GameActionParameterVisitor& visitor) override; - - uint16_t GetActionFlags() const override; - - void Serialise(DataSerialiser& stream) override; - OpenRCT2::GameActions::Result Query() const override; - OpenRCT2::GameActions::Result Execute() const override; -}; diff --git a/src/openrct2/actions/GameActionRegistry.cpp b/src/openrct2/actions/GameActionRegistry.cpp index 810c3a9a3a..8a566732df 100644 --- a/src/openrct2/actions/GameActionRegistry.cpp +++ b/src/openrct2/actions/GameActionRegistry.cpp @@ -15,7 +15,6 @@ #include "BannerSetStyleAction.h" #include "CheatSetAction.h" #include "ClearAction.h" -#include "ClimateSetAction.h" #include "CustomAction.h" #include "FootpathAdditionPlaceAction.h" #include "FootpathAdditionRemoveAction.h" @@ -136,7 +135,6 @@ namespace OpenRCT2::GameActions REGISTER_ACTION(BannerSetColourAction); REGISTER_ACTION(BannerSetNameAction); REGISTER_ACTION(BannerSetStyleAction); - REGISTER_ACTION(ClimateSetAction); REGISTER_ACTION(FootpathPlaceAction); REGISTER_ACTION(FootpathLayoutPlaceAction); REGISTER_ACTION(FootpathRemoveAction); diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 6e387fc8d8..0cc1a5d7a6 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -84,7 +84,6 @@ - @@ -662,7 +661,6 @@ - diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index f5c67aa9c6..741e4bbe92 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -864,7 +864,7 @@ namespace OpenRCT2 if (version < kClimateObjectsVersion) { // Legacy climate is converted elsewhere, so we can skip it here. - cs.Ignore(); + cs.Ignore(); } cs.ReadWrite(gameState.WeatherUpdateTimer); diff --git a/src/openrct2/world/Climate.h b/src/openrct2/world/Climate.h index 7c2e2ca40f..e68c5faa26 100644 --- a/src/openrct2/world/Climate.h +++ b/src/openrct2/world/Climate.h @@ -14,16 +14,6 @@ #include #include -// TODO: refactor usage and remove -enum class ClimateType : uint8_t -{ - CoolAndWet, - Warm, - HotAndDry, - Cold, - Count -}; - enum class WeatherType : uint8_t { Sunny,