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

Method place_tiles

plugins/3dveins.cpp:1171–1187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1169}
1170
1171void GeoBlock::place_tiles(float threshold, int16_t new_material, df::inclusion_type itype)
1172{
1173 for (int x = 0; x < 16; x++)
1174 {
1175 if ((arena_mask & (1<<x)) == 0)
1176 continue;
1177
1178 for (int y = 0; y < 16; y++)
1179 {
1180 if (material[x][y] != arena_material || weight[x][y] < threshold)
1181 continue;
1182
1183 material[x][y] = new_material;
1184 veintype[x][y] = itype;
1185 }
1186 }
1187}
1188
1189static int measure(const std::vector<GeoBlock*> &arena, float threshold)
1190{

Callers 1

place_veinsMethod · 0.80

Calls 6

measureFunction · 0.85
prepare_arenaMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
rangeMethod · 0.45

Tested by

no test coverage detected