mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 20:54:08 +01:00
Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. (#13436)
This commit is contained in:
@@ -24,10 +24,10 @@ public:
|
||||
*/
|
||||
enum LandscapeType {
|
||||
/* Note: these values represent part of the in-game LandscapeType enum */
|
||||
LT_TEMPERATE = ::LT_TEMPERATE, ///< Temperate climate.
|
||||
LT_ARCTIC = ::LT_ARCTIC, ///< Arctic climate.
|
||||
LT_TROPIC = ::LT_TROPIC, ///< Tropic climate.
|
||||
LT_TOYLAND = ::LT_TOYLAND, ///< Toyland climate.
|
||||
LT_TEMPERATE = to_underlying(::LandscapeType::Temperate), ///< Temperate climate.
|
||||
LT_ARCTIC = to_underlying(::LandscapeType::Arctic), ///< Arctic climate.
|
||||
LT_TROPIC = to_underlying(::LandscapeType::Tropic), ///< Tropic climate.
|
||||
LT_TOYLAND = to_underlying(::LandscapeType::Toyland), ///< Toyland climate.
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
{
|
||||
if (!IsValidIndustryType(industry_type)) return false;
|
||||
|
||||
if (_settings_game.game_creation.landscape != LT_TEMPERATE) return true;
|
||||
if (_settings_game.game_creation.landscape != LandscapeType::Temperate) return true;
|
||||
return (::GetIndustrySpec(industry_type)->behaviour & INDUSTRYBEH_DONT_INCR_PROD) == 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user