mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix tests and examples to point to site2 dungeons.
This commit is contained in:
parent
19979413d5
commit
6af988b806
@ -10,7 +10,7 @@ use common::{
|
|||||||
vol::{BaseVol, ReadVol, RectSizedVol, WriteVol},
|
vol::{BaseVol, ReadVol, RectSizedVol, WriteVol},
|
||||||
};
|
};
|
||||||
use vek::{Vec2, Vec3};
|
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
|
/// This exports a dungeon (structure only, no entities or sprites) to a
|
||||||
/// MagicaVoxel .vox file
|
/// MagicaVoxel .vox file
|
||||||
@ -22,9 +22,9 @@ fn main() -> Result {
|
|||||||
println!("Saving into {}", export_path);
|
println!("Saving into {}", export_path);
|
||||||
let mut volume = ExportVol::new();
|
let mut volume = ExportVol::new();
|
||||||
let index = IndexOwned::new(Index::new(seed));
|
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),
|
volume.size_xy().map(|p| p as i32 / 2),
|
||||||
None,
|
&Land::empty(),
|
||||||
&mut rand::thread_rng(),
|
&mut rand::thread_rng(),
|
||||||
);
|
);
|
||||||
dungeon.apply_to(index.as_index_ref(), Vec2::new(0, 0), |_| None, &mut volume);
|
dungeon.apply_to(index.as_index_ref(), Vec2::new(0, 0), |_| None, &mut volume);
|
||||||
|
@ -1252,7 +1252,7 @@ mod tests {
|
|||||||
crate::site::Castle::generate(wpos, None, &mut rng),
|
crate::site::Castle::generate(wpos, None, &mut rng),
|
||||||
),
|
),
|
||||||
common::terrain::site::SitesKind::Dungeon => crate::site::Site::dungeon(
|
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 |
|
// common::terrain::site::SitesKind::Settlement |
|
||||||
_ => crate::site::Site::settlement(crate::site::Settlement::generate(
|
_ => crate::site::Site::settlement(crate::site::Settlement::generate(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user