Skip to main content

Module road

Module road 

Source
Expand description

Roads: planning a road’s cells, BuildRoad, CompleteRoad and taking a planned road back. See docs/ROADS.md.

A planned cell gets its road kind at once and a BuildRoad work (a builder’s, mask 0x2000); the builder clears what lies on it, brings a stone for a stone road, works it four seconds and the cell becomes road. Clearing a road (a building’s ClearArea or Remove Roads’ marker) lays it back to ground the same way.

Original: FUN_1400a1e30, FUN_1400ea020, FUN_1400cad20, FUN_1400a1b10, FUN_1400a1bd0.

Structs§

RoadWork
BuildRoad’s state: its builder, the material a cell takes (stone roads), the cell, the cell type it becomes, the cell’s road kind, byte and type before (restored when the plan is taken back).

Constants§

BUILDING
The bit of a road kind that says the road is being built.
GROUND
The cell type a cleared road goes back to.
NONE
No road, and while a road is being built / once it is.