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

Method setAssignedBlockTile

library/modules/Burrows.cpp:260–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260bool Burrows::setAssignedBlockTile(df::burrow *burrow, df::map_block *block, df::coord2d tile, bool enable)
261{
262 CHECK_NULL_POINTER(burrow);
263
264 if (!block) return false;
265
266 auto mask = getBlockMask(burrow, block, enable);
267
268 if (mask)
269 {
270 mask->setassignment(tile & 15, enable);
271
272 if (!enable && !mask->has_assignments())
273 deleteBlockMask(burrow, block, mask);
274 }
275
276 return true;
277}

Callers

nothing calls this directly

Calls 1

deleteBlockMaskFunction · 0.85

Tested by

no test coverage detected