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

Function GetIndustrySpec

src/industry_cmd.cpp:126–130  ·  view source on GitHub ↗

* Accessor for array _industry_specs. * This will ensure at once : proper access and * not allowing modifications of it. * @param thistype of industry (which is the index in _industry_specs) * @pre thistype < NUM_INDUSTRYTYPES * @return a pointer to the corresponding industry spec */

Source from the content-addressed store, hash-verified

124 * @return a pointer to the corresponding industry spec
125 */
126const IndustrySpec *GetIndustrySpec(IndustryType thistype)
127{
128 assert(thistype < NUM_INDUSTRYTYPES);
129 return &_industry_specs[thistype];
130}
131
132/**
133 * Accessor for array _industry_tile_specs.

Callers 15

~IndustryMethod · 0.85
GetTileDesc_IndustryFunction · 0.85
ClearTile_IndustryFunction · 0.85
TransportIndustryGoodsFunction · 0.85
IsTileForestIndustryFunction · 0.85
ProduceIndustryGoodsFunction · 0.85
CheckIfIndustryIsAllowedFunction · 0.85
AdvertiseIndustryOpeningFunction · 0.85
DoCreateNewIndustryFunction · 0.85
CreateNewIndustryHelperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected