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

Function checkBuildingTiles

library/modules/Buildings.cpp:837–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837static bool checkBuildingTiles(df::building *bld, bool can_change,
838 bool force_extents = false)
839{
840 auto psize = Buildings::getSize(bld);
841
842 if (force_extents && !bld->room.extents)
843 {
844 // populate the room structure if it's not set already
845 init_extents(bld->room, psize.first, psize.second);
846 }
847
848 return Buildings::checkFreeTiles(psize.first, psize.second, bld,
849 can_change && bld->isExtentShaped(),
850 !bld->isSettingOccupancy(),
851 bld->getType() ==
852 df::building_type::Civzone,
853 !bld->isActual());
854}
855
856int Buildings::countExtentTiles(df::building *bld, int defval)
857{

Callers 3

setSizeMethod · 0.85
constructAbstractMethod · 0.85
linkForConstructFunction · 0.85

Calls 2

init_extentsFunction · 0.85
getTypeMethod · 0.80

Tested by

no test coverage detected