mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Debug items no longer have durability
This commit is contained in:
parent
553aa690b4
commit
9d503d1e1f
@ -1230,7 +1230,9 @@ impl Item {
|
||||
DurabilityMultiplier(mult)
|
||||
}
|
||||
|
||||
pub fn has_durability(&self) -> bool { self.kind().has_durability() }
|
||||
pub fn has_durability(&self) -> bool {
|
||||
self.kind().has_durability() && self.quality() != Quality::Debug
|
||||
}
|
||||
|
||||
pub fn increment_damage(&mut self, ability_map: &AbilityMap, msm: &MaterialStatManifest) {
|
||||
if let Some(durability_lost) = &mut self.durability_lost {
|
||||
@ -1353,7 +1355,9 @@ impl ItemDesc for ItemDef {
|
||||
|
||||
fn components(&self) -> &[Item] { &[] }
|
||||
|
||||
fn has_durability(&self) -> bool { self.kind().has_durability() }
|
||||
fn has_durability(&self) -> bool {
|
||||
self.kind().has_durability() && self.quality != Quality::Debug
|
||||
}
|
||||
|
||||
fn durability(&self) -> Option<u32> { None }
|
||||
|
||||
|
@ -773,7 +773,7 @@ impl<'a> Widget for ItemTooltip<'a> {
|
||||
);
|
||||
diff_text(text, buff_strength_diff.1, 6)
|
||||
}
|
||||
if tool_durability != equipped_durability {
|
||||
if tool_durability != equipped_durability && item.has_durability() {
|
||||
let text = format!(
|
||||
"{} {}",
|
||||
&durability_diff.0,
|
||||
@ -1020,7 +1020,7 @@ impl<'a> Widget for ItemTooltip<'a> {
|
||||
}
|
||||
index += armor_stats.stealth.is_some() as usize;
|
||||
|
||||
if armor_durability != equipped_durability {
|
||||
if armor_durability != equipped_durability && item.has_durability() {
|
||||
let diff = armor_durability.unwrap_or(Item::MAX_DURABILITY) as i32
|
||||
- equipped_durability.unwrap_or(Item::MAX_DURABILITY) as i32;
|
||||
let text = format!("{} {}", &durability_diff.0, diff);
|
||||
|
Loading…
Reference in New Issue
Block a user