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

Function get_pathability_groups

plugins/pathable.cpp:158–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158static bool get_pathability_groups(color_ostream &out, unordered_set<uint16_t> * depot_pathability_groups,
159 const unordered_set<df::coord> & depot_coords)
160{
161 CHECK_NULL_POINTER(depot_pathability_groups);
162
163 for (auto pos : depot_coords) {
164 auto wgroup = Maps::getWalkableGroup(pos);
165 if (wgroup) {
166 DEBUG(log,out).print("walkability group at ({}, {}, {}) is {}\n", pos.x, pos.y, pos.z, wgroup);
167 depot_pathability_groups->emplace(wgroup);
168 }
169 }
170 return !depot_pathability_groups->empty();
171}
172
173// if entry_tiles is given, it is filled with the surface edge tiles that match one of the given
174// depot pathability groups. If entry_tiles is NULL, just returns true if such a tile is found.

Callers 2

Calls 2

printMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected