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

Function isSkyBlock

plugins/3dveins.cpp:685–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683}
684
685static bool isSkyBlock(Block *b)
686{
687 for (int x = 0; x < 16; x++)
688 {
689 for (int y = 0; y < 16; y++)
690 {
691 df::coord2d tile(x,y);
692 auto dsgn = b->DesignationAt(tile);
693 auto ttype = b->baseTiletypeAt(tile);
694
695 if (dsgn.bits.subterranean || !dsgn.bits.light || !isTransientMaterial(ttype))
696 return false;
697 }
698 }
699
700 return true;
701}
702
703static int findTopBlock(MapCache &map, int x, int y)
704{

Callers 1

findTopBlockFunction · 0.85

Calls 1

isTransientMaterialFunction · 0.85

Tested by

no test coverage detected