0x0045329B
| 409 | |
| 410 | // 0x0045329B |
| 411 | void Industry::isFarmTileProducing(const Pos2& pos) |
| 412 | { |
| 413 | const auto& surface = TileManager::get(pos).surface(); |
| 414 | if (surface != nullptr) |
| 415 | { |
| 416 | if (surface->isIndustrial()) |
| 417 | { |
| 418 | if (surface->industryId() == id()) |
| 419 | { |
| 420 | uint8_t growthStage = surface->getGrowthStage(); |
| 421 | const auto* obj = getObject(); |
| 422 | if (growthStage == 0 || growthStage != obj->farmTileGrowthStageNoProduction) |
| 423 | { |
| 424 | // loc_4532E5 |
| 425 | numFarmTiles++; |
| 426 | if ((!obj->hasFlags(IndustryObjectFlags::farmProductionIgnoresSnow) && surface->snowCoverage() != 0) || findTree(surface)) |
| 427 | { |
| 428 | numIdleFarmTiles++; |
| 429 | } |
| 430 | } |
| 431 | } |
| 432 | } |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | void Industry::calculateFarmProduction() |
| 437 | { |
nothing calls this directly
no test coverage detected