veloren/common/src/comp/misc.rs

25 lines
561 B
Rust
Raw Normal View History

2020-08-11 14:05:34 +00:00
use super::item::Reagent;
2023-06-01 13:51:19 +00:00
use crate::{resources::Time, uid::Uid};
use serde::{Deserialize, Serialize};
2023-06-01 13:51:19 +00:00
use specs::{Component, DerefFlaggedStorage};
use std::time::Duration;
2023-06-01 13:51:19 +00:00
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Object {
2020-08-11 14:05:34 +00:00
Bomb {
owner: Option<Uid>,
},
Firework {
owner: Option<Uid>,
reagent: Reagent,
},
2023-06-01 13:51:19 +00:00
DeleteAfter {
spawned_at: Time,
timeout: Duration,
},
}
impl Component for Object {
2023-06-01 13:51:19 +00:00
type Storage = DerefFlaggedStorage<Self, specs::VecStorage<Self>>;
}