0x00453275
| 149 | |
| 150 | // 0x00453275 |
| 151 | void Industry::update() |
| 152 | { |
| 153 | // Maybe worthwhile returning early if the industry does not use farm tiles |
| 154 | if (!hasFlags(IndustryFlags::isGhost) && under_construction == 0xFF) |
| 155 | { |
| 156 | // Run tile loop for 100 iterations every tick; whole 384x384 map scans in 1475 ticks/15 days/37 seconds |
| 157 | for (int i = 0; i < 100; i++) |
| 158 | { |
| 159 | isFarmTileProducing(tileLoop.current()); |
| 160 | |
| 161 | // loc_453318 |
| 162 | if (tileLoop.next() == Pos2()) |
| 163 | { |
| 164 | calculateFarmProduction(); |
| 165 | break; |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | // 0x004534BD |
| 172 | void Industry::updateDaily() |