| 159 | } |
| 160 | |
| 161 | static 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) |
| 163 | return; |
| 164 | |
| 165 | bool changed = false; |
| 166 | for (auto b : plotinfo->burrows.list) { |
| 167 | if (!b->name.ends_with('+') || !Burrows::isAssignedTile(b, pos)) |
| 168 | continue; |
| 169 | |
| 170 | if (!isWalkable(prev_tt)) { |
| 171 | changed = true; |
| 172 | add_walls_to_burrow(out, b, pos+df::coord(-1,-1,0), pos+df::coord(1,1,0)); |
| 173 | |
| 174 | if (isWalkableUp(tt)) |
| 175 | Burrows::setAssignedTile(b, pos+df::coord(0,0,1), true); |
| 176 | |
| 177 | if (tileShape(tt) == tiletype_shape::RAMP) |
| 178 | add_walls_to_burrow(out, b, pos+df::coord(-1,-1,1), pos+df::coord(1,1,1)); |
| 179 | } |
| 180 | |
| 181 | if (LowPassable(tt) && !LowPassable(prev_tt)) { |
| 182 | changed = true; |
| 183 | Burrows::setAssignedTile(b, pos-df::coord(0,0,1), true); |
| 184 | if (tileShape(tt) == tiletype_shape::RAMP_TOP) |
| 185 | add_walls_to_burrow(out, b, pos+df::coord(-1,-1,-1), pos+df::coord(1,1,-1)); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | if (changed) |
| 190 | Job::checkDesignationsNow(); |
| 191 | } |
| 192 | |
| 193 | static void jobCompletedHandler(color_ostream& out, void* ptr) { |
| 194 | DEBUG(event, out).print("entering jobCompletedHandler\n"); |
no test coverage detected