|
|
@ -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,
|
|
|
|
static bool dig_tile(color_ostream &out, MapExtras::MapCache &map,
|
|
|
|
const DFCoord &pos, df::tile_dig_designation designation,
|
|
|
|
const DFCoord &pos, df::tile_dig_designation designation,
|
|
|
|
std::vector<dug_tile_info> &dug_tiles) {
|
|
|
|
std::vector<dug_tile_info> &dug_tiles) {
|
|
|
|
df::tiletype tt = map.tiletypeAt(pos);
|
|
|
|
df::tiletype tt = map.tiletypeAt(pos);
|
|
|
|
|
|
|
|
|
|
|
|
df::tiletype_material tile_mat = tileMaterial(tt);
|
|
|
|
// TODO: handle trees, roots, and log generation
|
|
|
|
if (!isGroundMaterial(tile_mat))
|
|
|
|
if (is_tree(tt))
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
df::tiletype target_type = df::tiletype::Void;
|
|
|
|
df::tiletype target_type = df::tiletype::Void;
|
|
|
|