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

Method getBlockTileBiomeRgn

library/modules/Maps.cpp:947–962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

945}
946
947df::coord2d Maps::getBlockTileBiomeRgn(df::map_block *block, df::coord2d pos)
948{
949 if (!block || !world->world_data)
950 return df::coord2d();
951
952 auto des = index_tile(block->designation,pos);
953 unsigned idx = des.bits.biome;
954 if (idx < 9)
955 {
956 idx = block->region_offset[idx];
957 if (idx < 9)
958 return getBiomeRgnPos(block->region_pos, idx);
959 }
960
961 return df::coord2d();
962}
963
964/*
965* Layer geology

Callers

nothing calls this directly

Calls 2

index_tileFunction · 0.85
getBiomeRgnPosFunction · 0.85

Tested by

no test coverage detected