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

Function HasAnyRailTypesAvail

src/rail.cpp:78–83  ·  view source on GitHub ↗

* Test if any buildable railtype is available for a company. * @param company the company in question * @return true if company has any RailTypes available */

Source from the content-addressed store, hash-verified

76 * @return true if company has any RailTypes available
77 */
78bool HasAnyRailTypesAvail(const CompanyID company)
79{
80 RailTypes avail = Company::Get(company)->avail_railtypes;
81 avail.Reset(_railtypes_hidden_mask);
82 return avail.Any();
83}
84
85/**
86 * Validate functions for rail building.

Callers 1

Calls 2

AnyMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected