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

Function GetLocalFeature

library/modules/Maps.cpp:537–550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537bool GetLocalFeature(t_feature &feature, df::coord2d rgn_pos, int32_t index)
538{
539 feature.type = (df::feature_type)-1;
540
541 auto f = Maps::getLocalInitFeature(rgn_pos, index);
542 if (!f)
543 return false;
544
545 feature.discovered = false;
546 feature.origin = f;
547 feature.type = f->getType();
548 f->getMaterial(&feature.main_material, &feature.sub_material);
549 return true;
550}
551
552inline bool ReadFeaturesInline(int32_t x, int32_t y, int32_t z, t_feature *local, t_feature *global)
553{

Callers 2

ReadFeaturesMethod · 0.85
GetLocalFeatureMethod · 0.85

Calls 1

getTypeMethod · 0.80

Tested by

no test coverage detected