aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2025-02-15 20:53:19 -0500
committerLibravatar Silas Bartha <silas@exvacuum.dev>2025-02-15 20:53:19 -0500
commit9e5f782eb228a6b050b01d5c4c82dba1399f7172 (patch)
tree2fe21e55d073b3ee5b31ef05c3e036bec71c2b03 /src/lib.rs
parenta1e9304dc31980703446bdb33246e314bafd3b15 (diff)
directory-aware navigation
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 7d0749a..5097f2d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,10 +9,10 @@ use bevy::{ecs::system::IntoObserverSystem, prelude::*};
use bevy_mod_scripting::core::{AddScriptApiProvider, AddScriptHost, AddScriptHostHandler, ScriptingPlugin};
use bevy_mod_scripting::lua::LuaScriptHost;
use cache::DirworldCache;
-use events::{DirworldChangeRoot, DirworldEnterRoom, DirworldLeaveRoom, DirworldSpawn};
+use events::{DirworldChangeRoot, DirworldEnterRoom, DirworldLeaveRoom, DirworldNavigationComplete, DirworldSpawn};
use occule::Codec;
use preload::{DirworldPreload, DirworldPreloadPlugin};
-use resources::EntryType;
+use resources::{DirworldLastDir, EntryType};
use resources::{
DirworldCodecs, DirworldCurrentDir, DirworldObservers, DirworldRootDir, DirworldTasks,
};
@@ -87,6 +87,7 @@ impl Plugin for DirworldPlugin {
.init_resource::<DirworldRootDir>()
.init_resource::<DirworldCache>()
.init_resource::<DirworldCurrentDir>()
+ .init_resource::<DirworldLastDir>()
.init_resource::<DirworldTasks>()
.init_resource::<DirworldObservers>()
.init_resource::<DirworldCodecs>()
@@ -94,6 +95,7 @@ impl Plugin for DirworldPlugin {
.add_event::<DirworldLeaveRoom>()
.add_event::<DirworldChangeRoot>()
.add_event::<DirworldWatcherEvent>()
+ .add_event::<DirworldNavigationComplete>()
.add_observer(observers::navigate_to_room)
.add_observer(observers::handle_changes)
.add_observer(observers::change_root)