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

Function get_tile_smooth_with_engravings

plugins/blueprint.cpp:408–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408static const char * get_tile_smooth_with_engravings(color_ostream &out, const df::coord &pos, const tile_context &tc) {
409 const char * smooth_minimal = get_tile_smooth_minimal(out, pos, tc);
410 if (smooth_minimal)
411 return smooth_minimal;
412
413 if (dig_job_cache.contains(pos) &&
414 (dig_job_cache[pos]->job_type == df::job_type::DetailFloor ||
415 dig_job_cache[pos]->job_type == df::job_type::DetailWall))
416 return "s";
417
418 if (auto td = Maps::getTileDesignation(pos); td && td->bits.smooth == 2)
419 return "s";
420
421 auto tt = Maps::getTileType(pos);
422 if (!tt)
423 return NULL;
424
425 switch (tileShape(*tt))
426 {
427 case tiletype_shape::FLOOR:
428 case tiletype_shape::WALL:
429 if (tileSpecial(*tt) == tiletype_special::SMOOTH &&
430 engravings_cache.count(pos))
431 return "s";
432 break;
433 default:
434 break;
435 }
436
437 return NULL;
438}
439
440static const char * get_tile_smooth_all(color_ostream &out, const df::coord &pos, const tile_context &tc) {
441 const char * smooth_minimal = get_tile_smooth_minimal(out, pos, tc);

Callers

nothing calls this directly

Calls 7

get_tile_smooth_minimalFunction · 0.85
getTileDesignationFunction · 0.85
getTileTypeFunction · 0.85
tileShapeFunction · 0.85
tileSpecialFunction · 0.85
containsMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected