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

Function get_max_ground_z

plugins/aquifer.cpp:118–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118static int get_max_ground_z(color_ostream &out, const df::coord &pos1, const df::coord &pos2)
119{
120 int maxz = -1;
121 for_block(pos1.z, pos2.z, pos1, pos2, [&](const df::coord &pos){
122 if (maxz < pos.z && is_rough_natural_wall(pos))
123 maxz = pos.z;
124 }, [&](df::map_block *block){
125 return maxz < block->map_pos.z;
126 });
127 return maxz;
128}
129
130static int get_max_aq_z(color_ostream &out, const df::coord &pos1, const df::coord &pos2)
131{

Callers 1

get_z_rangeFunction · 0.85

Calls 2

for_blockFunction · 0.85
is_rough_natural_wallFunction · 0.85

Tested by

no test coverage detected