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

Function add_markers

plugins/blueprint.cpp:256–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256static const char * add_markers(const df::coord &pos, const char *sym) {
257 if (!sym)
258 return NULL;
259
260 string str;
261 if (auto occ = Maps::getTileOccupancy(pos); occ && occ->bits.dig_marked)
262 str += "mb";
263
264 auto block = Maps::getTileBlock(pos);
265 if (auto warm_mask = World::getPersistentTilemask(warm_config, block); warm_mask && warm_mask->getassignment(pos))
266 str += "mw";
267 if (auto damp_mask = World::getPersistentTilemask(damp_config, block); damp_mask && damp_mask->getassignment(pos))
268 str += "md";
269
270 if (str.size()) {
271 str += sym;
272 return cache(str);
273 }
274
275 return sym;
276}
277
278static const char * get_tile_dig_default(const df::coord &pos, df::tiletype *tt) {
279 switch (tileShape(*tt)) {

Callers 1

get_tile_digFunction · 0.85

Calls 4

getTileOccupancyFunction · 0.85
getTileBlockFunction · 0.85
cacheFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected