aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2024-06-03 20:00:08 -0400
committerLibravatar Silas Bartha <silas@exvacuum.dev>2024-06-03 20:00:08 -0400
commitebc3ccfea4027a3eb0c80f6a3d64b6425d32d1ef (patch)
tree287a5a2cea0f5d37970cea888ffbd2b676dee14d /src/lib.rs
Initial Commit
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..6b46502
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,32 @@
+#![warn(missing_docs)]
+
+//! Plugin for bevy engine enabling interaction with and representation of the file system in the world.
+
+use std::path::PathBuf;
+
+use bevy::prelude::*;
+use events::DirworldNavigationEvent;
+use resources::{Dirworld, DirworldConfig};
+
+/// Components used by this plugin
+pub mod components;
+
+/// Events used by this plugin
+pub mod events;
+
+/// Resources used by this plugin
+pub mod resources;
+
+/// Plugin which enables high-level interaction
+pub struct DirworldPlugin {
+ /// Root path of world
+ pub path: PathBuf,
+}
+
+impl Plugin for DirworldPlugin {
+ fn build(&self, app: &mut App) {
+ app.insert_resource(DirworldConfig::new(self.path.clone()))
+ .add_event::<DirworldNavigationEvent>()
+ .init_resource::<Dirworld>();
+ }
+}