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

Function computeMaterialAmount

library/modules/Buildings.cpp:911–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

909}
910
911static int computeMaterialAmount(df::building *bld)
912{
913 auto size = Buildings::getSize(bld).second;
914 int cnt = size.x * size.y;
915
916 if (bld->room.extents && bld->isExtentShaped())
917 cnt = Buildings::countExtentTiles(bld, cnt);
918
919 return cnt/4 + 1;
920}
921
922bool Buildings::setSize(df::building *bld, df::coord2d size, int direction)
923{

Callers 2

setSizeMethod · 0.85
constructWithFiltersMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected