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

Function get_tile_smooth_all

plugins/blueprint.cpp:440–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);
442 if (smooth_minimal)
443 return smooth_minimal;
444
445 if (dig_job_cache.contains(pos) &&
446 (dig_job_cache[pos]->job_type == df::job_type::SmoothFloor ||
447 dig_job_cache[pos]->job_type == df::job_type::SmoothWall))
448 return "s";
449
450 if (auto td = Maps::getTileDesignation(pos); td && td->bits.smooth == 1)
451 return "s";
452
453 df::tiletype *tt = Maps::getTileType(pos);
454 if (!tt)
455 return NULL;
456
457 switch (tileShape(*tt))
458 {
459 case tiletype_shape::FLOOR:
460 case tiletype_shape::WALL:
461 if (tileSpecial(*tt) == tiletype_special::SMOOTH)
462 return "s";
463 break;
464 default:
465 break;
466 }
467
468 return NULL;
469}
470
471static bool has_track_designation(df::tile_occupancy occ) {
472 static const uint32_t track_mask = occ.mask_carve_track_north | occ.mask_carve_track_south

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected