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

Method containsTile

library/modules/Buildings.cpp:872–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870}
871
872bool Buildings::containsTile(df::building *bld, df::coord2d tile) {
873 CHECK_NULL_POINTER(bld);
874
875 if (!bld->isExtentShaped() || !bld->room.extents) {
876 if (tile.x < bld->x1 || tile.x > bld->x2 || tile.y < bld->y1 || tile.y > bld->y2)
877 return false;
878 }
879
880 if (!bld->room.extents)
881 return true;
882
883 df::building_extents_type *etile = getExtentTile(bld->room, tile);
884 return etile && *etile;
885}
886
887bool Buildings::hasSupport(df::coord pos, df::coord2d size)
888{

Callers

nothing calls this directly

Calls 1

getExtentTileFunction · 0.85

Tested by

no test coverage detected