works.module
README.md
works (productionKit)
The one authoritative machine that runs every building: productionKit.production starts it on the machine running economyKit's bank (the lowest peer). It owns the simulation, answers players' requests (queue, cancel, upgrade, pause) after checking they may use the building and can pay, charges and refunds money through the bank, pays what buildings earn into members' wallets, catches up the time nobody played (offline earnings, capped), keeps towns, buildings and members in the world's shared runtime data (where every machine and every late joiner reads them) and puts back any record someone else writes there. Everything outside it comes in through an env table, so the tests run it against a fake store, players and bank.