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

Function get_tile_carve

plugins/blueprint.cpp:540–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540static const char * get_tile_carve(color_ostream &out, const df::coord &pos, const tile_context &tc) {
541 const char * tile_carve_minimal = get_tile_carve_minimal(out, pos, tc);
542 if (tile_carve_minimal)
543 return tile_carve_minimal;
544
545 if (dig_job_cache.contains(pos) &&
546 (dig_job_cache[pos]->job_type == df::job_type::DetailFloor ||
547 dig_job_cache[pos]->job_type == df::job_type::DetailWall))
548 return "e";
549
550 if (auto td = Maps::getTileDesignation(pos); td && td->bits.smooth == 2)
551 return "e";
552
553 df::tiletype *tt = Maps::getTileType(pos);
554 if (!tt)
555 return NULL;
556
557 switch (tileShape(*tt))
558 {
559 case tiletype_shape::FLOOR:
560 case tiletype_shape::WALL:
561 if (tileSpecial(*tt) == tiletype_special::SMOOTH &&
562 engravings_cache.count(pos))
563 return "e";
564 break;
565 default:
566 break;
567 }
568
569 return NULL;
570}
571
572static const char * get_construction_str(df::building *b) {
573 df::building_constructionst *cons =

Callers

nothing calls this directly

Calls 7

get_tile_carve_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