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

Function getUnitsInBox

library/include/modules/Units.h:189–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187DFHACK_EXPORT bool getUnitsInBox(std::vector<df::unit *> &units, const cuboid &box,
188 std::function<bool(df::unit *)> filter = [](df::unit *u) { return true; });
189DFHACK_EXPORT inline bool getUnitsInBox(std::vector<df::unit *> &units, int16_t x1, int16_t y1, int16_t z1,
190 int16_t x2, int16_t y2, int16_t z2, std::function<bool(df::unit *)> filter = [](df::unit *u) { return true; })
191 { return getUnitsInBox(units, cuboid(x1, y1, z1, x2, y2, z2), filter); }
192DFHACK_EXPORT inline bool getUnitsInBox(std::vector<df::unit *> &units, df::coord pos1, df::coord pos2,
193 std::function<bool(df::unit *)> filter = [](df::unit *u) { return true; })
194 { return getUnitsInBox(units, cuboid(pos1, pos2), filter); }

Callers 4

units_getUnitsInBoxFunction · 0.85
fix_tileFunction · 0.85
post_process_dug_tilesFunction · 0.85
NewReportEventFunction · 0.85

Calls 1

cuboidClass · 0.85

Tested by

no test coverage detected