removes deprecated SufferDamage component

This commit is contained in:
Llywelwyn 2023-08-17 05:48:30 +01:00
parent 945242bc42
commit 51f8ee66e6
7 changed files with 20 additions and 39 deletions

View file

@ -197,22 +197,6 @@ pub struct GrantsXP {
pub amount: i32,
}
#[derive(Component, Debug, ConvertSaveload, Clone)]
pub struct SufferDamage {
pub amount: Vec<(i32, bool)>,
}
impl SufferDamage {
pub fn new_damage(store: &mut WriteStorage<SufferDamage>, victim: Entity, amount: i32, from_player: bool) {
if let Some(suffering) = store.get_mut(victim) {
suffering.amount.push((amount, from_player));
} else {
let dmg = SufferDamage { amount: vec![(amount, from_player)] };
store.insert(victim, dmg).expect("Unable to insert damage.");
}
}
}
#[derive(Component, Debug, Serialize, Deserialize, Clone)]
pub struct Item {
pub weight: f32, // in lbs