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

Method measure_placement

plugins/3dveins.cpp:1146–1169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1144}
1145
1146int GeoBlock::measure_placement(float threshold)
1147{
1148 if (!arena_unmined)
1149 return 0;
1150
1151 int count = 0;
1152
1153 for (int x = 0; x < 16; x++)
1154 {
1155 if ((arena_unmined & (1<<x)) == 0)
1156 continue;
1157
1158 for (int y = 0; y < 16; y++)
1159 {
1160 if (material[x][y] != arena_material || weight[x][y] < threshold)
1161 continue;
1162
1163 if (unmined.getassignment(x,y))
1164 count++;
1165 }
1166 }
1167
1168 return count;
1169}
1170
1171void GeoBlock::place_tiles(float threshold, int16_t new_material, df::inclusion_type itype)
1172{

Callers 1

measureFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected