#pragma once struct FactoryState; class Hasher; // Folds every building, construction site, deconstruction entry and tile claim into the // hasher in deterministic order (docs/replay_design.md). // // A free function over the state rather than a system method, for the reason the rest of // the read surface is one (FactoryQueries.h): fingerprinting the factory needs the data // and nothing else -- no config, no belts, no RNG -- so it should not be reachable only // through whichever system happens to tick that data. // // The order it folds in is load-bearing. Two runs of the same replay must fold identical // values in an identical sequence, so nothing here may be reordered, and any field added // to FactoryState that the simulation reads must be appended at the end rather than // inserted (docs/replay_design.md, DeterminismTest). void appendChecksum(const FactoryState& state, Hasher& hasher);