Reorganize common exports into `prelude` module

main
copygirl 1 month ago
parent 765882b8b6
commit 93245c136e
  1. 4
      client/src/block_assets.rs
  2. 3
      client/src/camera.rs
  3. 4
      client/src/main.rs
  4. 4
      client/src/placement.rs
  5. 8
      common/src/lib.rs

@ -1,7 +1,5 @@
use bevy::prelude::*; use bevy::prelude::*;
use common::prelude::*;
use common::asset_loading::LoadResource;
use common::block::Block;
pub fn plugin(app: &mut App) { pub fn plugin(app: &mut App) {
app.add_observer(insert_block_visuals); app.add_observer(insert_block_visuals);

@ -1,7 +1,8 @@
use std::f32::consts::TAU; use std::f32::consts::TAU;
use bevy::input::mouse::AccumulatedMouseMotion;
use bevy::prelude::*; use bevy::prelude::*;
use bevy::input::mouse::AccumulatedMouseMotion;
use bevy::window::{CursorGrabMode, CursorOptions}; use bevy::window::{CursorGrabMode, CursorOptions};
pub fn cursor_grab( pub fn cursor_grab(

@ -1,9 +1,9 @@
use bevy::prelude::*; use bevy::prelude::*;
use common::network::*; use common::prelude::network::*;
use common::prelude::*;
use bevy::asset::AssetMetaCheck; use bevy::asset::AssetMetaCheck;
use bevy::window::WindowResolution; use bevy::window::WindowResolution;
use common::block::Blocks;
use lightyear::prelude::server::Started; use lightyear::prelude::server::Started;
mod args; mod args;

@ -1,7 +1,7 @@
use bevy::prelude::*; 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. // TODO: Use picking system instead of manually raycasting.

@ -1,3 +1,11 @@
pub mod asset_loading; pub mod asset_loading;
pub mod block; pub mod block;
pub mod network; 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;
}

Loading…
Cancel
Save