From 1b1e322a1a287ce8442909dd220ec15f3139b63c Mon Sep 17 00:00:00 2001 From: Snowram Date: Tue, 27 Oct 2020 22:27:19 +0100 Subject: [PATCH 1/8] Allow for an arbitrary array of effects and buffs for consumables --- assets/common/items/boss_drops/exp_flask.ron | 6 +++++- assets/common/items/boss_drops/potions.ron | 14 ++++++++----- assets/common/items/boss_drops/xp_potion.ron | 8 +++++-- assets/common/items/consumable/potion_big.ron | 12 +++++++---- assets/common/items/consumable/potion_med.ron | 12 +++++++---- .../common/items/consumable/potion_minor.ron | 12 +++++++---- assets/common/items/food/apple.ron | 21 ++++++++++++++----- .../items/food/apple_mushroom_curry.ron | 21 ++++++++++++++----- assets/common/items/food/apple_stick.ron | 21 ++++++++++++++----- assets/common/items/food/cheese.ron | 21 ++++++++++++++----- assets/common/items/food/coconut.ron | 21 ++++++++++++++----- assets/common/items/food/mushroom.ron | 21 ++++++++++++++----- assets/common/items/food/mushroom_stick.ron | 21 ++++++++++++++----- assets/common/items/food/sunflower_icetea.ron | 21 ++++++++++++++----- assets/common/items/ore/velorite.ron | 10 ++++++--- assets/common/items/ore/veloritefrag.ron | 8 +++++-- assets/voxygen/i18n/en.ron | 4 +++- common/src/comp/buff.rs | 9 +++++--- common/src/comp/inventory/item/mod.rs | 2 +- common/src/effect.rs | 13 +++++++++++- server/src/events/entity_manipulation.rs | 2 +- server/src/events/inventory_manip.rs | 8 ++++--- server/src/state_ext.rs | 17 +++++++++++++-- voxygen/src/hud/buffs.rs | 14 +++++++++++++ voxygen/src/hud/group.rs | 7 +++++++ voxygen/src/hud/overhead.rs | 1 + 26 files changed, 250 insertions(+), 77 deletions(-) diff --git a/assets/common/items/boss_drops/exp_flask.ron b/assets/common/items/boss_drops/exp_flask.ron index fc36dd1d64..c4cc3e1f87 100644 --- a/assets/common/items/boss_drops/exp_flask.ron +++ b/assets/common/items/boss_drops/exp_flask.ron @@ -3,7 +3,11 @@ ItemDef( description: "Increases Exp by 250\n\nTake with plenty of water\n\n", kind: Consumable( kind: "PotionExp", - effect: Xp(250), + effect: Some( + [ + Xp(250), + ] + ), ), quality: High, ) diff --git a/assets/common/items/boss_drops/potions.ron b/assets/common/items/boss_drops/potions.ron index 8c584b6c5c..42195bd3c5 100644 --- a/assets/common/items/boss_drops/potions.ron +++ b/assets/common/items/boss_drops/potions.ron @@ -1,12 +1,16 @@ ItemDef( name: "Potent Potion", - description: "A potent healing potion.\n\nRestores 100 health on use.\n\n", + description: "A potent healing potion.\n\nRestores 100 health on use\n\n", kind: Consumable( kind: "Potion", - effect: Health(( - amount: 1000, - cause: Item, - )), + effect: Some( + [ + Health(( + amount: 1000, + cause: Item, + )), + ] + ), ), quality: High, ) diff --git a/assets/common/items/boss_drops/xp_potion.ron b/assets/common/items/boss_drops/xp_potion.ron index ad804f5063..023ae0a000 100644 --- a/assets/common/items/boss_drops/xp_potion.ron +++ b/assets/common/items/boss_drops/xp_potion.ron @@ -3,7 +3,11 @@ ItemDef( description: "Provides 250 XP to the drinker\n\n", kind: Consumable( kind: "Potion", - effect: Xp(250), - ), + effect: Some( + [ + Xp(250), + ] + ), + ), quality: High, ) diff --git a/assets/common/items/consumable/potion_big.ron b/assets/common/items/consumable/potion_big.ron index c9b252dd1c..6eab677174 100644 --- a/assets/common/items/consumable/potion_big.ron +++ b/assets/common/items/consumable/potion_big.ron @@ -3,10 +3,14 @@ ItemDef( description: "Restores 100 Health", kind: Consumable( kind: "PotionLarge", - effect: Health(( - amount: 1000, - cause: Item, - )), + effect: Some( + [ + Health(( + amount: 1000, + cause: Item, + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/consumable/potion_med.ron b/assets/common/items/consumable/potion_med.ron index c844aad72c..51035da8cc 100644 --- a/assets/common/items/consumable/potion_med.ron +++ b/assets/common/items/consumable/potion_med.ron @@ -3,10 +3,14 @@ ItemDef( description: "Restores 70 Health", kind: Consumable( kind: "PotionMed", - effect: Health(( - amount: 700, - cause: Item, - )), + effect: Some( + [ + Health(( + amount: 700, + cause: Item, + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/consumable/potion_minor.ron b/assets/common/items/consumable/potion_minor.ron index 5deff1c2f9..0658b81f30 100644 --- a/assets/common/items/consumable/potion_minor.ron +++ b/assets/common/items/consumable/potion_minor.ron @@ -3,10 +3,14 @@ ItemDef( description: "Restores 50 Health", kind: Consumable( kind: "PotionMinor", - effect: Health(( - amount: 500, - cause: Item, - )), + effect: Some( + [ + Health(( + amount: 500, + cause: Item, + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/food/apple.ron b/assets/common/items/food/apple.ron index 4e067b53cb..4e945d2592 100644 --- a/assets/common/items/food/apple.ron +++ b/assets/common/items/food/apple.ron @@ -1,12 +1,23 @@ ItemDef( name: "Apple", - description: "Restores 10 Health\n\nRed and juicy", + description: "Restores 10 Health over 10 seconds\n\nRed and juicy", kind: Consumable( kind: "Apple", - effect: Health(( - amount: 100, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 10.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/food/apple_mushroom_curry.ron b/assets/common/items/food/apple_mushroom_curry.ron index b90bccdbdf..e3b4676c2d 100644 --- a/assets/common/items/food/apple_mushroom_curry.ron +++ b/assets/common/items/food/apple_mushroom_curry.ron @@ -1,12 +1,23 @@ ItemDef( name: "Mushroom Curry", - description: "Restores 120 Health\n\nWho could say no to that?", + description: "Restores 120 Health over 5 seconds\n\nWho could say no to that?", kind: Consumable( kind: "AppleShroomCurry", - effect: Health(( - amount: 1200, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 120.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Moderate, ) diff --git a/assets/common/items/food/apple_stick.ron b/assets/common/items/food/apple_stick.ron index 05d4195b48..3d1e94c9d7 100644 --- a/assets/common/items/food/apple_stick.ron +++ b/assets/common/items/food/apple_stick.ron @@ -1,12 +1,23 @@ ItemDef( name: "Apple Stick", - description: "Restores 25 Health\n\nThe stick makes it easier to carry!", + description: "Restores 25 Health over 5 seconds\n\nThe stick makes it easier to carry!", kind: Consumable( kind: "AppleStick", - effect: Health(( - amount: 250, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 25.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/food/cheese.ron b/assets/common/items/food/cheese.ron index 13d4e14c13..febc37eb30 100644 --- a/assets/common/items/food/cheese.ron +++ b/assets/common/items/food/cheese.ron @@ -1,12 +1,23 @@ ItemDef( name: "Dwarven Cheese", - description: "Restores 15 Health\n\nAromatic and nutritious", + description: "Restores 15 Health over 10 seconds\n\nAromatic and nutritious", kind: Consumable( kind: "Cheese", - effect: Health(( - amount: 150, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 15.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/food/coconut.ron b/assets/common/items/food/coconut.ron index 26d0311604..acdcee0208 100644 --- a/assets/common/items/food/coconut.ron +++ b/assets/common/items/food/coconut.ron @@ -1,12 +1,23 @@ ItemDef( name: "Coconut", - description: "Restores 20 health\n\nReliable source of water and fat", + description: "Restores 20 health over 10 seconds\n\nReliable source of water and fat", kind: Consumable( kind: "Coconut", - effect: Health(( - amount: 200, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 20.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/food/mushroom.ron b/assets/common/items/food/mushroom.ron index 1d18ba8d4c..172dec7b96 100644 --- a/assets/common/items/food/mushroom.ron +++ b/assets/common/items/food/mushroom.ron @@ -1,12 +1,23 @@ ItemDef( name: "Mushroom", - description: "Restores 5 Health\n\nHopefully this one is not poisonous", + description: "Restores 5 Health over 10 seconds\n\nHopefully this one is not poisonous", kind: Consumable( kind: "Mushroom", - effect: Health(( - amount: 50, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 5.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/food/mushroom_stick.ron b/assets/common/items/food/mushroom_stick.ron index 1a035e5529..038bfe585c 100644 --- a/assets/common/items/food/mushroom_stick.ron +++ b/assets/common/items/food/mushroom_stick.ron @@ -1,12 +1,23 @@ ItemDef( name: "Mushroom Stick", - description: "Restores 20 Health\n\nRoasted mushrooms on a stick for easy carrying.", + description: "Restores 20 Health over 5 seconds\n\nRoasted mushrooms on a stick for easy carrying.", kind: Consumable( kind: "MushroomStick", - effect: Health(( - amount: 200, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 20.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Common, ) diff --git a/assets/common/items/food/sunflower_icetea.ron b/assets/common/items/food/sunflower_icetea.ron index d299d18933..da147b3503 100644 --- a/assets/common/items/food/sunflower_icetea.ron +++ b/assets/common/items/food/sunflower_icetea.ron @@ -1,12 +1,23 @@ ItemDef( name: "Sunflower Ice Tea", - description: "Restores 50 Health\n\nBrewed from freshly shelled sunflower seeds.", + description: "Restores 50 Health over 5 seconds\n\nBrewed from freshly shelled sunflower seeds.", kind: Consumable( kind: "SunflowerTea", - effect: Health(( - amount: 500, - cause: Item, - )), + effect: Some( + [ + Buff(( + kind: Saturation, + data: ( + strength: 50.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), ), quality: Moderate, ) diff --git a/assets/common/items/ore/velorite.ron b/assets/common/items/ore/velorite.ron index f0e572f32a..424ade12d1 100644 --- a/assets/common/items/ore/velorite.ron +++ b/assets/common/items/ore/velorite.ron @@ -3,7 +3,11 @@ ItemDef( description: "Increases Exp by 20\n\nJust a slight touch makes you feel the knowledge of ancient times", kind: Consumable( kind: "Velorite", - effect: Xp(20), - ), - quality: High, + effect: Some( + [ + Xp(20), + ] + ), + ), + quality: High, ) diff --git a/assets/common/items/ore/veloritefrag.ron b/assets/common/items/ore/veloritefrag.ron index 8c8199b00d..aff073bbb5 100644 --- a/assets/common/items/ore/veloritefrag.ron +++ b/assets/common/items/ore/veloritefrag.ron @@ -3,7 +3,11 @@ ItemDef( description: "Increases Exp by 10\n\nSmall runes sparkle on its surface", kind: Consumable( kind: "VeloriteFrag", - effect: Xp(10), + effect: Some( + [ + Xp(10), + ] + ), ), - quality: Moderate, + quality: Moderate, ) diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index cb540505d5..95df52318f 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -184,7 +184,7 @@ https://account.veloren.net."#, "hud.chat.pvp_ranged_kill_msg": "[{attacker}] shot [{victim}]", "hud.chat.pvp_explosion_kill_msg": "[{attacker}] blew up [{victim}]", "hud.chat.pvp_energy_kill_msg": "[{attacker}] killed [{victim}] with magic", - "hud.chat.pvp_other_kill_msg": "[{attacker}] killed [{victim}]", + "hud.chat.pvp_buff_kill_msg": "[{attacker}] killed [{victim}]", "hud.chat.npc_melee_kill_msg": "{attacker} killed [{victim}]", @@ -522,6 +522,8 @@ Protection // Buffs "buff.title.heal_test": "Heal Test", "buff.desc.heal_test": "This is a test buff to test healing.", + "buff.title.saturation_test": "Saturation", + "buff.desc.saturation_test": "This is a test buff to test saturation.", // Debuffs "debuff.title.bleed_test": "Bleeding", "debuff.desc.bleed_test": "Inflicts regular damage.", diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 08a489baf3..0b01ac387b 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -10,6 +10,8 @@ use std::{cmp::Ordering, collections::HashMap, time::Duration}; pub enum BuffKind { /// Restores health/time for some period Regeneration, + /// Restores health/time for some period for consumables + Saturation, /// Lowers health over time for some duration Bleeding, /// Lower a creature's max health @@ -22,6 +24,7 @@ impl BuffKind { pub fn is_buff(self) -> bool { match self { BuffKind::Regeneration { .. } => true, + BuffKind::Saturation { .. } => true, BuffKind::Bleeding { .. } => false, BuffKind::Cursed { .. } => false, } @@ -29,7 +32,7 @@ impl BuffKind { } // Struct used to store data relevant to a buff -#[derive(Clone, Copy, Debug, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] pub struct BuffData { pub strength: f32, pub duration: Option, @@ -97,7 +100,7 @@ pub enum BuffChange { RemoveById(Vec), /// Removes buffs of these categories (first vec is of categories of which /// all are required, second vec is of categories of which at least one is - /// required, third vec is of categories that will not be removed) + /// required, third vec is of categories that will not be removed) RemoveByCategory { all_required: Vec, any_required: Vec, @@ -121,7 +124,7 @@ impl Buff { }], data.duration, ), - BuffKind::Regeneration => ( + BuffKind::Regeneration | BuffKind::Saturation => ( vec![BuffEffect::HealthChangeOverTime { rate: data.strength, accumulated: 0.0, diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index e632a2b055..5c50bf57bb 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -83,7 +83,7 @@ pub enum ItemKind { Glider(Glider), Consumable { kind: String, - effect: Effect, + effect: Option>, }, Throwable { kind: Throwable, diff --git a/common/src/effect.rs b/common/src/effect.rs index 369fafb5ca..336a976215 100644 --- a/common/src/effect.rs +++ b/common/src/effect.rs @@ -2,11 +2,20 @@ use crate::{combat, comp}; use serde::{Deserialize, Serialize}; /// An effect that may be applied to an entity -#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum Effect { Health(comp::HealthChange), Xp(i64), Damage(combat::Damage), + Buff(BuffEffect), +} + +/// A buff that may be applied to an entity +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub struct BuffEffect { + pub kind: comp::BuffKind, + pub data: comp::BuffData, + pub cat_ids: Vec, } impl Effect { @@ -15,6 +24,7 @@ impl Effect { Effect::Health(c) => format!("{:+} health", c.amount), Effect::Xp(n) => format!("{:+} exp", n), Effect::Damage(d) => format!("{:+}", d.value), + Effect::Buff(e) => format!("{:?} buff", e), } } @@ -29,6 +39,7 @@ impl Effect { Effect::Damage(damage) => { damage.interpolate_damage(modifier, 0.0); }, + _ => {}, } } } diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 91717fd532..60d219892c 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -649,7 +649,7 @@ pub fn handle_explosion( if is_alive { effect.modify_strength(strength); - server.state().apply_effect(entity_b, effect, owner); + server.state().apply_effect(entity_b, effect.clone(), owner); // Apply energy change if let Some(owner) = owner_entity { if let Some(energy) = diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index bd20506e24..2bfa117a08 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -211,7 +211,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv } else if let Some(item) = inventory.take(slot) { match item.kind() { ItemKind::Consumable { kind, effect, .. } => { - maybe_effect = Some(*effect); + maybe_effect = Some(effect.clone()); Some(comp::InventoryUpdateEvent::Consumed(kind.clone())) }, ItemKind::Throwable { kind, .. } => { @@ -348,8 +348,10 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv }; drop(inventories); - if let Some(effect) = maybe_effect { - state.apply_effect(entity, effect, None); + if let Some(effects) = maybe_effect { + for effect in effects { + state.apply_effect(entity, effect, None); + } } if let Some(event) = event { state.write_component(entity, comp::InventoryUpdate::new(event)); diff --git a/server/src/state_ext.rs b/server/src/state_ext.rs index 642c4d427c..ebcc7e4f02 100644 --- a/server/src/state_ext.rs +++ b/server/src/state_ext.rs @@ -71,8 +71,8 @@ pub trait StateExt { } impl StateExt for State { - fn apply_effect(&self, entity: EcsEntity, effect: Effect, source: Option) { - match effect { + fn apply_effect(&self, entity: EcsEntity, effects: Effect, source: Option) { + match effects { Effect::Health(change) => { self.ecs() .write_storage::() @@ -93,6 +93,19 @@ impl StateExt for State { .get_mut(entity) .map(|health| health.change_by(change)); }, + Effect::Buff(buff) => { + self.ecs() + .write_storage::() + .get_mut(entity) + .map(|buffs| { + buffs.insert(comp::Buff::new( + buff.kind, + buff.data, + buff.cat_ids, + comp::BuffSource::Item, + )) + }); + }, } } diff --git a/voxygen/src/hud/buffs.rs b/voxygen/src/hud/buffs.rs index 1bd91eabc3..1fbeceaeb8 100644 --- a/voxygen/src/hud/buffs.rs +++ b/voxygen/src/hud/buffs.rs @@ -182,6 +182,7 @@ impl<'a> Widget for BuffsBar<'a> { }) as u32; // Percentage to determine which frame of the timer overlay is displayed let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_plus_0, _ => self.imgs.missing_icon, }; let buff_widget = Image::new(buff_img).w_h(20.0, 20.0); @@ -207,6 +208,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Regeneration { .. } => { localized_strings.get("buff.title.heal_test") }, + BuffKind::Saturation { .. } => { + localized_strings.get("buff.title.saturation_test") + }, _ => localized_strings.get("buff.title.missing"), }; let remaining_time = if current_duration.is_none() { @@ -219,6 +223,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Regeneration { .. } => { localized_strings.get("buff.desc.heal_test") }, + BuffKind::Saturation { .. } => { + localized_strings.get("buff.desc.saturation_test") + }, _ => localized_strings.get("buff.desc.missing"), }; let desc = format!("{}\n\n{}\n\n{}", desc_txt, remaining_time, click_to_remove); @@ -379,6 +386,7 @@ impl<'a> Widget for BuffsBar<'a> { }) as u32; let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_plus_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, }; @@ -405,6 +413,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Regeneration { .. } => { localized_strings.get("buff.title.heal_test") }, + BuffKind::Saturation { .. } => { + localized_strings.get("buff.title.saturation_test") + }, BuffKind::Bleeding { .. } => { localized_strings.get("debuff.title.bleed_test") }, @@ -420,6 +431,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Regeneration { .. } => { localized_strings.get("buff.desc.heal_test") }, + BuffKind::Saturation { .. } => { + localized_strings.get("buff.desc.saturation_test") + }, BuffKind::Bleeding { .. } => { localized_strings.get("debuff.desc.bleed_test") }, diff --git a/voxygen/src/hud/group.rs b/voxygen/src/hud/group.rs index 1d4d35d2c0..b46df6fac3 100644 --- a/voxygen/src/hud/group.rs +++ b/voxygen/src/hud/group.rs @@ -482,6 +482,7 @@ impl<'a> Widget for Group<'a> { }) as u32; // Percentage to determine which frame of the timer overlay is displayed let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_plus_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, }; @@ -512,6 +513,9 @@ impl<'a> Widget for Group<'a> { BuffKind::Regeneration { .. } => { localized_strings.get("buff.title.heal_test") }, + BuffKind::Saturation { .. } => { + localized_strings.get("buff.title.saturation_test") + }, BuffKind::Bleeding { .. } => { localized_strings.get("debuff.title.bleed_test") }, @@ -529,6 +533,9 @@ impl<'a> Widget for Group<'a> { BuffKind::Regeneration { .. } => { localized_strings.get("buff.desc.heal_test") }, + BuffKind::Saturation { .. } => { + localized_strings.get("buff.desc.saturation_test") + }, BuffKind::Bleeding { .. } => { localized_strings.get("debuff.desc.bleed_test") }, diff --git a/voxygen/src/hud/overhead.rs b/voxygen/src/hud/overhead.rs index 6d2630b3ad..eb3bdd1133 100644 --- a/voxygen/src/hud/overhead.rs +++ b/voxygen/src/hud/overhead.rs @@ -243,6 +243,7 @@ impl<'a> Widget for Overhead<'a> { }) as u32; // Percentage to determine which frame of the timer overlay is displayed let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_plus_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, }; From a2671123e5446ad85d790268c70ac55ea23f7ce4 Mon Sep 17 00:00:00 2001 From: Snowram Date: Sun, 1 Nov 2020 14:39:32 +0100 Subject: [PATCH 2/8] Addresses some comments --- assets/common/items/boss_drops/exp_flask.ron | 8 +- assets/common/items/boss_drops/potions.ron | 14 ++-- assets/common/items/boss_drops/xp_potion.ron | 8 +- assets/common/items/consumable/potion_big.ron | 14 ++-- assets/common/items/consumable/potion_med.ron | 14 ++-- .../common/items/consumable/potion_minor.ron | 14 ++-- assets/common/items/food/apple.ron | 28 ++++--- .../items/food/apple_mushroom_curry.ron | 28 ++++--- assets/common/items/food/apple_stick.ron | 28 ++++--- assets/common/items/food/cheese.ron | 28 ++++--- assets/common/items/food/coconut.ron | 28 ++++--- assets/common/items/food/mushroom.ron | 28 ++++--- assets/common/items/food/mushroom_stick.ron | 28 ++++--- assets/common/items/food/sunflower_icetea.ron | 28 ++++--- assets/common/items/ore/velorite.ron | 8 +- assets/common/items/ore/veloritefrag.ron | 8 +- .../icons/de_buffs/buff_saturation_0.png | Bin 0 -> 1517 bytes assets/voxygen/i18n/de_DE.ron | 70 +++++++++--------- assets/voxygen/i18n/en.ron | 12 +-- assets/voxygen/i18n/tr_TR.ron | 24 +++--- common/src/comp/inventory/item/mod.rs | 2 +- voxygen/src/hud/buffs.rs | 44 ++++------- voxygen/src/hud/group.rs | 14 ++-- voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/overhead.rs | 2 +- 25 files changed, 217 insertions(+), 264 deletions(-) create mode 100644 assets/voxygen/element/icons/de_buffs/buff_saturation_0.png diff --git a/assets/common/items/boss_drops/exp_flask.ron b/assets/common/items/boss_drops/exp_flask.ron index c4cc3e1f87..fd87fb20d7 100644 --- a/assets/common/items/boss_drops/exp_flask.ron +++ b/assets/common/items/boss_drops/exp_flask.ron @@ -3,11 +3,9 @@ ItemDef( description: "Increases Exp by 250\n\nTake with plenty of water\n\n", kind: Consumable( kind: "PotionExp", - effect: Some( - [ - Xp(250), - ] - ), + effect: [ + Xp(250), + ] ), quality: High, ) diff --git a/assets/common/items/boss_drops/potions.ron b/assets/common/items/boss_drops/potions.ron index 42195bd3c5..a98620f489 100644 --- a/assets/common/items/boss_drops/potions.ron +++ b/assets/common/items/boss_drops/potions.ron @@ -3,14 +3,12 @@ ItemDef( description: "A potent healing potion.\n\nRestores 100 health on use\n\n", kind: Consumable( kind: "Potion", - effect: Some( - [ - Health(( - amount: 1000, - cause: Item, - )), - ] - ), + effect: [ + Health(( + amount: 1000, + cause: Item, + )), + ] ), quality: High, ) diff --git a/assets/common/items/boss_drops/xp_potion.ron b/assets/common/items/boss_drops/xp_potion.ron index 023ae0a000..447e648695 100644 --- a/assets/common/items/boss_drops/xp_potion.ron +++ b/assets/common/items/boss_drops/xp_potion.ron @@ -3,11 +3,9 @@ ItemDef( description: "Provides 250 XP to the drinker\n\n", kind: Consumable( kind: "Potion", - effect: Some( - [ - Xp(250), - ] - ), + effect: [ + Xp(250), + ] ), quality: High, ) diff --git a/assets/common/items/consumable/potion_big.ron b/assets/common/items/consumable/potion_big.ron index 6eab677174..d09f800e2d 100644 --- a/assets/common/items/consumable/potion_big.ron +++ b/assets/common/items/consumable/potion_big.ron @@ -3,14 +3,12 @@ ItemDef( description: "Restores 100 Health", kind: Consumable( kind: "PotionLarge", - effect: Some( - [ - Health(( - amount: 1000, - cause: Item, - )), - ] - ), + effect: [ + Health(( + amount: 1000, + cause: Item, + )), + ] ), quality: Common, ) diff --git a/assets/common/items/consumable/potion_med.ron b/assets/common/items/consumable/potion_med.ron index 51035da8cc..e1ab119579 100644 --- a/assets/common/items/consumable/potion_med.ron +++ b/assets/common/items/consumable/potion_med.ron @@ -3,14 +3,12 @@ ItemDef( description: "Restores 70 Health", kind: Consumable( kind: "PotionMed", - effect: Some( - [ - Health(( - amount: 700, - cause: Item, - )), - ] - ), + effect: [ + Health(( + amount: 700, + cause: Item, + )), + ] ), quality: Common, ) diff --git a/assets/common/items/consumable/potion_minor.ron b/assets/common/items/consumable/potion_minor.ron index 0658b81f30..7b5e648225 100644 --- a/assets/common/items/consumable/potion_minor.ron +++ b/assets/common/items/consumable/potion_minor.ron @@ -3,14 +3,12 @@ ItemDef( description: "Restores 50 Health", kind: Consumable( kind: "PotionMinor", - effect: Some( - [ - Health(( - amount: 500, - cause: Item, - )), - ] - ), + effect: [ + Health(( + amount: 500, + cause: Item, + )), + ] ), quality: Common, ) diff --git a/assets/common/items/food/apple.ron b/assets/common/items/food/apple.ron index 4e945d2592..2969acd184 100644 --- a/assets/common/items/food/apple.ron +++ b/assets/common/items/food/apple.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 10 Health over 10 seconds\n\nRed and juicy", kind: Consumable( kind: "Apple", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 10.0, - duration: Some(( - secs: 10, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 10.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Common, ) diff --git a/assets/common/items/food/apple_mushroom_curry.ron b/assets/common/items/food/apple_mushroom_curry.ron index e3b4676c2d..4c1ed514e5 100644 --- a/assets/common/items/food/apple_mushroom_curry.ron +++ b/assets/common/items/food/apple_mushroom_curry.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 120 Health over 5 seconds\n\nWho could say no to that?", kind: Consumable( kind: "AppleShroomCurry", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 120.0, - duration: Some(( - secs: 5, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 240.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Moderate, ) diff --git a/assets/common/items/food/apple_stick.ron b/assets/common/items/food/apple_stick.ron index 3d1e94c9d7..e250220d64 100644 --- a/assets/common/items/food/apple_stick.ron +++ b/assets/common/items/food/apple_stick.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 25 Health over 5 seconds\n\nThe stick makes it easier to carry!", kind: Consumable( kind: "AppleStick", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 25.0, - duration: Some(( - secs: 5, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 50.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Common, ) diff --git a/assets/common/items/food/cheese.ron b/assets/common/items/food/cheese.ron index febc37eb30..cdd967d1af 100644 --- a/assets/common/items/food/cheese.ron +++ b/assets/common/items/food/cheese.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 15 Health over 10 seconds\n\nAromatic and nutritious", kind: Consumable( kind: "Cheese", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 15.0, - duration: Some(( - secs: 10, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 15.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Common, ) diff --git a/assets/common/items/food/coconut.ron b/assets/common/items/food/coconut.ron index acdcee0208..75992f3335 100644 --- a/assets/common/items/food/coconut.ron +++ b/assets/common/items/food/coconut.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 20 health over 10 seconds\n\nReliable source of water and fat", kind: Consumable( kind: "Coconut", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 20.0, - duration: Some(( - secs: 10, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 20.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Common, ) diff --git a/assets/common/items/food/mushroom.ron b/assets/common/items/food/mushroom.ron index 172dec7b96..08b26aed8a 100644 --- a/assets/common/items/food/mushroom.ron +++ b/assets/common/items/food/mushroom.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 5 Health over 10 seconds\n\nHopefully this one is not poisonous", kind: Consumable( kind: "Mushroom", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 5.0, - duration: Some(( - secs: 10, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 5.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Common, ) diff --git a/assets/common/items/food/mushroom_stick.ron b/assets/common/items/food/mushroom_stick.ron index 038bfe585c..80cf305eb9 100644 --- a/assets/common/items/food/mushroom_stick.ron +++ b/assets/common/items/food/mushroom_stick.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 20 Health over 5 seconds\n\nRoasted mushrooms on a stick for easy carrying.", kind: Consumable( kind: "MushroomStick", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 20.0, - duration: Some(( - secs: 5, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 40.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Common, ) diff --git a/assets/common/items/food/sunflower_icetea.ron b/assets/common/items/food/sunflower_icetea.ron index da147b3503..8015388bfd 100644 --- a/assets/common/items/food/sunflower_icetea.ron +++ b/assets/common/items/food/sunflower_icetea.ron @@ -3,21 +3,19 @@ ItemDef( description: "Restores 50 Health over 5 seconds\n\nBrewed from freshly shelled sunflower seeds.", kind: Consumable( kind: "SunflowerTea", - effect: Some( - [ - Buff(( - kind: Saturation, - data: ( - strength: 50.0, - duration: Some(( - secs: 5, - nanos: 0, - )), - ), - cat_ids: [Natural], - )), - ] - ), + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 100.0, + duration: Some(( + secs: 5, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] ), quality: Moderate, ) diff --git a/assets/common/items/ore/velorite.ron b/assets/common/items/ore/velorite.ron index 424ade12d1..bfb3c50b37 100644 --- a/assets/common/items/ore/velorite.ron +++ b/assets/common/items/ore/velorite.ron @@ -3,11 +3,9 @@ ItemDef( description: "Increases Exp by 20\n\nJust a slight touch makes you feel the knowledge of ancient times", kind: Consumable( kind: "Velorite", - effect: Some( - [ - Xp(20), - ] - ), + effect: [ + Xp(20), + ] ), quality: High, ) diff --git a/assets/common/items/ore/veloritefrag.ron b/assets/common/items/ore/veloritefrag.ron index aff073bbb5..76042b4a03 100644 --- a/assets/common/items/ore/veloritefrag.ron +++ b/assets/common/items/ore/veloritefrag.ron @@ -3,11 +3,9 @@ ItemDef( description: "Increases Exp by 10\n\nSmall runes sparkle on its surface", kind: Consumable( kind: "VeloriteFrag", - effect: Some( - [ - Xp(10), - ] - ), + effect: [ + Xp(10), + ] ), quality: Moderate, ) diff --git a/assets/voxygen/element/icons/de_buffs/buff_saturation_0.png b/assets/voxygen/element/icons/de_buffs/buff_saturation_0.png new file mode 100644 index 0000000000000000000000000000000000000000..38e212f2143d1b87dba9ef16267c1da42190af1f GIT binary patch literal 1517 zcmbVM-;3Nt98a-5+Umk-i&RkNxY*cbnW79RxBSE&zmvOmIAtHlN;^XoI8@9*!W zwbiqwqfZ}I6s6QysW;_(JRgT=l|d`uK#R9C|WpZHNu; zRYX{<sC)L2G=twW7KXn}c0 zH|=t{T0IRcXh8$c8z$5&3qc!I=D_4rrL-&vQM3NaM3&sSYDb6^8Ah+y(|dC|%i4zN zIF11=!?HAq(D)z`xUVJrWLb=* z!BLFc)JT)I3JN!(8tbx53YOZ|9 z;Dpdd-BqP?^e76D9s2WT)uCEw60F&NIn;2~_q7oFRXeEq<{Sy9@9T{0<|#0JANJpmu>K^Mt!kWeVqJp_wGV%IK1=r_SOfRTi=Rd`Rawm@OtTZ`Pe6iZ&zjyejb9G zuvz+U8|*#TGH1hC=i2ipPJMq-ePpk6`sc07+lNkn`Gun3%fJ3`WQJeQ8**cLwSH}B>%w0N Cao`RB literal 0 HcmV?d00001 diff --git a/assets/voxygen/i18n/de_DE.ron b/assets/voxygen/i18n/de_DE.ron index 8448b4dc39..24e269ead1 100644 --- a/assets/voxygen/i18n/de_DE.ron +++ b/assets/voxygen/i18n/de_DE.ron @@ -1,5 +1,5 @@ /// Translation document instructions -/// +/// /// In order to keep localization documents readible please follow the following /// rules: /// - separate the string map sections using a commentary describing the purpose @@ -120,7 +120,7 @@ Dies ist eine frühe Alpha. Ihr werdet auf Bugs, unfertiges Gameplay und Mechani Für konstruktives Feedback und Bug-Reports könnt Ihr uns via Reddit, Gitlab oder unseren Discord Server kontaktieren. -Veloren hat die GPL 3 Open-Source Lizenz. Das heißt Ihr könnt es kostenlos spielen, +Veloren hat die GPL 3 Open-Source Lizenz. Das heißt Ihr könnt es kostenlos spielen, aber auch modifizieren (solange die Mods auch die selbe Lizenz tragen) und das Spiel an andere weiterschicken. Veloren ist ein Non-Profit Community Projekt und jeder Mitarbeiter entwickelt es als Hobby in seiner Freizeit. @@ -164,7 +164,7 @@ https://account.veloren.net. "hud.quests": "Quests", "hud.you_died": "Ihr seid gestorben.", "hud.waypoint_saved": "Wegpunkt gesichert", - + "hud.press_key_to_show_keybindings_fmt": "[{key}] Tastenbelegung", "hud.press_key_to_toggle_lantern_fmt": "[{key}] Laterne", "hud.press_key_to_show_debug_info_fmt": "Drückt {key} um die Debug-Info zu zeigen", @@ -172,13 +172,13 @@ https://account.veloren.net. "hud.press_key_to_toggle_debug_info_fmt": "Drückt {key} um die Debug-Info zu zeigen", // Chat outputs - "hud.chat.online_msg": "[{name}] ist jetzt online.", - "hud.chat.offline_msg": "{name} ist jetzt offline.", - "hud.chat.loot_msg": "Ihr erhaltet [{item}]", + "hud.chat.online_msg": "[{name}] ist jetzt online.", + "hud.chat.offline_msg": "{name} ist jetzt offline.", + "hud.chat.loot_msg": "Ihr erhaltet [{item}]", "hud.chat.loot_fail": "Euer Inventar ist voll!", "hud.chat.goodbye": "Verbindung getrennt.", "hud.chat.connection_lost": "Verbindung unterbrochen. Trenne Verbindung in {time} Sekunden.", - + "hud.chat.default_death_msg": "[{name}] ist gestorben", "hud.chat.environmental_kill_msg": "[{name}] starb durch {environment}", "hud.chat.fall_kill_msg": "[{name}] starb durch Fallschaden", @@ -224,7 +224,7 @@ Um diese zu nutzen öffnet Euer Inventar mit 'B'. Doppelklickt den Gegenstand in Eurer Tasche, um diesen zu nutzen. -Um Items wegzuwerfen klickt sie einmal im Inventar an +Um Items wegzuwerfen klickt sie einmal im Inventar an und klickt dann außerhalb der Tasche. @@ -246,11 +246,11 @@ Viel Spaß in der Welt von Veloren, Abenteurer!"#, um unsere Dörfer herum aufgetaucht! -Versammelt einige Kämpfer, sucht etwas -Nahrung und besiegt ihre abscheulichen +Versammelt einige Kämpfer, sucht etwas +Nahrung und besiegt ihre abscheulichen Anführer und Akolyten. -Vielleicht könnt Ihr sogar einen ihrer +Vielleicht könnt Ihr sogar einen ihrer magischen Gegenstände ergattern?"#, // Inventory @@ -273,7 +273,7 @@ magischen Gegenstände ergattern?"#, "hud.bag.legs": "Beine", "hud.bag.feet": "Füße", "hud.bag.mainhand": "Haupthand", - "hud.bag.offhand": "Nebenhand", + "hud.bag.offhand": "Nebenhand", // Map and Questlog "hud.map.map_title": "Karte", @@ -292,7 +292,7 @@ magischen Gegenstände ergattern?"#, "hud.settings.custom_scaling": "Freie Skalierung", "hud.settings.crosshair": "Fadenkreuz", "hud.settings.transparency": "Transparenz", - "hud.settings.hotbar": "Hotbar", + "hud.settings.hotbar": "Hotbar", "hud.settings.toggle_shortcuts": "Tastenbelegung", "hud.settings.toggle_bar_experience": "Erfahrungsleiste", "hud.settings.scrolling_combat_text": "Aufsteigende Kampfwerte", @@ -300,7 +300,7 @@ magischen Gegenstände ergattern?"#, "hud.settings.cumulated_damage": "Addierter Schaden", "hud.settings.incoming_damage": "Erlittener Schaden", "hud.settings.cumulated_incoming_damage": "Addierter erlittener Schaden", - "hud.settings.speech_bubble": "Sprechblase", + "hud.settings.speech_bubble": "Sprechblase", "hud.settings.speech_bubble_dark_mode": "Dunkle Sprechblasen", "hud.settings.speech_bubble_icon": "Sprechblasen-Symbole", "hud.settings.energybar_numbers": "Zahlen auf Ressourcenanzeige", @@ -311,10 +311,10 @@ magischen Gegenstände ergattern?"#, "hud.settings.chat_character_name": "Characternamen im Chat", "hud.settings.buffs_mmap": "Zeige Buffs an der Mini-Map", "hud.settings.buffs_skillbar": "Zeige Buffs an der Fähigkeiten Leiste", - "hud.settings.cloud_rendering_mode.low": "Niedrig", + "hud.settings.cloud_rendering_mode.low": "Niedrig", "hud.settings.cloud_rendering_mode.medium": "Mittel", - "hud.settings.cloud_rendering_mode.minimal": "Minimal", - "hud.settings.cloud_rendering_mode.high": "Hoch", + "hud.settings.cloud_rendering_mode.minimal": "Minimal", + "hud.settings.cloud_rendering_mode.high": "Hoch", "hud.settings.pan_sensitivity": "Schwenk-Sensibilität", "hud.settings.zoom_sensitivity": "Zoom-Sensibilität", @@ -341,7 +341,7 @@ magischen Gegenstände ergattern?"#, "hud.settings.resolution": "Auflösung", "hud.settings.bit_depth": "Bittiefe", "hud.settings.refresh_rate": "Bildwiederholrate", - "hud.settings.fullscreen": "Vollbild", + "hud.settings.fullscreen": "Vollbild", "hud.settings.fullscreen_mode": "Vollbild-Modus", "hud.settings.fullscreen_mode.exclusive": "Exklusiv", "hud.settings.fullscreen_mode.borderless": "Rahmenlos", @@ -374,7 +374,7 @@ magischen Gegenstände ergattern?"#, "hud.social.account": "Account", "hud.spell": "Zauber", - + "hud.social.name" : "Name", "hud.social.level" : "Lvl", "hud.social.zone" : "Gebiet", @@ -401,13 +401,13 @@ magischen Gegenstände ergattern?"#, "hud.free_look_indicator": "Freie Sicht aktiv", "hud.auto_walk_indicator": "Automatisches Laufen aktiv", - + /// End HUD section /// Start GameInput section "gameinput.primary": "Linker mittlerer Slot", "gameinput.secondary": "Rechter mittlerer Slot", - "gameinput.slot1": "Hotbar Slot 1", + "gameinput.slot1": "Hotbar Slot 1", "gameinput.slot2": "Hotbar Slot 2", "gameinput.slot3": "Hotbar Slot 3", "gameinput.slot4": "Hotbar Slot 4", @@ -450,7 +450,7 @@ magischen Gegenstände ergattern?"#, "gameinput.charge": "Anstürmen", "gameinput.togglewield": "Waffe ziehen/wegstecken", "gameinput.interact": "Interagieren", - "gameinput.freelook": "Freie Sicht", + "gameinput.freelook": "Freie Sicht", "gameinput.autowalk": "Automatisch Laufen", "gameinput.dance": "Tanzen", "gameinput.declinegroupinvite": "Ablehnen", @@ -501,7 +501,7 @@ Willenskraft /// Start character window section - + /// Start Escape Menu Section "esc_menu.logout": "Ausloggen", @@ -510,14 +510,14 @@ Willenskraft /// Buffs and Debuffs "buff.remove": "Klicken zum Entfernen", - "buff.title.missing": "Fehlender Titel", - "buff.desc.missing": "Fehlende Beschreibung", + "buff.title.missing": "Fehlender Titel", + "buff.desc.missing": "Fehlende Beschreibung", // Buffs - "buff.title.heal_test": "HoT Buff Test", - "buff.desc.heal_test": "HoT Buff Test", - // Debuffs - "debuff.title.bleed_test": "Blutung", - "debuff.desc.bleed_test": "Fügt regelmäßig Schaden zu.", + "buff.title.heal": "HoT Buff Test", + "buff.desc.heal": "HoT Buff Test", + // Debuffs + "debuff.title.bleed": "Blutung", + "debuff.desc.bleed": "Fügt regelmäßig Schaden zu.", }, vector_map: { @@ -530,17 +530,17 @@ Willenskraft "NPCs mit demselben Level können unterschiedlich schwierig zu besiegen sein.", "Behaltet den Boden um euch im Blick! Dort gibt es Nahrung, Kisten und Anderes zu finden.", "Ist Euer Inventar voll mit Nahrung? Wertet es einfach durch Crafting auf!", - "Ihr sucht nach einem Abenteuer? Dungeons sind mit braunen Markierungen auf der Karte vermerkt!", + "Ihr sucht nach einem Abenteuer? Dungeons sind mit braunen Markierungen auf der Karte vermerkt!", "Vergesst nicht Eure Grafikeinstellungen anzupassen! Mit 'N' kommt ihr in die Einstellungen.", - "Zusammen kämpfen macht mehr Spaß! Drückt 'O' um Eure Mitspieler anzuzeigen.", + "Zusammen kämpfen macht mehr Spaß! Drückt 'O' um Eure Mitspieler anzuzeigen.", "Ein NPC mit einem Schädel unter seiner Lebensanzeige ist deutlich stärker als Ihr.", "Drückt 'J' um zu tanzen. Yeah!", "Verwendet 'L-Shift' um mit Eurem Gleiter den Himmel zu erobern!", "Veloren befindet sich noch in der Pre-Alpha Phase. Wir tun unser Bestes, um das Spielgefühl jeden Tag zu verbessern!", - "Ihr wünscht, Euch mit uns auszutauschen oder wollt unserem Entwickler-Team beitreten? Kommt doch einfach auf unseren Discord-Server!", - ], + "Ihr wünscht, Euch mit uns auszutauschen oder wollt unserem Entwickler-Team beitreten? Kommt doch einfach auf unseren Discord-Server!", + ], "npc.speech.villager_under_attack": [ - "Hilfe, ich werde angegriffen!", + "Hilfe, ich werde angegriffen!", ], } ) diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index 95df52318f..754d19d5d2 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -520,13 +520,13 @@ Protection "buff.title.missing": "Missing Title", "buff.desc.missing": "Missing Description", // Buffs - "buff.title.heal_test": "Heal Test", - "buff.desc.heal_test": "This is a test buff to test healing.", - "buff.title.saturation_test": "Saturation", - "buff.desc.saturation_test": "This is a test buff to test saturation.", + "buff.title.heal": "Heal", + "buff.desc.heal": "Gain health over time.", + "buff.title.saturation": "Saturation", + "buff.desc.saturation": "Gain health over time from consumables.", // Debuffs - "debuff.title.bleed_test": "Bleeding", - "debuff.desc.bleed_test": "Inflicts regular damage.", + "debuff.title.bleed": "Bleeding", + "debuff.desc.bleed": "Inflicts regular damage.", }, diff --git a/assets/voxygen/i18n/tr_TR.ron b/assets/voxygen/i18n/tr_TR.ron index 1eb7166a63..4de1f61798 100644 --- a/assets/voxygen/i18n/tr_TR.ron +++ b/assets/voxygen/i18n/tr_TR.ron @@ -1,5 +1,5 @@ /// Translation document instructions -/// +/// /// In order to keep localization documents readible please follow the following /// rules: /// - separate the string map sections using a commentary describing the purpose @@ -7,7 +7,7 @@ /// - prepend multi-line strings with a commentary /// - append one blank lines after a multi-line strings and two after sections /// -/// To add a new language in Veloren, just write an additional `.ron` file in +/// To add a new language in Veloren, just write an additional `.ron` file in /// `assets/voxygen/i18n` and that's it! /// /// WARNING: Localization files shall be saved in UTF-8 format without BOM @@ -164,7 +164,7 @@ bir hesap oluşturabilirsin."#, "hud.quests": "Görevler", "hud.you_died": "Öldün", "hud.waypoint_saved": "Yol noktası kaydedildi", - + "hud.press_key_to_show_keybindings_fmt": "Kontrolleri göstermek için {key}'e bas", "hud.press_key_to_toggle_lantern_fmt": "Fenerini yakıp söndürmek için [{key}]'e bas", "hud.press_key_to_show_debug_info_fmt": "Hata ayıklama bilgilerini göstermek için {key}'e bas", @@ -203,7 +203,7 @@ bir hesap oluşturabilirsin."#, "hud.sct.block": "BLOKLANDI", // Respawn message - "hud.press_key_to_respawn": r#"Ziyaret ettiğin en son kamp ateşinde yeniden doğmak için {key}'e bas."#, + "hud.press_key_to_respawn": r#"Ziyaret ettiğin en son kamp ateşinde yeniden doğmak için {key}'e bas."#, // Welcome message "hud.welcome": r#"Veloren Alfa sürümüne hoşgeldin!, @@ -250,7 +250,7 @@ dolu zindanlar belirdi. Birkaç yoldaş bul, yiyeceğini hazırla ve kült lideri ile onun yardımcılarını alt et. -Kim bilir? Belki onların tılsımlı +Kim bilir? Belki onların tılsımlı eşyalarını bile ele geçirebilirsin!"#, @@ -275,7 +275,7 @@ eşyalarını bile ele geçirebilirsin!"#, "hud.bag.feet": "Ayaklar", "hud.bag.mainhand": "Birincil", "hud.bag.offhand": "İkincil", - + // Map and Questlog "hud.map.map_title": "Harita", "hud.map.qlog_title": "Görevler", @@ -462,7 +462,7 @@ edince kapat"#, "gameinput.sneak": "Eğil", "gameinput.swimdown": "Aşağı Dal", "gameinput.swimup": "Yüzeye çık", - + /// End GameInput section @@ -508,7 +508,7 @@ Koruma /// Start character window section - + /// Start Escape Menu Section "esc_menu.logout": "Çıkış yap", @@ -520,11 +520,11 @@ Koruma "buff.title.missing": "İsim Yok", "buff.desc.missing": "Açıklama Yok", // Buffs - "buff.title.heal_test": "İyileştirme Testi", - "buff.desc.heal_test": "Bu etki iyileştirmeyi test etmek için.", + "buff.title.heal": "İyileştirme Testi", + "buff.desc.heal": "Bu etki iyileştirmeyi test etmek için.", // Debuffs - "debuff.title.bleed_test": "Kanama", - "debuff.desc.bleed_test": "Normal hasar verir.", + "debuff.title.bleed": "Kanama", + "debuff.desc.bleed": "Normal hasar verir.", }, vector_map: { diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 5c50bf57bb..585c21b39a 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -83,7 +83,7 @@ pub enum ItemKind { Glider(Glider), Consumable { kind: String, - effect: Option>, + effect: Vec, }, Throwable { kind: Throwable, diff --git a/voxygen/src/hud/buffs.rs b/voxygen/src/hud/buffs.rs index 1fbeceaeb8..6e1e86f34f 100644 --- a/voxygen/src/hud/buffs.rs +++ b/voxygen/src/hud/buffs.rs @@ -182,7 +182,7 @@ impl<'a> Widget for BuffsBar<'a> { }) as u32; // Percentage to determine which frame of the timer overlay is displayed let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, - BuffKind::Saturation { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, _ => self.imgs.missing_icon, }; let buff_widget = Image::new(buff_img).w_h(20.0, 20.0); @@ -205,11 +205,9 @@ impl<'a> Widget for BuffsBar<'a> { .set(id, ui); // Create Buff tooltip let title = match buff.kind { - BuffKind::Regeneration { .. } => { - localized_strings.get("buff.title.heal_test") - }, + BuffKind::Regeneration { .. } => localized_strings.get("buff.title.heal"), BuffKind::Saturation { .. } => { - localized_strings.get("buff.title.saturation_test") + localized_strings.get("buff.title.saturation") }, _ => localized_strings.get("buff.title.missing"), }; @@ -220,11 +218,9 @@ impl<'a> Widget for BuffsBar<'a> { }; let click_to_remove = format!("<{}>", &localized_strings.get("buff.remove")); let desc_txt = match buff.kind { - BuffKind::Regeneration { .. } => { - localized_strings.get("buff.desc.heal_test") - }, + BuffKind::Regeneration { .. } => localized_strings.get("buff.desc.heal"), BuffKind::Saturation { .. } => { - localized_strings.get("buff.desc.saturation_test") + localized_strings.get("buff.desc.saturation") }, _ => localized_strings.get("buff.desc.missing"), }; @@ -303,9 +299,7 @@ impl<'a> Widget for BuffsBar<'a> { .set(id, ui); // Create Debuff tooltip let title = match debuff.kind { - BuffKind::Bleeding { .. } => { - localized_strings.get("debuff.title.bleed_test") - }, + BuffKind::Bleeding { .. } => localized_strings.get("debuff.title.bleed"), _ => localized_strings.get("buff.title.missing"), }; let remaining_time = if current_duration.is_none() { @@ -314,9 +308,7 @@ impl<'a> Widget for BuffsBar<'a> { format!("Remaining: {:.0}s", current_duration.unwrap().as_secs_f32()) }; let desc_txt = match debuff.kind { - BuffKind::Bleeding { .. } => { - localized_strings.get("debuff.desc.bleed_test") - }, + BuffKind::Bleeding { .. } => localized_strings.get("debuff.desc.bleed"), _ => localized_strings.get("debuff.desc.missing"), }; let desc = format!("{}\n\n{}", desc_txt, remaining_time); @@ -386,7 +378,7 @@ impl<'a> Widget for BuffsBar<'a> { }) as u32; let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, - BuffKind::Saturation { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, }; @@ -410,15 +402,11 @@ impl<'a> Widget for BuffsBar<'a> { .set(id, ui); // Create Buff tooltip let title = match buff.kind { - BuffKind::Regeneration { .. } => { - localized_strings.get("buff.title.heal_test") - }, + BuffKind::Regeneration { .. } => localized_strings.get("buff.title.heal"), BuffKind::Saturation { .. } => { - localized_strings.get("buff.title.saturation_test") - }, - BuffKind::Bleeding { .. } => { - localized_strings.get("debuff.title.bleed_test") + localized_strings.get("buff.title.saturation") }, + BuffKind::Bleeding { .. } => localized_strings.get("debuff.title.bleed"), _ => localized_strings.get("buff.title.missing"), }; let remaining_time = if current_duration.is_none() { @@ -428,15 +416,11 @@ impl<'a> Widget for BuffsBar<'a> { }; let click_to_remove = format!("<{}>", &localized_strings.get("buff.remove")); let desc_txt = match buff.kind { - BuffKind::Regeneration { .. } => { - localized_strings.get("buff.desc.heal_test") - }, + BuffKind::Regeneration { .. } => localized_strings.get("buff.desc.heal"), BuffKind::Saturation { .. } => { - localized_strings.get("buff.desc.saturation_test") - }, - BuffKind::Bleeding { .. } => { - localized_strings.get("debuff.desc.bleed_test") + localized_strings.get("buff.desc.saturation") }, + BuffKind::Bleeding { .. } => localized_strings.get("debuff.desc.bleed"), _ => localized_strings.get("buff.desc.missing"), }; let desc = if buff.is_buff { diff --git a/voxygen/src/hud/group.rs b/voxygen/src/hud/group.rs index b46df6fac3..516e36046e 100644 --- a/voxygen/src/hud/group.rs +++ b/voxygen/src/hud/group.rs @@ -482,7 +482,7 @@ impl<'a> Widget for Group<'a> { }) as u32; // Percentage to determine which frame of the timer overlay is displayed let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, - BuffKind::Saturation { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, }; @@ -511,13 +511,13 @@ impl<'a> Widget for Group<'a> { // Create Buff tooltip let title = match buff.kind { BuffKind::Regeneration { .. } => { - localized_strings.get("buff.title.heal_test") + localized_strings.get("buff.title.heal") }, BuffKind::Saturation { .. } => { - localized_strings.get("buff.title.saturation_test") + localized_strings.get("buff.title.saturation") }, BuffKind::Bleeding { .. } => { - localized_strings.get("debuff.title.bleed_test") + localized_strings.get("debuff.title.bleed") }, _ => localized_strings.get("buff.title.missing"), }; @@ -531,13 +531,13 @@ impl<'a> Widget for Group<'a> { }; let desc_txt = match buff.kind { BuffKind::Regeneration { .. } => { - localized_strings.get("buff.desc.heal_test") + localized_strings.get("buff.desc.heal") }, BuffKind::Saturation { .. } => { - localized_strings.get("buff.desc.saturation_test") + localized_strings.get("buff.desc.saturation") }, BuffKind::Bleeding { .. } => { - localized_strings.get("debuff.desc.bleed_test") + localized_strings.get("debuff.desc.bleed") }, _ => localized_strings.get("buff.desc.missing"), }; diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index fbb48033c0..fe7c495b64 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -352,6 +352,7 @@ image_ids! { // Buffs buff_plus_0: "voxygen.element.icons.de_buffs.buff_plus_0", + buff_saturation_0: "voxygen.element.icons.de_buffs.buff_saturation_0", // Debuffs debuff_skull_0: "voxygen.element.icons.de_buffs.debuff_skull_0", diff --git a/voxygen/src/hud/overhead.rs b/voxygen/src/hud/overhead.rs index eb3bdd1133..202082bf29 100644 --- a/voxygen/src/hud/overhead.rs +++ b/voxygen/src/hud/overhead.rs @@ -243,7 +243,7 @@ impl<'a> Widget for Overhead<'a> { }) as u32; // Percentage to determine which frame of the timer overlay is displayed let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, - BuffKind::Saturation { .. } => self.imgs.buff_plus_0, + BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, }; From 491fb7c85cebdf1a1ad1661d64cc967083b0d1d7 Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Mon, 2 Nov 2020 18:33:16 +0100 Subject: [PATCH 3/8] tweaks consumables buffs values --- assets/common/items/boss_drops/exp_flask.ron | 2 +- assets/common/items/boss_drops/potions.ron | 15 +++++++++++---- assets/common/items/boss_drops/xp_potion.ron | 2 +- assets/common/items/consumable/potion_big.ron | 13 ++++++++++--- assets/common/items/consumable/potion_med.ron | 13 ++++++++++--- assets/common/items/consumable/potion_minor.ron | 13 ++++++++++--- assets/common/items/food/apple.ron | 6 +++--- assets/common/items/food/apple_mushroom_curry.ron | 6 +++--- assets/common/items/food/apple_stick.ron | 6 +++--- assets/common/items/food/cheese.ron | 6 +++--- assets/common/items/food/coconut.ron | 6 +++--- assets/common/items/food/mushroom.ron | 4 ++-- assets/common/items/food/mushroom_stick.ron | 6 +++--- assets/common/items/food/sunflower_icetea.ron | 6 +++--- 14 files changed, 66 insertions(+), 38 deletions(-) diff --git a/assets/common/items/boss_drops/exp_flask.ron b/assets/common/items/boss_drops/exp_flask.ron index fd87fb20d7..9e88c3a247 100644 --- a/assets/common/items/boss_drops/exp_flask.ron +++ b/assets/common/items/boss_drops/exp_flask.ron @@ -1,6 +1,6 @@ ItemDef( name: "Flask of Velorite Dust", - description: "Increases Exp by 250\n\nTake with plenty of water\n\n", + description: "Increases Exp by 250\n\nTake with plenty of water", kind: Consumable( kind: "PotionExp", effect: [ diff --git a/assets/common/items/boss_drops/potions.ron b/assets/common/items/boss_drops/potions.ron index a98620f489..528d0b2e88 100644 --- a/assets/common/items/boss_drops/potions.ron +++ b/assets/common/items/boss_drops/potions.ron @@ -1,12 +1,19 @@ ItemDef( name: "Potent Potion", - description: "A potent healing potion.\n\nRestores 100 health on use\n\n", + description: "A potent healing potion.\n\nRestores 100 health on use", kind: Consumable( kind: "Potion", effect: [ - Health(( - amount: 1000, - cause: Item, + Buff(( + kind: Saturation, + data: ( + strength: 1000.0, + duration: Some(( + secs: 1, + nanos: 0, + )), + ), + cat_ids: [Natural], )), ] ), diff --git a/assets/common/items/boss_drops/xp_potion.ron b/assets/common/items/boss_drops/xp_potion.ron index 447e648695..eeb78ea21e 100644 --- a/assets/common/items/boss_drops/xp_potion.ron +++ b/assets/common/items/boss_drops/xp_potion.ron @@ -1,6 +1,6 @@ ItemDef( name: "Potion of Skill", - description: "Provides 250 XP to the drinker\n\n", + description: "Provides 250 XP to the drinker", kind: Consumable( kind: "Potion", effect: [ diff --git a/assets/common/items/consumable/potion_big.ron b/assets/common/items/consumable/potion_big.ron index d09f800e2d..d5849b7926 100644 --- a/assets/common/items/consumable/potion_big.ron +++ b/assets/common/items/consumable/potion_big.ron @@ -4,9 +4,16 @@ ItemDef( kind: Consumable( kind: "PotionLarge", effect: [ - Health(( - amount: 1000, - cause: Item, + Buff(( + kind: Saturation, + data: ( + strength: 1000.0, + duration: Some(( + secs: 1, + nanos: 0, + )), + ), + cat_ids: [Natural], )), ] ), diff --git a/assets/common/items/consumable/potion_med.ron b/assets/common/items/consumable/potion_med.ron index e1ab119579..081b87cdff 100644 --- a/assets/common/items/consumable/potion_med.ron +++ b/assets/common/items/consumable/potion_med.ron @@ -4,9 +4,16 @@ ItemDef( kind: Consumable( kind: "PotionMed", effect: [ - Health(( - amount: 700, - cause: Item, + Buff(( + kind: Saturation, + data: ( + strength: 700.0, + duration: Some(( + secs: 1, + nanos: 0, + )), + ), + cat_ids: [Natural], )), ] ), diff --git a/assets/common/items/consumable/potion_minor.ron b/assets/common/items/consumable/potion_minor.ron index 7b5e648225..7794c253e1 100644 --- a/assets/common/items/consumable/potion_minor.ron +++ b/assets/common/items/consumable/potion_minor.ron @@ -4,9 +4,16 @@ ItemDef( kind: Consumable( kind: "PotionMinor", effect: [ - Health(( - amount: 500, - cause: Item, + Buff(( + kind: Saturation, + data: ( + strength: 500.0, + duration: Some(( + secs: 1, + nanos: 0, + )), + ), + cat_ids: [Natural], )), ] ), diff --git a/assets/common/items/food/apple.ron b/assets/common/items/food/apple.ron index 2969acd184..31e294f3f3 100644 --- a/assets/common/items/food/apple.ron +++ b/assets/common/items/food/apple.ron @@ -1,15 +1,15 @@ ItemDef( name: "Apple", - description: "Restores 10 Health over 10 seconds\n\nRed and juicy", + description: "Restores 10 Health over 20 seconds\n\nRed and juicy", kind: Consumable( kind: "Apple", effect: [ Buff(( kind: Saturation, data: ( - strength: 10.0, + strength: 5.0, duration: Some(( - secs: 10, + secs: 20, nanos: 0, )), ), diff --git a/assets/common/items/food/apple_mushroom_curry.ron b/assets/common/items/food/apple_mushroom_curry.ron index 4c1ed514e5..281c228969 100644 --- a/assets/common/items/food/apple_mushroom_curry.ron +++ b/assets/common/items/food/apple_mushroom_curry.ron @@ -1,15 +1,15 @@ ItemDef( name: "Mushroom Curry", - description: "Restores 120 Health over 5 seconds\n\nWho could say no to that?", + description: "Restores 120 Health over 20 seconds\n\nWho could say no to that?", kind: Consumable( kind: "AppleShroomCurry", effect: [ Buff(( kind: Saturation, data: ( - strength: 240.0, + strength: 60.0, duration: Some(( - secs: 5, + secs: 20, nanos: 0, )), ), diff --git a/assets/common/items/food/apple_stick.ron b/assets/common/items/food/apple_stick.ron index e250220d64..f975c0c1a2 100644 --- a/assets/common/items/food/apple_stick.ron +++ b/assets/common/items/food/apple_stick.ron @@ -1,15 +1,15 @@ ItemDef( name: "Apple Stick", - description: "Restores 25 Health over 5 seconds\n\nThe stick makes it easier to carry!", + description: "Restores 25 Health over 20 seconds\n\nThe stick makes it easier to carry!", kind: Consumable( kind: "AppleStick", effect: [ Buff(( kind: Saturation, data: ( - strength: 50.0, + strength: 12.5, duration: Some(( - secs: 5, + secs: 20, nanos: 0, )), ), diff --git a/assets/common/items/food/cheese.ron b/assets/common/items/food/cheese.ron index cdd967d1af..182bf88b38 100644 --- a/assets/common/items/food/cheese.ron +++ b/assets/common/items/food/cheese.ron @@ -1,15 +1,15 @@ ItemDef( name: "Dwarven Cheese", - description: "Restores 15 Health over 10 seconds\n\nAromatic and nutritious", + description: "Restores 15 Health over 20 seconds\n\nAromatic and nutritious", kind: Consumable( kind: "Cheese", effect: [ Buff(( kind: Saturation, data: ( - strength: 15.0, + strength: 7.5, duration: Some(( - secs: 10, + secs: 20, nanos: 0, )), ), diff --git a/assets/common/items/food/coconut.ron b/assets/common/items/food/coconut.ron index 75992f3335..1032ed6f57 100644 --- a/assets/common/items/food/coconut.ron +++ b/assets/common/items/food/coconut.ron @@ -1,15 +1,15 @@ ItemDef( name: "Coconut", - description: "Restores 20 health over 10 seconds\n\nReliable source of water and fat", + description: "Restores 20 health over 20 seconds\n\nReliable source of water and fat", kind: Consumable( kind: "Coconut", effect: [ Buff(( kind: Saturation, data: ( - strength: 20.0, + strength: 10.0, duration: Some(( - secs: 10, + secs: 20, nanos: 0, )), ), diff --git a/assets/common/items/food/mushroom.ron b/assets/common/items/food/mushroom.ron index 08b26aed8a..35c09905d8 100644 --- a/assets/common/items/food/mushroom.ron +++ b/assets/common/items/food/mushroom.ron @@ -7,9 +7,9 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 5.0, + strength: 2.5, duration: Some(( - secs: 10, + secs: 20, nanos: 0, )), ), diff --git a/assets/common/items/food/mushroom_stick.ron b/assets/common/items/food/mushroom_stick.ron index 80cf305eb9..174e83ee26 100644 --- a/assets/common/items/food/mushroom_stick.ron +++ b/assets/common/items/food/mushroom_stick.ron @@ -1,15 +1,15 @@ ItemDef( name: "Mushroom Stick", - description: "Restores 20 Health over 5 seconds\n\nRoasted mushrooms on a stick for easy carrying.", + description: "Restores 20 Health over 20 seconds\n\nRoasted mushrooms on a stick for easy carrying", kind: Consumable( kind: "MushroomStick", effect: [ Buff(( kind: Saturation, data: ( - strength: 40.0, + strength: 10.0, duration: Some(( - secs: 5, + secs: 20, nanos: 0, )), ), diff --git a/assets/common/items/food/sunflower_icetea.ron b/assets/common/items/food/sunflower_icetea.ron index 8015388bfd..fa97fc2580 100644 --- a/assets/common/items/food/sunflower_icetea.ron +++ b/assets/common/items/food/sunflower_icetea.ron @@ -1,15 +1,15 @@ ItemDef( name: "Sunflower Ice Tea", - description: "Restores 50 Health over 5 seconds\n\nBrewed from freshly shelled sunflower seeds.", + description: "Restores 50 Health over 20 seconds\n\nBrewed from freshly shelled sunflower seeds", kind: Consumable( kind: "SunflowerTea", effect: [ Buff(( kind: Saturation, data: ( - strength: 100.0, + strength: 25.0, duration: Some(( - secs: 5, + secs: 20, nanos: 0, )), ), From b0a6e8a0431c3cc66200974985af34a8dcb989a5 Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Wed, 4 Nov 2020 23:17:24 +0100 Subject: [PATCH 4/8] easier to get minor potions increase cost of a minor potion to 4 apples --- assets/common/recipe_book.ron | 2 +- assets/voxygen/voxel/sprite_manifest.ron | 22 +++++++++++++++++++ common/src/comp/inventory/item/mod.rs | 2 ++ common/src/terrain/sprite.rs | 6 +++++ .../settlement/building/archetype/house.rs | 9 +++++++- 5 files changed, 39 insertions(+), 2 deletions(-) diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 171716fe70..80ad9b5e4d 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -6,7 +6,7 @@ // Ore and more "velorite_frag": (("common.items.ore.veloritefrag", 2), [("common.items.ore.velorite", 1), ("common.items.crafting_tools.craftsman_hammer", 0)]), //Potions - "potion_s": (("common.items.consumable.potion_minor", 1), [("common.items.crafting_ing.empty_vial", 1), ("common.items.ore.veloritefrag", 2)]), + "potion_s": (("common.items.consumable.potion_minor", 1), [("common.items.crafting_ing.empty_vial", 1), ("common.items.food.apple", 4), ("common.items.crafting_ing.honey", 1)]), "potion_m": (("common.items.consumable.potion_med", 1), [("common.items.consumable.potion_minor", 2), ("common.items.ore.veloritefrag", 4)]), "collar_basic": (("common.items.utility.collar", 1), [("common.items.crafting_ing.leather_scraps", 5), ("common.items.crafting_ing.shiny_gem", 1)]), "bomb_coconut": (("common.items.utility.bomb", 1), [("common.items.crafting_ing.stones", 10), ("common.items.food.coconut", 2), ("common.items.ore.veloritefrag", 2), ("common.items.crafting_tools.mortar_pestle", 0)]), diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index d3a876a2bd..0e7d3b07c4 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -1983,4 +1983,26 @@ Beehive: Some(( ], wind_sway: 0.1, )), +// Empty Flask +VialEmpty: Some(( + variations: [ + ( + model: "voxygen.voxel.object.potion_empty", + offset: (-5.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), +// Minor Potion +PotionMinor: Some(( + variations: [ + ( + model: "voxygen.voxel.object.potion_red", + offset: (-5.0, -5.0, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), ) diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 585c21b39a..9e06a15b27 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -337,6 +337,8 @@ impl Item { SpriteKind::Stones => "common.items.crafting_ing.stones", SpriteKind::Twigs => "common.items.crafting_ing.twigs", SpriteKind::ShinyGem => "common.items.crafting_ing.shiny_gem", + SpriteKind::VialEmpty => "common.items.crafting_ing.empty_vial", + SpriteKind::PotionMinor => "common.items.consumable.potion_minor", _ => return None, })) } diff --git a/common/src/terrain/sprite.rs b/common/src/terrain/sprite.rs index 40349525f9..53cb5a2ff8 100644 --- a/common/src/terrain/sprite.rs +++ b/common/src/terrain/sprite.rs @@ -102,6 +102,8 @@ make_case_elim!( Reed = 0x4C, Beehive = 0x4D, LargeCactus = 0x4E, + VialEmpty = 0x4F, + PotionMinor = 0x50, } ); @@ -184,6 +186,8 @@ impl SpriteKind { SpriteKind::ShinyGem => true, SpriteKind::Crate => true, SpriteKind::Beehive => true, + SpriteKind::VialEmpty => true, + SpriteKind::PotionMinor => true, _ => false, } } @@ -221,6 +225,8 @@ impl SpriteKind { | SpriteKind::DropGateBottom | SpriteKind::Door | SpriteKind::Beehive + | SpriteKind::PotionMinor + | SpriteKind::VialEmpty ) } } diff --git a/world/src/site/settlement/building/archetype/house.rs b/world/src/site/settlement/building/archetype/house.rs index 3c679cc973..8f81b8eec4 100644 --- a/world/src/site/settlement/building/archetype/house.rs +++ b/world/src/site/settlement/building/archetype/house.rs @@ -537,7 +537,7 @@ impl Archetype for House { center_offset.x, center_offset.y, z + 100, - )) % 11 + )) % 12 { 0 => SpriteKind::Planter, 1 => SpriteKind::ChairSingle, @@ -554,6 +554,13 @@ impl Archetype for House { 7 => SpriteKind::DrawerSmall, 8 => SpriteKind::TableSide, 9 => SpriteKind::WardrobeSingle, + 10 => { + if dynamic_rng.gen_range(0, 10) == 0 { + SpriteKind::PotionMinor + } else { + SpriteKind::VialEmpty + } + }, _ => SpriteKind::Pot, }; From c9b3b5b90444a28b4c68f0bcbb178bf5d18813ac Mon Sep 17 00:00:00 2001 From: Snowram Date: Thu, 5 Nov 2020 10:18:06 +0100 Subject: [PATCH 5/8] Buff stonegolem, nerf giants, add missing sfxs --- assets/common/items/food/mushroom.ron | 4 +- assets/voxygen/audio/sfx.ron | 62 ++++++++++++++++++++++++++- common/src/comp/body.rs | 2 +- common/src/comp/inventory/mod.rs | 4 +- server/src/sys/terrain.rs | 2 +- 5 files changed, 68 insertions(+), 6 deletions(-) diff --git a/assets/common/items/food/mushroom.ron b/assets/common/items/food/mushroom.ron index 35c09905d8..08b26aed8a 100644 --- a/assets/common/items/food/mushroom.ron +++ b/assets/common/items/food/mushroom.ron @@ -7,9 +7,9 @@ ItemDef( Buff(( kind: Saturation, data: ( - strength: 2.5, + strength: 5.0, duration: Some(( - secs: 20, + secs: 10, nanos: 0, )), ), diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index 91d6b5b3ee..fd826c758e 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -65,7 +65,7 @@ ], threshold: 0.5, ), - Glide: ( + Glide: ( files: [ // Event Missing or not implemented? ], @@ -383,6 +383,30 @@ ], threshold: 0.3, ), + Inventory(Consumed("PotionMed")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.liquid", + ], + threshold: 0.3, + ), + Inventory(Consumed("PotionLarge")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.liquid", + ], + threshold: 0.3, + ), + Inventory(Consumed("PotionExp")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.liquid", + ], + threshold: 0.3, + ), + Inventory(Consumed("SunflowerTea")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.liquid", + ], + threshold: 0.3, + ), Inventory(Consumed("Apple")): ( files: [ "voxygen.audio.sfx.inventory.consumable.apple", @@ -401,6 +425,42 @@ ], threshold: 0.3, ), + Inventory(Consumed("AppleShroomCurry")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), + Inventory(Consumed("AppleStick")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), + Inventory(Consumed("Coconut")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), + Inventory(Consumed("MushroomStick")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), + Inventory(Consumed("Velorite")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), + Inventory(Consumed("VeloriteFrag")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), Explosion: ( files: [ // in code diff --git a/common/src/comp/body.rs b/common/src/comp/body.rs index b1348e4b42..77e0737474 100644 --- a/common/src/comp/body.rs +++ b/common/src/comp/body.rs @@ -276,7 +276,7 @@ impl Body { _ => 1000, }, Body::Object(_) => 10000, - Body::Golem(_) => 2560, + Body::Golem(_) => 2740, Body::Theropod(_) => 50, Body::QuadrupedLow(quadruped_low) => match quadruped_low.species { quadruped_low::Species::Crocodile => 600, diff --git a/common/src/comp/inventory/mod.rs b/common/src/comp/inventory/mod.rs index f24fcc3ae1..53804f81ee 100644 --- a/common/src/comp/inventory/mod.rs +++ b/common/src/comp/inventory/mod.rs @@ -260,8 +260,10 @@ impl Default for Inventory { slots: vec![None; 36], amount: 0, }; + inventory.push(Item::new_from_asset_expect( + "common.items.consumable.potion_minor", + )); inventory.push(Item::new_from_asset_expect("common.items.food.cheese")); - inventory.push(Item::new_from_asset_expect("common.items.food.apple")); inventory } } diff --git a/server/src/sys/terrain.rs b/server/src/sys/terrain.rs index ec12b0bb34..39fdcb37c2 100644 --- a/server/src/sys/terrain.rs +++ b/server/src/sys/terrain.rs @@ -138,7 +138,7 @@ impl<'a> System<'a> for Sys { body, ); } - stats.level.set_level(rand::thread_rng().gen_range(30, 35)); + stats.level.set_level(rand::thread_rng().gen_range(25, 30)); scale = 2.0 + rand::random::(); } From 4c30dadf47446e212e3c372ebc2e6c50b6bcf722 Mon Sep 17 00:00:00 2001 From: Snowram Date: Thu, 5 Nov 2020 15:54:17 +0100 Subject: [PATCH 6/8] Adresses comment --- common/src/effect.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/effect.rs b/common/src/effect.rs index 336a976215..6bfdcb57a7 100644 --- a/common/src/effect.rs +++ b/common/src/effect.rs @@ -39,7 +39,9 @@ impl Effect { Effect::Damage(damage) => { damage.interpolate_damage(modifier, 0.0); }, - _ => {}, + Effect::Buff(effect) => { + effect.data.strength *= modifier; + }, } } } From 8da2871897a905f5edc6552b4edaf2b427af9dc6 Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Thu, 5 Nov 2020 21:02:54 +0100 Subject: [PATCH 7/8] potion buff --- assets/common/items/consumable/potion_big.ron | 2 +- assets/common/items/consumable/potion_med.ron | 2 +- assets/common/items/consumable/potion_minor.ron | 2 +- .../element/icons/de_buffs/buff_potion_0.png | Bin 0 -> 2139 bytes assets/voxygen/i18n/en.ron | 2 ++ common/src/comp/buff.rs | 7 +++++-- voxygen/src/hud/buffs.rs | 14 ++++++++++++++ voxygen/src/hud/group.rs | 1 + voxygen/src/hud/img_ids.rs | 1 + voxygen/src/hud/overhead.rs | 1 + 10 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 assets/voxygen/element/icons/de_buffs/buff_potion_0.png diff --git a/assets/common/items/consumable/potion_big.ron b/assets/common/items/consumable/potion_big.ron index d5849b7926..f16bab60e6 100644 --- a/assets/common/items/consumable/potion_big.ron +++ b/assets/common/items/consumable/potion_big.ron @@ -5,7 +5,7 @@ ItemDef( kind: "PotionLarge", effect: [ Buff(( - kind: Saturation, + kind: Potion, data: ( strength: 1000.0, duration: Some(( diff --git a/assets/common/items/consumable/potion_med.ron b/assets/common/items/consumable/potion_med.ron index 081b87cdff..2c3167d58b 100644 --- a/assets/common/items/consumable/potion_med.ron +++ b/assets/common/items/consumable/potion_med.ron @@ -5,7 +5,7 @@ ItemDef( kind: "PotionMed", effect: [ Buff(( - kind: Saturation, + kind: Potion, data: ( strength: 700.0, duration: Some(( diff --git a/assets/common/items/consumable/potion_minor.ron b/assets/common/items/consumable/potion_minor.ron index 7794c253e1..f829d67b1e 100644 --- a/assets/common/items/consumable/potion_minor.ron +++ b/assets/common/items/consumable/potion_minor.ron @@ -5,7 +5,7 @@ ItemDef( kind: "PotionMinor", effect: [ Buff(( - kind: Saturation, + kind: Potion, data: ( strength: 500.0, duration: Some(( diff --git a/assets/voxygen/element/icons/de_buffs/buff_potion_0.png b/assets/voxygen/element/icons/de_buffs/buff_potion_0.png new file mode 100644 index 0000000000000000000000000000000000000000..26d31655c3020d254f3bc8c6264072122fecd42b GIT binary patch literal 2139 zcmcIlOKjX!6g31vXgd;BgIa+=t}7u>>+$om$3HSD^J``#CJE_4!>-TI&ofqLY-2l_ zNrV7(kv0pYstb^S1+YMBRUx%2BoK)55gXR5p?f|{7N}g$FGHJ#2#JwAwx91i_uPB# zeRq3lVLo%4BQ?KtFOi!ckoDhJ;1&9!7+||$LsY>g9z#t_9EOvLx_*lVmk76jF!$N_~kh1rg)5 zED|X~nAgp$tf{JDoZ>OUNJ6?KBN1Z@X;x0*hd%+lMUHDNm(L7+!CPKvB}r&WQn%a9 zc9m=pH6__JO$lKMV-YOGc*9RfPxRvxBZM-GY2<~87x;XNNbF!O$qT@A5JD#$!}{?s zO^`6DM?y)?qBNwDVZFY$X{R%`j+4qdcp38D6*z8egiKmyaj+IqR#|6$a$@8xYz0XW zw}Sg{8-M->Lx+wXhHFu~pB{%wtj#)r9fPgh=NDR~h>;|S8bQz=3AHrx$YVK+`Df30 zz7urg=Tb()4XjKOmKRdhM379z4Ny%rECroJARii-)}am@l8{MbSwy)8Mi$a7SviU1 z9pk|9+>QO1*6UWyj}zikRx9TPAeHqz2jCP;H5G|UPA4KYRZTQC#S|5cREAaRx=8Nx zg8k)yuBDks_Yca}2`FHUvuP>RCNe_0m{S15c2z^P4O0_k(?Evf8Vb_r2yHR)pmRuj z5;bMz0HWz)9lKN)iLEnHH-VpFVpAkKa%HLzBD+}Ncl?%ub`aGA2ePY7uGdPXr6_Q{ zHhhSe=Zk!;Qqp8o(?pzwupDZ+LDV5oXkLdjnH2iXwCsTfgj@Au(0F6mNN3q=!>6{# z_p8$)G;NB!K+|eqjxb#Ic1iR80vf<}TMR(=sFHzM9JooBM6A#RN&dA8rTdYO$@<>Z z36fpIQB_g5bwzZkYKyjlOekMPGpUIkP-7JO|3ZD3R@x$dlfelq3I9Eq{gwN@I_%nj z`_lnu(d20`*mPGgQhKlsDonb&_;#v%)F}n%;j}d4p{7OB9IHDwY9WId7!<-F7Brw{ zLkkhtRYj_(dJZ{`qngTW-*4NycXzQ;&@n0(ONv>j6lB>b6;P?7l?{BRSdc4dVrL&? zKtbA@Yu|EWoPgW@63nRdaXcL1WjtP)4~j=HJiB*pz5#=GqgF07jKj3LxY*==xzo6H z==?Xyrh4^4!TmZjqaOKi`nLMmLzf@_cY$a|bW~IrHSD zr)Q^b7q4v{|MJ*(&s_ZJh1a)!UM?lKzHd&yM5;fmeI{(Tr>_25ym=*a true, BuffKind::Bleeding { .. } => false, BuffKind::Cursed { .. } => false, + BuffKind::Potion {..} => true, } } } @@ -124,13 +127,13 @@ impl Buff { }], data.duration, ), - BuffKind::Regeneration | BuffKind::Saturation => ( + BuffKind::Regeneration | BuffKind::Saturation | BuffKind::Potion => ( vec![BuffEffect::HealthChangeOverTime { rate: data.strength, accumulated: 0.0, }], data.duration, - ), + ), BuffKind::Cursed => ( vec![BuffEffect::MaxHealthModifier { value: -100. * data.strength, diff --git a/voxygen/src/hud/buffs.rs b/voxygen/src/hud/buffs.rs index 6e1e86f34f..da15858f8e 100644 --- a/voxygen/src/hud/buffs.rs +++ b/voxygen/src/hud/buffs.rs @@ -183,6 +183,7 @@ impl<'a> Widget for BuffsBar<'a> { let buff_img = match buff.kind { BuffKind::Regeneration { .. } => self.imgs.buff_plus_0, BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, + BuffKind::Potion { .. } => self.imgs.buff_potion_0, _ => self.imgs.missing_icon, }; let buff_widget = Image::new(buff_img).w_h(20.0, 20.0); @@ -209,6 +210,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.title.saturation") }, + BuffKind::Potion { .. } => { + localized_strings.get("buff.title.potion") + }, _ => localized_strings.get("buff.title.missing"), }; let remaining_time = if current_duration.is_none() { @@ -222,6 +226,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.desc.saturation") }, + BuffKind::Potion { .. } => { + localized_strings.get("buff.desc.potion") + }, _ => localized_strings.get("buff.desc.missing"), }; let desc = format!("{}\n\n{}\n\n{}", desc_txt, remaining_time, click_to_remove); @@ -381,6 +388,7 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, + BuffKind::Potion { .. } => self.imgs.buff_potion_0, }; let buff_widget = Image::new(buff_img).w_h(40.0, 40.0); // Sort buffs into rows of 6 slots @@ -406,6 +414,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.title.saturation") }, + BuffKind::Potion { .. } => { + localized_strings.get("buff.title.potion") + }, BuffKind::Bleeding { .. } => localized_strings.get("debuff.title.bleed"), _ => localized_strings.get("buff.title.missing"), }; @@ -420,6 +431,9 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.desc.saturation") }, + BuffKind::Potion { .. } => { + localized_strings.get("buff.desc.potion") + }, BuffKind::Bleeding { .. } => localized_strings.get("debuff.desc.bleed"), _ => localized_strings.get("buff.desc.missing"), }; diff --git a/voxygen/src/hud/group.rs b/voxygen/src/hud/group.rs index 516e36046e..6e12c18fed 100644 --- a/voxygen/src/hud/group.rs +++ b/voxygen/src/hud/group.rs @@ -485,6 +485,7 @@ impl<'a> Widget for Group<'a> { BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, + BuffKind::Potion { .. } => self.imgs.buff_potion_0, }; let buff_widget = Image::new(buff_img).w_h(15.0, 15.0); let buff_widget = if let Some(id) = prev_id { diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index fe7c495b64..48a42cd860 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -353,6 +353,7 @@ image_ids! { // Buffs buff_plus_0: "voxygen.element.icons.de_buffs.buff_plus_0", buff_saturation_0: "voxygen.element.icons.de_buffs.buff_saturation_0", + buff_potion_0: "voxygen.element.icons.de_buffs.buff_potion_0", // Debuffs debuff_skull_0: "voxygen.element.icons.de_buffs.debuff_skull_0", diff --git a/voxygen/src/hud/overhead.rs b/voxygen/src/hud/overhead.rs index 202082bf29..8d592a3501 100644 --- a/voxygen/src/hud/overhead.rs +++ b/voxygen/src/hud/overhead.rs @@ -246,6 +246,7 @@ impl<'a> Widget for Overhead<'a> { BuffKind::Saturation { .. } => self.imgs.buff_saturation_0, BuffKind::Bleeding { .. } => self.imgs.debuff_bleed_0, BuffKind::Cursed { .. } => self.imgs.debuff_skull_0, + BuffKind::Potion { .. } => self.imgs.buff_potion_0, }; let buff_widget = Image::new(buff_img).w_h(20.0, 20.0); // Sort buffs into rows of 5 slots From 4f6aae545900e0b02481510a616bc705b19e8ba5 Mon Sep 17 00:00:00 2001 From: Snowram Date: Thu, 5 Nov 2020 21:56:45 +0100 Subject: [PATCH 8/8] fmt --- common/src/comp/buff.rs | 4 ++-- voxygen/src/hud/buffs.rs | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/common/src/comp/buff.rs b/common/src/comp/buff.rs index 605c0aa5b8..d54da80d44 100644 --- a/common/src/comp/buff.rs +++ b/common/src/comp/buff.rs @@ -29,7 +29,7 @@ impl BuffKind { BuffKind::Saturation { .. } => true, BuffKind::Bleeding { .. } => false, BuffKind::Cursed { .. } => false, - BuffKind::Potion {..} => true, + BuffKind::Potion { .. } => true, } } } @@ -133,7 +133,7 @@ impl Buff { accumulated: 0.0, }], data.duration, - ), + ), BuffKind::Cursed => ( vec![BuffEffect::MaxHealthModifier { value: -100. * data.strength, diff --git a/voxygen/src/hud/buffs.rs b/voxygen/src/hud/buffs.rs index da15858f8e..ad8aeed4cc 100644 --- a/voxygen/src/hud/buffs.rs +++ b/voxygen/src/hud/buffs.rs @@ -210,9 +210,7 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.title.saturation") }, - BuffKind::Potion { .. } => { - localized_strings.get("buff.title.potion") - }, + BuffKind::Potion { .. } => localized_strings.get("buff.title.potion"), _ => localized_strings.get("buff.title.missing"), }; let remaining_time = if current_duration.is_none() { @@ -226,9 +224,7 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.desc.saturation") }, - BuffKind::Potion { .. } => { - localized_strings.get("buff.desc.potion") - }, + BuffKind::Potion { .. } => localized_strings.get("buff.desc.potion"), _ => localized_strings.get("buff.desc.missing"), }; let desc = format!("{}\n\n{}\n\n{}", desc_txt, remaining_time, click_to_remove); @@ -414,9 +410,7 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.title.saturation") }, - BuffKind::Potion { .. } => { - localized_strings.get("buff.title.potion") - }, + BuffKind::Potion { .. } => localized_strings.get("buff.title.potion"), BuffKind::Bleeding { .. } => localized_strings.get("debuff.title.bleed"), _ => localized_strings.get("buff.title.missing"), }; @@ -431,9 +425,7 @@ impl<'a> Widget for BuffsBar<'a> { BuffKind::Saturation { .. } => { localized_strings.get("buff.desc.saturation") }, - BuffKind::Potion { .. } => { - localized_strings.get("buff.desc.potion") - }, + BuffKind::Potion { .. } => localized_strings.get("buff.desc.potion"), BuffKind::Bleeding { .. } => localized_strings.get("debuff.desc.bleed"), _ => localized_strings.get("buff.desc.missing"), };