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

Method getGroundType

library/modules/MapCache.cpp:872–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870}
871
872BlockInfo::GroundType MapExtras::BlockInfo::getGroundType(int material)
873{
874 auto raw = df::inorganic_raw::find(material);
875 if (!raw)
876 return G_UNKNOWN;
877
878 if (raw->flags.is_set(inorganic_flags::SOIL_ANY))
879 return G_SOIL;
880
881 return G_STONE;
882}
883
884t_matpair MapExtras::BlockInfo::getBaseMaterial(df::tiletype tt, df::coord2d pos)
885{

Callers

nothing calls this directly

Calls 2

is_setMethod · 0.80
findFunction · 0.50

Tested by

no test coverage detected