veloren_common/comp/
arcing.rs1use crate::{
2 combat::Attack,
3 resources::{Secs, Time},
4 uid::Uid,
5};
6use serde::{Deserialize, Serialize};
7use specs::Component;
8use vek::*;
9
10#[derive(Clone, Debug, Serialize, Deserialize)]
11pub struct Arcing {
12 pub properties: ArcProperties,
13 pub last_arc_time: Time,
14 pub hit_entities: Vec<Uid>,
15 pub owner: Option<Uid>,
16}
17
18#[derive(Clone, Debug, Serialize, Deserialize)]
19pub struct ArcProperties {
20 pub attack: Attack,
21 pub distance: f32,
22 pub arcs: u32,
23 pub min_delay: Secs,
24 pub max_delay: Secs,
25 pub targets_owner: bool,
26}
27
28impl Component for Arcing {
29 type Storage = specs::DerefFlaggedStorage<Self, specs::DenseVecStorage<Self>>;
30}