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

Function get_tile_dig

plugins/blueprint.cpp:345–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345static const char * get_tile_dig(color_ostream &out, const df::coord &pos, const tile_context &) {
346 df::tile_designation *td = Maps::getTileDesignation(pos);
347 if (td && td->bits.dig != df::tile_dig_designation::No)
348 return add_markers(pos, get_tile_dig_designation(pos, td->bits.dig));
349 if (dig_job_cache.contains(pos))
350 if (const char * ret = get_tile_dig_job(td, dig_job_cache[pos]))
351 return add_markers(pos, ret);
352
353 auto tt = Maps::getTileType(pos);
354 if (!tt)
355 return NULL;
356
357 switch (tileShape(*tt))
358 {
359 case tiletype_shape::EMPTY:
360 case tiletype_shape::RAMP_TOP:
361 return "h";
362 case tiletype_shape::FLOOR:
363 case tiletype_shape::BOULDER:
364 case tiletype_shape::PEBBLES:
365 case tiletype_shape::BROOK_TOP:
366 case tiletype_shape::SAPLING:
367 case tiletype_shape::SHRUB:
368 case tiletype_shape::TWIG:
369 return "d";
370 case tiletype_shape::STAIR_UP:
371 return "u";
372 case tiletype_shape::STAIR_DOWN:
373 return "j";
374 case tiletype_shape::STAIR_UPDOWN:
375 return "i";
376 case tiletype_shape::RAMP:
377 return "r";
378 case tiletype_shape::WALL:
379 default:
380 return NULL;
381 }
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)

Callers

nothing calls this directly

Calls 7

getTileDesignationFunction · 0.85
add_markersFunction · 0.85
get_tile_dig_designationFunction · 0.85
get_tile_dig_jobFunction · 0.85
getTileTypeFunction · 0.85
tileShapeFunction · 0.85
containsMethod · 0.80

Tested by

no test coverage detected