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

Method GetConstructionCost

src/industry_cmd.cpp:3203–3208  ·  view source on GitHub ↗

* Get the cost for constructing this industry * @return the cost (inflation corrected etc) */

Source from the content-addressed store, hash-verified

3201 * @return the cost (inflation corrected etc)
3202 */
3203Money IndustrySpec::GetConstructionCost() const
3204{
3205 /* Building raw industries like secondary uses different price base */
3206 return (_price[(_settings_game.construction.raw_industry_construction == 1 && this->IsRawIndustry()) ?
3207 PR_BUILD_INDUSTRY_RAW : PR_BUILD_INDUSTRY] * this->cost_multiplier) >> 8;
3208}
3209
3210/**
3211 * Get the cost for removing this industry

Callers 2

CmdBuildIndustryFunction · 0.45
DrawWidgetMethod · 0.45

Calls 1

IsRawIndustryMethod · 0.95

Tested by

no test coverage detected