aboutsummaryrefslogtreecommitdiff
path: root/src/components.rs
blob: 8bb2bff0f6db5d52b173e986d60bbe5ad4fe9d2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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>,
}

#[derive(Debug, Component)]
pub struct Persist;