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

Function grepMap

source/utility/map_grep.cpp:55–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void grepMap(SearchParameters const& search, String file) {
56 auto map = make_shared<TMXMap>(Json::parseJson(File::readFileString(file)));
57
58 for (auto tileLayer : map->tileLayers())
59 grepTileLayer(search, map, tileLayer, [&](String const& tileName, Vec2I const& pos) {
60 coutf("{}: {}: {} @ {}\n", file, tileLayer->name(), tileName, pos);
61 });
62
63 for (auto objectGroup : map->objectGroups())
64 grepObjectGroup(search, objectGroup, [&](String const& tileName, Vec2I const& pos) {
65 coutf("{}: {}: {} @ {}\n", file, objectGroup->name(), tileName, pos);
66 });
67}
68
69void grepDirectory(SearchParameters const& search, String directory) {
70 for (pair<String, bool> entry : File::dirList(directory)) {

Callers 2

grepDirectoryFunction · 0.85
grepPathFunction · 0.85

Calls 4

grepTileLayerFunction · 0.85
coutfFunction · 0.85
grepObjectGroupFunction · 0.85
nameMethod · 0.45

Tested by

no test coverage detected