MCPcopy Create free account
hub / github.com/DFHack/dfhack / setTileAquifer

Method setTileAquifer

library/modules/Maps.cpp:1409–1425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1407}
1408
1409bool Maps::setTileAquifer(int32_t x, int32_t y, int32_t z, bool heavy) {
1410 df::map_block *block = Maps::getTileBlock(x, y ,z);
1411 if (!block)
1412 return false;
1413
1414 auto des = Maps::getTileDesignation(x, y, z);
1415 des->bits.water_table = true;
1416 if (Maps::isTileHeavyAquifer(x, y, z) != heavy) {
1417 auto occ = Maps::getTileOccupancy(x, y, z);
1418 occ->bits.heavy_aquifer = heavy;
1419 }
1420 block->flags.bits.has_aquifer = true;
1421 block->flags.bits.check_aquifer = true;
1422 block->flags.bits.update_liquid = true;
1423 block->flags.bits.update_liquid_twice = true;
1424 return true;
1425}
1426
1427int Maps::setAreaAquifer(df::coord pos1, df::coord pos2, bool heavy, std::function<bool(df::coord, df::map_block *)> filter) {
1428 int totalAffectedCount = 0;

Callers

nothing calls this directly

Calls 4

getTileBlockFunction · 0.85
getTileDesignationFunction · 0.85
isTileHeavyAquiferFunction · 0.85
getTileOccupancyFunction · 0.85

Tested by

no test coverage detected