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

Function clean_ramps

plugins/dig-now.cpp:362–372  ·  view source on GitHub ↗

removes self and/or orthogonally adjacent ramps that are no longer adjacent to a wall

Source from the content-addressed store, hash-verified

360// removes self and/or orthogonally adjacent ramps that are no longer adjacent
361// to a wall
362static void clean_ramps(MapExtras::MapCache &map, const DFCoord &pos) {
363 clean_ramp(map, pos);
364 clean_ramp(map, DFCoord(pos.x-1, pos.y, pos.z));
365 clean_ramp(map, DFCoord(pos.x+1, pos.y, pos.z));
366 clean_ramp(map, DFCoord(pos.x, pos.y-1, pos.z));
367 clean_ramp(map, DFCoord(pos.x, pos.y+1, pos.z));
368 clean_ramp(map, DFCoord(pos.x-1, pos.y-1, pos.z));
369 clean_ramp(map, DFCoord(pos.x-1, pos.y+1, pos.z));
370 clean_ramp(map, DFCoord(pos.x+1, pos.y-1, pos.z));
371 clean_ramp(map, DFCoord(pos.x+1, pos.y+1, pos.z));
372}
373
374// destroys any colonies located at pos
375static void destroy_colony(const DFCoord &pos) {

Callers 1

dig_tileFunction · 0.85

Calls 1

clean_rampFunction · 0.85

Tested by

no test coverage detected