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

Method GetGlobalFeature

library/modules/Maps.cpp:497–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495}
496
497bool Maps::GetGlobalFeature(t_feature &feature, int32_t index)
498{
499 feature.type = (df::feature_type)-1;
500
501 auto f = Maps::getGlobalInitFeature(index);
502 if (!f)
503 return false;
504
505 feature.discovered = false;
506 feature.origin = f;
507 feature.type = f->getType();
508 f->getMaterial(&feature.main_material, &feature.sub_material);
509 return true;
510}
511
512df::feature_init *Maps::getLocalInitFeature(df::coord2d rgn_pos, int32_t index)
513{

Callers 1

map_prospectorFunction · 0.45

Calls 1

getTypeMethod · 0.80

Tested by 1

map_prospectorFunction · 0.36