MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / grepObjectGroup

Function grepObjectGroup

source/utility/map_grep.cpp:48–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void grepObjectGroup(SearchParameters const& search, TMXObjectGroupPtr objectGroup, MatchReporter callback) {
49 for (auto object : objectGroup->objects()) {
50 if (auto tileName = matchTile(search, object->tile()))
51 callback(*tileName, object->pos());
52 }
53}
54
55void grepMap(SearchParameters const& search, String file) {
56 auto map = make_shared<TMXMap>(Json::parseJson(File::readFileString(file)));

Callers 1

grepMapFunction · 0.85

Calls 3

matchTileFunction · 0.85
objectsMethod · 0.45
posMethod · 0.45

Tested by

no test coverage detected