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

Function get_tile_smooth_minimal

plugins/blueprint.cpp:384–406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384static const char * get_tile_smooth_minimal(color_ostream &out, const df::coord &pos, const tile_context &) {
385 if (dig_job_cache.contains(pos) && dig_job_cache[pos]->job_type == df::job_type::CarveFortification)
386 return "s";
387
388 auto tt = Maps::getTileType(pos);
389 if (!tt)
390 return NULL;
391
392 // detect designated fortications
393 if (auto td = Maps::getTileDesignation(pos); td && td->bits.smooth == 1)
394 if (tileSpecial(*tt) == tiletype_special::SMOOTH)
395 return "s";
396
397 switch (tileShape(*tt))
398 {
399 case tiletype_shape::FORTIFICATION:
400 return "s";
401 default:
402 break;
403 }
404
405 return NULL;
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);

Callers 2

get_tile_smooth_allFunction · 0.85

Calls 5

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

Tested by

no test coverage detected