diff --git a/client/src/block_assets.rs b/client/src/block_assets.rs index e1f3b7e..82ab4b2 100644 --- a/client/src/block_assets.rs +++ b/client/src/block_assets.rs @@ -1,7 +1,5 @@ use bevy::prelude::*; - -use common::asset_loading::LoadResource; -use common::block::Block; +use common::prelude::*; pub fn plugin(app: &mut App) { app.add_observer(insert_block_visuals); diff --git a/client/src/camera.rs b/client/src/camera.rs index 5872923..b3c6f35 100644 --- a/client/src/camera.rs +++ b/client/src/camera.rs @@ -1,7 +1,8 @@ use std::f32::consts::TAU; -use bevy::input::mouse::AccumulatedMouseMotion; use bevy::prelude::*; + +use bevy::input::mouse::AccumulatedMouseMotion; use bevy::window::{CursorGrabMode, CursorOptions}; pub fn cursor_grab( diff --git a/client/src/main.rs b/client/src/main.rs index 99361b4..e6e760e 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -1,9 +1,9 @@ use bevy::prelude::*; -use common::network::*; +use common::prelude::network::*; +use common::prelude::*; use bevy::asset::AssetMetaCheck; use bevy::window::WindowResolution; -use common::block::Blocks; use lightyear::prelude::server::Started; mod args; diff --git a/client/src/placement.rs b/client/src/placement.rs index 8a9538a..d093a9b 100644 --- a/client/src/placement.rs +++ b/client/src/placement.rs @@ -1,7 +1,7 @@ use bevy::prelude::*; -use bevy::window::{CursorGrabMode, CursorOptions}; +use common::prelude::*; -use common::block::Blocks; +use bevy::window::{CursorGrabMode, CursorOptions}; // TODO: Use picking system instead of manually raycasting. diff --git a/common/src/lib.rs b/common/src/lib.rs index 69000e3..5c91849 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -1,3 +1,11 @@ pub mod asset_loading; pub mod block; pub mod network; + +// This is mostly just re-exportings things for now, but in the future +// we might want to limit what gets exposed by the `prelude` module. +pub mod prelude { + pub use super::asset_loading::LoadResource; + pub use super::block::*; + pub use super::network; +}