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

Method IsAvailable

src/newgrf_object.cpp:97–101  ·  view source on GitHub ↗

* Check whether the object is available at this time. * @return true if it is available. */

Source from the content-addressed store, hash-verified

95 * @return true if it is available.
96 */
97bool ObjectSpec::IsAvailable() const
98{
99 return this->WasEverAvailable() &&
100 (TimerGameCalendar::date < this->end_of_life_date || this->end_of_life_date < this->introduction_date + 365);
101}
102
103/**
104 * Gets the index of this spec.

Callers 7

CmdBuildObjectFunction · 0.45
BuildAirportWindowMethod · 0.45
DrawWidgetMethod · 0.45
OnClickMethod · 0.45
IsTypeAvailableMethod · 0.45
IsValidAirportTypeMethod · 0.45

Calls 1

WasEverAvailableMethod · 0.95

Tested by

no test coverage detected