MCPcopy Create free account
hub / github.com/SimHacker/micropolis / waterTool

Method waterTool

MicropolisCore/src/MicropolisEngine/src/tool.cpp:1283–1303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1281
1282
1283ToolResult 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
1306ToolResult Micropolis::landTool(short x, short y, ToolEffects *effects)

Callers

nothing calls this directly

Calls 2

testBoundsFunction · 0.85
addFrontendMessageMethod · 0.80

Tested by

no test coverage detected