Logs on the belts

The factory stopped pretending: every log now travels the whole line.

Logs riding the belts, picked up by the cranes and cut into planks.

Until this week my factories were faking it. A factory worked out how many planks it could make a minute, and planks simply appeared in the output pile on a timer. The belts and the crane moved, but only for show. Nothing was actually on them.

That felt wrong the moment the crane started working. So I threw the timer out, and now every log is its own little thing in the game. It lies in the stockpile until a crane comes for it. The crane rides over, waits until there is something to grab, lowers its claw, lifts the log and carries it across. If there is no room on the other side, it just hangs there and waits. Put a crane in a silly spot and it waits forever, which is exactly what it should do.

On the belt the log rolls to the end and hops onto the next belt, keeping its distance from the one in front, like a queue at the bakery. When the end is blocked the whole line backs up, and a jammed belt stops moving. A second crane picks the log off the middle of the belt and drops it in the cutter’s hopper. The cutter takes one log at a time: one waiting in the hopper, one under the saw, one plank in the tray. The saw only spins while it is really cutting, and the plank waits in the tray until the last crane takes it to the output pile. Logs and planks got their own small models, so you can follow a single log all the way through. Only wood runs through a factory so far, but ore, coal, grain and the other goods already have their models waiting.

Watching that for the first time also showed me what was broken. Logs at the end of a belt looked like they were about to fall off, so they now stop a little earlier. Everything ran far too fast, so belts and cranes run at half speed for now; faster ones can come later as upgrades. The factory building was secretly still making planks by itself, skipping the machines. And one worker never showed up at the belt workshop at all. Its front corner was boxed in by the buildings next to it, so there was no way in. People can now walk into their own building from any open side, and the worker finally went to work.

A few smaller things came along the way. Removing something shows it as a red ghost first, and Escape now puts down the tool in your hand before it leaves the building. To test all this I added a console command that fills a stockpile, so I can watch a line run without waiting for haulers.