From 9e5f782eb228a6b050b01d5c4c82dba1399f7172 Mon Sep 17 00:00:00 2001 From: Silas Bartha Date: Sat, 15 Feb 2025 20:53:19 -0500 Subject: directory-aware navigation --- src/payload/components/mod.rs | 5 +++++ src/payload/mod.rs | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src/payload') diff --git a/src/payload/components/mod.rs b/src/payload/components/mod.rs index fc24ac1..2812d73 100644 --- a/src/payload/components/mod.rs +++ b/src/payload/components/mod.rs @@ -9,6 +9,11 @@ use yarnspinner::core::YarnValue; #[derive(Serialize, Deserialize, Clone, Default, Deref, DerefMut, Debug)] pub struct Transform(pub bevy::prelude::Transform); +/// Transform for the destination of a door +/// Used to determine where to spawn ".." door and player when entering a room +#[derive(Serialize, Deserialize, Clone, Default, Deref, DerefMut, Debug)] +pub struct DoorDestination(pub bevy::prelude::Transform); + /// Payload component that represent's an entity's name #[derive(Serialize, Deserialize, Clone, Default, Deref, DerefMut, Debug)] pub struct Name(pub String); diff --git a/src/payload/mod.rs b/src/payload/mod.rs index 68e23a0..3639997 100644 --- a/src/payload/mod.rs +++ b/src/payload/mod.rs @@ -27,6 +27,8 @@ pub struct DirworldEntityPayload { pub relationships: Option, /// Pickup information for this entity pub pickup: Option, + /// Door destination + pub door_destination: Option, } impl DirworldEntityPayload { -- cgit v1.2.3