Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. (#13436)

This commit is contained in:
Peter Nelson
2025-02-01 23:09:18 +00:00
committed by GitHub
parent 9ff485b329
commit 59354576d4
49 changed files with 521 additions and 503 deletions

View File

@@ -73,7 +73,7 @@ size_t ObjectSpec::Count()
*/
bool ObjectSpec::IsEverAvailable() const
{
return this->IsEnabled() && HasBit(this->climate, _settings_game.game_creation.landscape) &&
return this->IsEnabled() && this->climate.Test(_settings_game.game_creation.landscape) &&
(this->flags & ((_game_mode != GM_EDITOR && !_generating_world) ? OBJECT_FLAG_ONLY_IN_SCENEDIT : OBJECT_FLAG_ONLY_IN_GAME)) == 0;
}