aboutsummaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
authorLibravatar Silas Bartha <silas@exvacuum.dev>2024-10-11 16:03:43 -0400
committerLibravatar GitHub <noreply@github.com>2024-10-11 16:03:43 -0400
commit535436e2e9164f9880e507d7057a8cdbf261608e (patch)
treedb370db8e0caea99a9e6e3c501c7ea7e3b6dd708 /src/components.rs
parentebc3ccfea4027a3eb0c80f6a3d64b6425d32d1ef (diff)
parent16c1574e400d73198713336e18975ff37ab78290 (diff)
Merge pull request #1 from exvacuum/navigation
Navigation
Diffstat (limited to 'src/components.rs')
-rw-r--r--src/components.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/components.rs b/src/components.rs
index 69a5cde..ea76185 100644
--- a/src/components.rs
+++ b/src/components.rs
@@ -1,5 +1,16 @@
+use std::path::PathBuf;
+
use bevy::prelude::*;
+use crate::payload::DirworldEntityPayload;
+
/// A tooltip on an object, which can be displayed.
#[derive(Component)]
pub struct Tooltip(pub String);
+
+/// A marker component for entities spawned by dirworld handlers, i.e. they should be removed when the room changes.
+#[derive(Component, Clone, Debug)]
+pub struct DirworldEntity {
+ pub path: PathBuf,
+ pub payload: Option<DirworldEntityPayload>,
+}