Belts built after a tick reset join the network; pin tick in golden renders
A world started after a long session kept the old nextPowerBuild, so new belts were never added until a reload. Treat a wait longer than 6 ticks as stale. The golden test pins tick now that t45 animates belts from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cj2RPXdPykKMEz5BXXczsj
This commit is contained in:
@@ -47,7 +47,8 @@ function fanBlow(mm, sat) {
|
||||
function machinesTick() {
|
||||
procBlocksTick();
|
||||
rackTick();
|
||||
if (powerDirty && tick >= nextPowerBuild) { rebuildPower(); nextPowerBuild = tick + 6; }
|
||||
// A new or loaded world restarts the tick count, so a wait longer than 6 ticks is stale.
|
||||
if (powerDirty && (tick >= nextPowerBuild || nextPowerBuild > tick + 6)) { rebuildPower(); nextPowerBuild = tick + 6; }
|
||||
if (brokenMachines.length) {
|
||||
const ids = brokenMachines; brokenMachines = [];
|
||||
for (const id of ids) if (machines[id]) removeMachine(id, false, true);
|
||||
|
||||
Reference in New Issue
Block a user