Log inGet started
Package

productionKit.package

README.md

sim (productionKit)

The rules of production as pure data in and data out: local Sim = require("productionKit.sim"). Sim.step(works, dt) advances every building (recipes that start by taking inputs and stop as "starved" when they cannot, or "full" when the town has no room for the output; queues that finish jobs in order; storage that raises limits) and returns what happened; Sim.catchUp runs a long stretch for offline earnings and sums it up; Sim.enqueue / Sim.cancel move a queue's goods; Sim.cap, Sim.rates, Sim.cycleTime read limits and speeds. Touches nothing in the engine, so the works, the tests and a game's own previews all run the same rules.