allow digging of surface tiles

now that we handle colonies
develop
myk002 2021-06-12 11:16:00 -07:00
parent 8349afa39b
commit 7ea8c843b1
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 13 additions and 2 deletions

@ -284,13 +284,24 @@ struct dug_tile_info {
}
};
static bool is_tree(df::tiletype tt) {
df::tiletype_material mat = tileMaterial(tt);
switch (mat) {
case df::tiletype_material::TREE:
case df::tiletype_material::ROOT:
return true;
default:
return false;
}
}
static bool dig_tile(color_ostream &out, MapExtras::MapCache &map,
const DFCoord &pos, df::tile_dig_designation designation,
std::vector<dug_tile_info> &dug_tiles) {
df::tiletype tt = map.tiletypeAt(pos);
df::tiletype_material tile_mat = tileMaterial(tt);
if (!isGroundMaterial(tile_mat))
// TODO: handle trees, roots, and log generation
if (is_tree(tt))
return false;
df::tiletype target_type = df::tiletype::Void;