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

Function add_walls_to_burrow

plugins/burrow.cpp:146–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static void add_walls_to_burrow(color_ostream &out, df::burrow* b,
147 const df::coord & pos1, const df::coord & pos2)
148{
149 for (int z = pos1.z; z <= pos2.z; z++) {
150 for (int y = pos1.y; y <= pos2.y; y++) {
151 for (int x = pos1.x; x <= pos2.x; x++) {
152 df::coord pos(x,y,z);
153 df::tiletype *tt = Maps::getTileType(pos);
154 if (tt && isWallTerrain(*tt))
155 Burrows::setAssignedTile(b, pos, true);
156 }
157 }
158 }
159}
160
161static void expand_burrows(color_ostream &out, const df::coord & pos, df::tiletype prev_tt, df::tiletype tt) {
162 if (!isWalkable(tt) && tileShape(tt) != tiletype_shape::RAMP_TOP)

Callers 1

expand_burrowsFunction · 0.85

Calls 3

getTileTypeFunction · 0.85
isWallTerrainFunction · 0.85
setAssignedTileFunction · 0.85

Tested by

no test coverage detected