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

Function is_rough_natural_wall

plugins/aquifer.cpp:75–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static bool is_rough_natural_wall(int16_t x, int16_t y, int16_t z) {
76 df::tiletype *tt = Maps::getTileType(x, y, z);
77 if (!tt)
78 return false;
79
80 return tileShape(*tt) == df::tiletype_shape::WALL &&
81 (tileMaterial(*tt) == df::tiletype_material::STONE ||
82 tileMaterial(*tt) == df::tiletype_material::SOIL) &&
83 tileSpecial(*tt) != df::tiletype_special::SMOOTH;
84}
85
86static bool is_rough_natural_wall(const df::coord & pos) {
87 return is_rough_natural_wall(pos.x, pos.y, pos.z);

Callers 1

get_max_ground_zFunction · 0.85

Calls 4

getTileTypeFunction · 0.85
tileShapeFunction · 0.85
tileMaterialFunction · 0.85
tileSpecialFunction · 0.85

Tested by

no test coverage detected