| 1281 | |
| 1282 | |
| 1283 | ToolResult Micropolis::waterTool(short x, short y, ToolEffects *effects) |
| 1284 | { |
| 1285 | if (!testBounds(x, y)) { |
| 1286 | return TOOLRESULT_FAILED; |
| 1287 | } |
| 1288 | |
| 1289 | ToolResult result = bulldozerTool(x, y, effects); |
| 1290 | |
| 1291 | if (result == TOOLRESULT_OK) { |
| 1292 | result = putDownWater(x, y, effects); |
| 1293 | } |
| 1294 | |
| 1295 | if (result == TOOLRESULT_OK) { |
| 1296 | /* send 'didtool' message */ |
| 1297 | FrontendMessage *didToolMsg; |
| 1298 | didToolMsg = new FrontendMessageDidTool("Water", x, y); |
| 1299 | effects->addFrontendMessage(didToolMsg); |
| 1300 | } |
| 1301 | |
| 1302 | return result; |
| 1303 | } |
| 1304 | |
| 1305 | |
| 1306 | ToolResult Micropolis::landTool(short x, short y, ToolEffects *effects) |
nothing calls this directly
no test coverage detected