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

Method ParseBasemats

library/modules/MapCache.cpp:643–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641}
642
643void MapExtras::Block::ParseBasemats(TileInfo *tiles, BasematInfo *bmats)
644{
645 BlockInfo info;
646
647 info.prepare(this);
648
649 COPY(bmats->veinmat, info.veinmats);
650 COPY(bmats->veintype, info.veintype);
651
652 for (int x = 0; x < 16; x++)
653 {
654 for (int y = 0; y < 16; y++)
655 {
656 using namespace df::enums::tiletype_material;
657
658 auto tt = tiles->base_tiles[x][y];
659 auto mat = info.getBaseMaterial(tt, df::coord2d(x,y));
660
661 bmats->set_base_mat(tiles, df::coord2d(x,y), mat.mat_type, mat.mat_index);
662 }
663 }
664}
665
666void MapExtras::Block::BasematInfo::set_base_mat(TileInfo *tiles, df::coord2d pos, int16_t type, int16_t idx)
667{

Callers

nothing calls this directly

Calls 3

prepareMethod · 0.80
getBaseMaterialMethod · 0.80
set_base_matMethod · 0.80

Tested by

no test coverage detected