MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / update

Method update

src/OpenLoco/src/World/Industry.cpp:151–169  ·  view source on GitHub ↗

0x00453275

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 3

hasFlagsFunction · 0.70
currentMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected