Added ensnared debuff icon.

This commit is contained in:
Sam 2021-06-21 20:50:31 -05:00
parent 47cc040301
commit aac24ad601
4 changed files with 15 additions and 14 deletions

BIN
assets/voxygen/element/de_buffs/debuff_ensnared_0.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -65,6 +65,7 @@ impl<'a> System<'a> for Sys {
physics_state.on_ground.and_then(|b| b.get_sprite()), physics_state.on_ground.and_then(|b| b.get_sprite()),
Some(SpriteKind::EnsnaringVines) Some(SpriteKind::EnsnaringVines)
) { ) {
// If on ensnaring vines, apply ensnared debuff
server_emitter.emit(ServerEvent::Buff { server_emitter.emit(ServerEvent::Buff {
entity, entity,
buff_change: BuffChange::Add(Buff::new( buff_change: BuffChange::Add(Buff::new(
@ -82,6 +83,7 @@ impl<'a> System<'a> for Sys {
.. ..
}) })
) { ) {
// If in lava fluid, apply burning debuff
server_emitter.emit(ServerEvent::Buff { server_emitter.emit(ServerEvent::Buff {
entity, entity,
buff_change: BuffChange::Add(Buff::new( buff_change: BuffChange::Add(Buff::new(
@ -97,13 +99,13 @@ impl<'a> System<'a> for Sys {
kind: LiquidKind::Water, kind: LiquidKind::Water,
.. ..
}) })
) { ) && buff_comp.kinds.contains_key(&BuffKind::Burning)
if buff_comp.kinds.contains_key(&BuffKind::Burning) { {
server_emitter.emit(ServerEvent::Buff { // If in water fluid and currently burning, remove burning debuffs
entity, server_emitter.emit(ServerEvent::Buff {
buff_change: BuffChange::RemoveByKind(BuffKind::Burning), entity,
}); buff_change: BuffChange::RemoveByKind(BuffKind::Burning),
} });
} }
} }
@ -284,12 +286,7 @@ impl<'a> System<'a> for Sys {
} }
} }
fn tick_buff( fn tick_buff(id: u64, buff: &mut Buff, dt: f32, mut expire_buff: impl FnMut(u64)) {
id: u64,
buff: &mut Buff,
dt: f32,
mut expire_buff: impl FnMut(u64),
) {
// If a buff is recently applied from an aura, do not tick duration // If a buff is recently applied from an aura, do not tick duration
if buff if buff
.cat_ids .cat_ids

View File

@ -596,6 +596,7 @@ image_ids! {
debuff_crippled_0: "voxygen.element.de_buffs.debuff_cripple_0", debuff_crippled_0: "voxygen.element.de_buffs.debuff_cripple_0",
debuff_frozen_0: "voxygen.element.de_buffs.debuff_frozen_0", debuff_frozen_0: "voxygen.element.de_buffs.debuff_frozen_0",
debuff_wet_0: "voxygen.element.de_buffs.debuff_wet_0", debuff_wet_0: "voxygen.element.de_buffs.debuff_wet_0",
debuff_ensnared_0: "voxygen.element.de_buffs.debuff_ensnared_0",
// Animation Frames // Animation Frames
// Buff Frame // Buff Frame

View File

@ -3822,7 +3822,7 @@ pub fn get_buff_image(buff: BuffKind, imgs: &Imgs) -> conrod_core::image::Id {
BuffKind::Crippled { .. } => imgs.debuff_crippled_0, BuffKind::Crippled { .. } => imgs.debuff_crippled_0,
BuffKind::Frozen { .. } => imgs.debuff_frozen_0, BuffKind::Frozen { .. } => imgs.debuff_frozen_0,
BuffKind::Wet { .. } => imgs.debuff_wet_0, BuffKind::Wet { .. } => imgs.debuff_wet_0,
BuffKind::Ensnared { .. } => imgs.debuff_crippled_0, BuffKind::Ensnared { .. } => imgs.debuff_ensnared_0,
} }
} }