simplify crate module imports
This commit is contained in:
parent
d37b90be15
commit
94d732d9f0
|
@ -19,7 +19,6 @@ use bevy_xpbd_3d::prelude::*;
|
|||
use bevy::scene::SceneInstance;
|
||||
use bevy::math::DVec3;
|
||||
use crate::prelude::*;
|
||||
use crate::{actor, audio, camera, chat, hud, menu, nature, visual, world};
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub const ENGINE_SPEED_FACTOR: f32 = 30.0;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
use bevy::prelude::*;
|
||||
use bevy::audio::{PlaybackMode, Volume};
|
||||
use crate::{camera, var};
|
||||
use crate::prelude::*;
|
||||
|
||||
const ASSET_CLICK: &str = "sounds/click-button-140881-crop.ogg";
|
||||
const ASSET_SWITCH: &str = "sounds/typosonic-typing-192811-crop.ogg";
|
||||
|
|
|
@ -24,7 +24,7 @@ use bevy_xpbd_3d::prelude::*;
|
|||
use bevy_xpbd_3d::plugins::sync;
|
||||
use std::f32::consts::PI;
|
||||
use std::f64::consts::PI as PI64;
|
||||
use crate::{actor, audio, hud, var};
|
||||
use crate::prelude::*;
|
||||
|
||||
pub const INITIAL_ZOOM_LEVEL: f64 = 10.0;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// This module loads the chat definitions from the YAML files
|
||||
// and manages the flow of conversations.
|
||||
|
||||
use crate::{actor, audio, hud, var, visual, world};
|
||||
use crate::prelude::*;
|
||||
use bevy::prelude::*;
|
||||
use bevy::math::DVec3;
|
||||
use bevy_xpbd_3d::prelude::*;
|
||||
|
|
|
@ -16,7 +16,6 @@ use bevy_xpbd_3d::prelude::*;
|
|||
use bevy::math::DVec3;
|
||||
use bevy::pbr::{NotShadowCaster, NotShadowReceiver};
|
||||
use crate::prelude::*;
|
||||
use crate::{actor, camera, chat, hud, load, nature, var, world};
|
||||
use regex::Regex;
|
||||
use std::f32::consts::PI;
|
||||
use std::f64::consts::PI as PI64;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// This module manages the heads-up display and augmented reality overlays.
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::{actor, audio, camera, chat, nature};
|
||||
use bevy::pbr::{NotShadowCaster, NotShadowReceiver};
|
||||
use bevy::prelude::*;
|
||||
use bevy::diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin};
|
||||
|
|
25
src/main.rs
25
src/main.rs
|
@ -11,22 +11,23 @@
|
|||
// This module initializes the game, handles command-line arguments,
|
||||
// and manages window-related key bindings.
|
||||
|
||||
mod actor;
|
||||
mod audio;
|
||||
mod camera;
|
||||
mod chat;
|
||||
mod cmd;
|
||||
mod hud;
|
||||
mod load;
|
||||
mod menu;
|
||||
mod var;
|
||||
mod visual;
|
||||
mod world;
|
||||
pub mod actor;
|
||||
pub mod audio;
|
||||
pub mod camera;
|
||||
pub mod chat;
|
||||
pub mod cmd;
|
||||
pub mod hud;
|
||||
pub mod load;
|
||||
pub mod menu;
|
||||
pub mod var;
|
||||
pub mod visual;
|
||||
pub mod world;
|
||||
|
||||
#[allow(dead_code)]
|
||||
mod nature;
|
||||
pub mod nature;
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::{actor, audio, camera, chat, cmd, hud, load, menu, nature, var, visual, world};
|
||||
pub use crate::var::{FONT, Settings};
|
||||
pub use crate::load::load_asset;
|
||||
pub fn bool2vis(boolean: bool) -> bevy::prelude::Visibility {
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// This plugin manages game menus and the player death screen
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::{audio, hud, visual, world};
|
||||
use bevy::prelude::*;
|
||||
|
||||
pub struct MenuPlugin;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// This module manages visual effects.
|
||||
|
||||
use bevy::prelude::*;
|
||||
use crate::{camera, var};
|
||||
use crate::prelude::*;
|
||||
|
||||
pub struct VisualPlugin;
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
// This module populates the world with stars and asteroids.
|
||||
|
||||
use crate::prelude::*;
|
||||
use crate::{actor, cmd, hud, load, nature};
|
||||
use bevy::prelude::*;
|
||||
use bevy::math::{DVec3, I64Vec3};
|
||||
use bevy::scene::{InstanceId, SceneInstance};
|
||||
|
|
Loading…
Reference in a new issue