Skip to main content
Verticopolis engineGitHub

Module build

Module build 

Source
Expand description

Placing and selling: Simulation::build for floors, lobbies and rooms, Simulation::build_transport for elevators, stairs and escalators, and Simulation::sell_at. Each build has a dry run (Simulation::can_build, Simulation::can_build_transport) that answers with the same refusal and the full price, for a placement ghost.

A refused command changes nothing and says why in a sentence a player can read. A placed one charges the money, logs the purchase and emits its gameplay events.

Structs§

BuildResult
What a build did.
CanBuild
The answer to a dry run: what the build would do, and its price.

Functions§

pays_for_floor
Whether a tile of kind placed where there is no floor yet also pays for the floor it lays. A lobby does, as in the original: a bare lobby tile costs the lobby’s price plus the floor’s, and a lobby over a floor tile the lobby’s price alone. The catalog publishes this as paysForFloor.