veloren/common/src/explosion.rs

19 lines
462 B
Rust
Raw Normal View History

2021-02-20 20:38:27 +00:00
use crate::{combat::Attack, comp::item::Reagent, effect::Effect};
use serde::{Deserialize, Serialize};
2023-02-15 00:10:37 +00:00
use vek::Rgb;
2021-01-30 22:35:00 +00:00
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Explosion {
pub effects: Vec<RadiusEffect>,
pub radius: f32,
2021-02-16 05:18:05 +00:00
pub reagent: Option<Reagent>,
2021-10-27 19:42:11 +00:00
pub min_falloff: f32,
}
2021-01-30 22:35:00 +00:00
#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum RadiusEffect {
2023-02-15 00:10:37 +00:00
TerrainDestruction(f32, Rgb<f32>),
2021-01-30 22:35:00 +00:00
Entity(Effect),
Attack(Attack),
}