aboutsummaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.rs')
-rw-r--r--src/components.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components.rs b/src/components.rs
index bea87f2..ea76185 100644
--- a/src/components.rs
+++ b/src/components.rs
@@ -2,10 +2,15 @@ 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)]
-pub struct DirworldEntity(pub PathBuf);
+#[derive(Component, Clone, Debug)]
+pub struct DirworldEntity {
+ pub path: PathBuf,
+ pub payload: Option<DirworldEntityPayload>,
+}