MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / IsEverAvailable

Method IsEverAvailable

src/newgrf_object.cpp:78–82  ·  view source on GitHub ↗

* Check whether the object might be available at some point in this game with the current game mode. * @return true if it might be available. */

Source from the content-addressed store, hash-verified

76 * @return true if it might be available.
77 */
78bool ObjectSpec::IsEverAvailable() const
79{
80 return this->IsEnabled() && this->climate.Test(_settings_game.game_creation.landscape) &&
81 !this->flags.Test((_game_mode != GM_EDITOR && !_generating_world) ? ObjectFlag::OnlyInScenedit : ObjectFlag::OnlyInGame);
82}
83
84/**
85 * Check whether the object was available at some point in the past or present in this game with the current game mode.

Callers 8

WasEverAvailableMethod · 0.95
IsActiveMethod · 0.80
GetTypeNameMethod · 0.80
GetTypeBadgesMethod · 0.80
FillUsedItemsMethod · 0.80
IsUIAvailableMethod · 0.80
IsValidObjectTypeMethod · 0.80
ScriptObjectTypeListMethod · 0.80

Calls 2

IsEnabledMethod · 0.95
TestMethod · 0.80

Tested by

no test coverage detected