* Build a building. * @param x Horizontal position of center tile of the new building. * @param y Vertical position of center tile of the new building. * @param buildingProps Building properties of the building being constructed. * @param effects Storage of effects of putting down the building. * @return Tool result. */
| 1201 | * @return Tool result. |
| 1202 | */ |
| 1203 | ToolResult Micropolis::buildBuildingTool(short x, short y, |
| 1204 | const BuildingProperties *buildingProps, |
| 1205 | ToolEffects *effects) |
| 1206 | { |
| 1207 | ToolResult result = buildBuilding(x, y, buildingProps, effects); |
| 1208 | |
| 1209 | if (result == TOOLRESULT_OK) { |
| 1210 | /* send 'didtool' message */ |
| 1211 | FrontendMessage *didToolMsg; |
| 1212 | didToolMsg = new FrontendMessageDidTool(buildingProps->toolName, x, y); |
| 1213 | effects->addFrontendMessage(didToolMsg); |
| 1214 | } |
| 1215 | |
| 1216 | return result; |
| 1217 | } |
| 1218 | |
| 1219 | /** Building properties of a residential zone. */ |
| 1220 | static const BuildingProperties residentialZoneBuilding = |
nothing calls this directly
no test coverage detected