Fix tests and examples to point to site2 dungeons.

This commit is contained in:
Avi Weinstock 2021-06-24 23:21:49 -04:00
parent 19979413d5
commit 6af988b806
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@ use common::{
vol::{BaseVol, ReadVol, RectSizedVol, WriteVol},
};
use vek::{Vec2, Vec3};
use veloren_world::{index::Index, IndexOwned};
use veloren_world::{index::Index, IndexOwned, Land};
/// This exports a dungeon (structure only, no entities or sprites) to a
/// MagicaVoxel .vox file
@ -22,9 +22,9 @@ fn main() -> Result {
println!("Saving into {}", export_path);
let mut volume = ExportVol::new();
let index = IndexOwned::new(Index::new(seed));
let dungeon = veloren_world::site::Dungeon::generate(
let dungeon = veloren_world::site2::plot::Dungeon::generate(
volume.size_xy().map(|p| p as i32 / 2),
None,
&Land::empty(),
&mut rand::thread_rng(),
);
dungeon.apply_to(index.as_index_ref(), Vec2::new(0, 0), |_| None, &mut volume);

View File

@ -1252,7 +1252,7 @@ mod tests {
crate::site::Castle::generate(wpos, None, &mut rng),
),
common::terrain::site::SitesKind::Dungeon => crate::site::Site::dungeon(
crate::site::Dungeon::generate(wpos, None, &mut rng),
crate::site2::Site::generate_dungeon(&crate::Land::empty(), &mut rng, wpos),
),
// common::terrain::site::SitesKind::Settlement |
_ => crate::site::Site::settlement(crate::site::Settlement::generate(