From 123b2814cfd64d20f48a626cfe348ab1d77fb21a Mon Sep 17 00:00:00 2001 From: juliancoffee Date: Sat, 26 Jun 2021 16:23:11 +0300 Subject: [PATCH] Sort tabs in logical sequence --- voxygen/src/hud/crafting.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index c635fc90e0..d9c99ef407 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -138,17 +138,18 @@ impl<'a> Crafting<'a> { #[derive(Copy, Clone, Debug, EnumIter, PartialEq)] pub enum CraftingTab { All, + Tool, Armor, Weapon, - Food, + ProcessedMaterial, Dismantle, + Food, Potion, Bag, - Tool, Utility, Glider, - ProcessedMaterial, } + impl CraftingTab { fn name_key(&self) -> &str { match self { @@ -205,10 +206,7 @@ impl CraftingTab { ItemKind::Tool(_) => !item.tags().contains(&ItemTag::CraftingTool), _ => false, }, - CraftingTab::Dismantle => match item.kind() { - ItemKind::Ingredient { .. } => !item.tags().contains(&ItemTag::CraftingTool), - _ => false, - }, + CraftingTab::Dismantle => matches!(item.kind(), ItemKind::Ingredient { .. }), } } }