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

Function GetTileDesc_Industry

src/industry_cmd.cpp:472–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472static void GetTileDesc_Industry(TileIndex tile, TileDesc &td)
473{
474 const Industry *i = Industry::GetByTile(tile);
475 const IndustrySpec *is = GetIndustrySpec(i->type);
476
477 td.owner[0] = i->owner;
478 td.str = is->name;
479 if (!IsIndustryCompleted(tile)) {
480 td.dparam = td.str;
481 td.str = STR_LAI_TOWN_INDUSTRY_DESCRIPTION_UNDER_CONSTRUCTION;
482 }
483
484 if (is->grf_prop.HasGrfFile()) {
485 td.grf = GetGRFConfig(is->grf_prop.grfid)->GetName();
486 }
487}
488
489static CommandCost ClearTile_Industry(TileIndex tile, DoCommandFlags flags)
490{

Callers

nothing calls this directly

Calls 5

GetIndustrySpecFunction · 0.85
IsIndustryCompletedFunction · 0.85
GetGRFConfigFunction · 0.85
HasGrfFileMethod · 0.80
GetNameMethod · 0.45

Tested by

no test coverage detected