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

Function HasRailTypeAvail

src/rail.cpp:68–71  ·  view source on GitHub ↗

* Finds out if a company has a certain buildable railtype available. * @param company the company in question * @param railtype requested RailType * @return true if company has requested RailType available */

Source from the content-addressed store, hash-verified

66 * @return true if company has requested RailType available
67 */
68bool HasRailTypeAvail(const CompanyID company, const RailType railtype)
69{
70 return !_railtypes_hidden_mask.Test(railtype) && Company::Get(company)->avail_railtypes.Test(railtype);
71}
72
73/**
74 * Test if any buildable railtype is available for a company.

Callers 4

ValParamRailTypeFunction · 0.85
SetDefaultRailGuiFunction · 0.85
ScriptRailTypeListMethod · 0.85
IsRailTypeAvailableMethod · 0.85

Calls 1

TestMethod · 0.80

Tested by

no test coverage detected