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

Function get_z_range

plugins/aquifer.cpp:142–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142static void get_z_range(color_ostream &out, int & minz, int & maxz, const df::coord & pos1,
143 const df::coord & pos2, int levels, bool top_is_aq = false, int skip_top = 0)
144{
145 DEBUG(log,out).print("get_z_range: top_is_aq={}, skip_top={}\n", top_is_aq, skip_top);
146
147 if (!top_is_aq)
148 maxz = get_max_ground_z(out, pos1, pos2) - skip_top;
149 else
150 maxz = get_max_aq_z(out, pos1, pos2) - skip_top;
151
152 minz = std::max((int)pos1.z, maxz - levels + 1);
153
154 DEBUG(log,out).print("calculated z range: minz={}, maxz={}\n", minz, maxz);
155}
156
157static void aquifer_list(color_ostream &out, df::coord pos1, df::coord pos2, int levels, bool leaky) {
158 DEBUG(log,out).print("entering aquifer_list: pos1={}, pos2={}, levels={}, leaky={}\n",

Callers 1

aquifer_listFunction · 0.85

Calls 3

get_max_ground_zFunction · 0.85
get_max_aq_zFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected