From 3e5a220980245c040c092ad67d451efba5d457c0 Mon Sep 17 00:00:00 2001 From: Inojelis Date: Mon, 21 Feb 2022 02:48:12 +0200 Subject: [PATCH 1/5] Fix generate_chunk to also accept Calendar --- server/src/test_world.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/src/test_world.rs b/server/src/test_world.rs index 41f6681d38..8fa1090868 100644 --- a/server/src/test_world.rs +++ b/server/src/test_world.rs @@ -1,3 +1,8 @@ +use std::time::Duration; + +use rand::{prelude::*, rngs::SmallRng}; +use vek::*; + use common::{ generation::{ChunkSupplement, EntityInfo}, resources::TimeOfDay, @@ -6,9 +11,7 @@ use common::{ }, vol::{ReadVol, RectVolSize, WriteVol}, }; -use rand::{prelude::*, rngs::SmallRng}; -use std::time::Duration; -use vek::*; +use common::calendar::Calendar; const DEFAULT_WORLD_CHUNKS_LG: MapSizeLg = if let Ok(map_size_lg) = MapSizeLg::new(Vec2 { x: 1, y: 1 }) { @@ -46,7 +49,7 @@ impl World { _index: IndexRef, chunk_pos: Vec2, _should_continue: impl FnMut() -> bool, - _time: Option, + _time: Option<(TimeOfDay, Calendar)>, ) -> Result<(TerrainChunk, ChunkSupplement), ()> { let (x, y) = chunk_pos.map(|e| e.to_le_bytes()).into_tuple(); let mut rng = SmallRng::from_seed([ From cdd01655c1298eeb992be7128134c470935a58e6 Mon Sep 17 00:00:00 2001 From: Inojelis Date: Mon, 21 Feb 2022 02:50:16 +0200 Subject: [PATCH 2/5] Fix run config --- .cargo/config | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.cargo/config b/.cargo/config index 72cb7da529..8dc522821b 100644 --- a/.cargo/config +++ b/.cargo/config @@ -4,20 +4,19 @@ rustflags = [ ] [alias] -# tools cmd-doc-gen = "run --features=bin_cmd_doc_gen --bin cmd_doc_gen" csv-export = "run --manifest-path common/Cargo.toml --features=bin_csv --bin csv_export" csv-import = "run --manifest-path common/Cargo.toml --features=bin_csv --bin csv_import" -# server-cli +test-server = "run --bin veloren-server-cli --no-default-features --features simd" +tracy-server = "-Zunstable-options run --bin veloren-server-cli --no-default-features --features tracy,simd --profile no_overflow" +tracy-world-server = "-Zunstable-options run --bin veloren-server-cli --features tracy,simd --profile no_overflow" +tracy-world-server-releasedebuginfo = "-Zunstable-options run --bin veloren-server-cli --features tracy,simd --profile releasedebuginfo" +test-voxygen = "run --bin veloren-voxygen --no-default-features --features simd,egui-ui" +tracy-voxygen = "-Zunstable-options run --bin veloren-voxygen --no-default-features --features tracy,simd,egui-ui --profile no_overflow" server = "run --bin veloren-server-cli" -test-server = "run --bin veloren-server-cli --no-default-features simd" -tracy-server = "run --bin veloren-server-cli --no-default-features --features tracy,simd --profile no_overflow" -tracy-world-server = "run --bin veloren-server-cli --features tracy,simd --profile no_overflow" -tracy-world-server-debuginfo = "run --bin veloren-server-cli --features tracy,simd --profile no_overflow_debuginfo" -tracy-world-server-releasedebuginfo = "run --bin veloren-server-cli --features tracy,simd --profile releasedebuginfo" -# voxygen -test-voxygen = "run --bin veloren-voxygen --no-default-features --features simd,egui-ui,shaderc-from-source" -tracy-voxygen = "run --bin veloren-voxygen --no-default-features --features tracy,simd,egui-ui,shaderc-from-source --profile no_overflow" -dbg-voxygen = "run --bin veloren-voxygen --profile debuginfo" -# misc +dbg-voxygen = "run --bin veloren-voxygen -Zunstable-options --profile debuginfo" swarm = "run --bin swarm --features client/bin_bot,client/tick_network --" + + +[env] +RUSTC_FORCE_INCREMENTAL = "1" From 13308d009db1ef63fd22c09c89d49e5d44bf2fd5 Mon Sep 17 00:00:00 2001 From: Inojelis Date: Mon, 21 Feb 2022 03:33:58 +0200 Subject: [PATCH 3/5] Fix run config --- .cargo/config | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.cargo/config b/.cargo/config index 8dc522821b..b273b3ab81 100644 --- a/.cargo/config +++ b/.cargo/config @@ -4,19 +4,21 @@ rustflags = [ ] [alias] +# tools cmd-doc-gen = "run --features=bin_cmd_doc_gen --bin cmd_doc_gen" csv-export = "run --manifest-path common/Cargo.toml --features=bin_csv --bin csv_export" csv-import = "run --manifest-path common/Cargo.toml --features=bin_csv --bin csv_import" -test-server = "run --bin veloren-server-cli --no-default-features --features simd" -tracy-server = "-Zunstable-options run --bin veloren-server-cli --no-default-features --features tracy,simd --profile no_overflow" -tracy-world-server = "-Zunstable-options run --bin veloren-server-cli --features tracy,simd --profile no_overflow" -tracy-world-server-releasedebuginfo = "-Zunstable-options run --bin veloren-server-cli --features tracy,simd --profile releasedebuginfo" -test-voxygen = "run --bin veloren-voxygen --no-default-features --features simd,egui-ui" -tracy-voxygen = "-Zunstable-options run --bin veloren-voxygen --no-default-features --features tracy,simd,egui-ui --profile no_overflow" +# server-cli server = "run --bin veloren-server-cli" -dbg-voxygen = "run --bin veloren-voxygen -Zunstable-options --profile debuginfo" +test-server = "run --bin veloren-server-cli --no-default-features --features simd" +tracy-server = "run --bin veloren-server-cli --no-default-features --features tracy,simd --profile no_overflow" +tracy-world-server = "run --bin veloren-server-cli --features tracy,simd --profile no_overflow" +tracy-world-server-debuginfo = "run --bin veloren-server-cli --features tracy,simd --profile no_overflow_debuginfo" +tracy-world-server-releasedebuginfo = "run --bin veloren-server-cli --features tracy,simd --profile releasedebuginfo" +# voxygen +test-voxygen = "run --bin veloren-voxygen --no-default-features --features simd,egui-ui,shaderc-from-source" +tracy-voxygen = "run --bin veloren-voxygen --no-default-features --features tracy,simd,egui-ui,shaderc-from-source --profile no_overflow" +dbg-voxygen = "run --bin veloren-voxygen --profile debuginfo" +# misc swarm = "run --bin swarm --features client/bin_bot,client/tick_network --" - -[env] -RUSTC_FORCE_INCREMENTAL = "1" From 9bdb7198f52d1b2cae7764fdc3d44ef402ccbb9d Mon Sep 17 00:00:00 2001 From: Inojelis Date: Mon, 21 Feb 2022 03:46:02 +0200 Subject: [PATCH 4/5] Fix imports --- server/src/test_world.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/src/test_world.rs b/server/src/test_world.rs index 8fa1090868..51c90d0bc8 100644 --- a/server/src/test_world.rs +++ b/server/src/test_world.rs @@ -1,9 +1,5 @@ -use std::time::Duration; - -use rand::{prelude::*, rngs::SmallRng}; -use vek::*; - use common::{ + calendar::Calendar, generation::{ChunkSupplement, EntityInfo}, resources::TimeOfDay, terrain::{ @@ -11,7 +7,9 @@ use common::{ }, vol::{ReadVol, RectVolSize, WriteVol}, }; -use common::calendar::Calendar; +use rand::{prelude::*, rngs::SmallRng}; +use std::time::Duration; +use vek::*; const DEFAULT_WORLD_CHUNKS_LG: MapSizeLg = if let Ok(map_size_lg) = MapSizeLg::new(Vec2 { x: 1, y: 1 }) { From b0122a6b4642e0562bfb93223fb9cd3b2485378c Mon Sep 17 00:00:00 2001 From: Inojelis Date: Mon, 21 Feb 2022 04:04:56 +0200 Subject: [PATCH 5/5] remove blank line --- .cargo/config | 1 - 1 file changed, 1 deletion(-) diff --git a/.cargo/config b/.cargo/config index b273b3ab81..041039b191 100644 --- a/.cargo/config +++ b/.cargo/config @@ -21,4 +21,3 @@ tracy-voxygen = "run --bin veloren-voxygen --no-default-features --features trac dbg-voxygen = "run --bin veloren-voxygen --profile debuginfo" # misc swarm = "run --bin swarm --features client/bin_bot,client/tick_network --" -