| 1144 | } |
| 1145 | |
| 1146 | int 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 | |
| 1171 | void GeoBlock::place_tiles(float threshold, int16_t new_material, df::inclusion_type itype) |
| 1172 | { |