five-on-it / packages/protocol/src/chaos
packages/protocol/src/chaos
The room's chaos (GAME_DESIGN §12, "Escape kit & chaos"): what every client is told of the city's big events the snapshots do not carry, sent to every player when it changes. The bascule bridges' raisings (the tick each leaf began to rise, by the server's clock, with the server's tick as it sent them: the client's prediction world takes them on its own clock, a leaf's angle a pure function of it and the tick), the petrol pumps (as they stand, burning, blown up), the billboards showing a wanted player's face (the placement, the player's client id), and the riots under way (where, how wide). The events a mission, the rules or a debug command set off are named by CHAOS_EVENTS.