mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Sort tabs in logical sequence
This commit is contained in:
parent
c93748224b
commit
123b2814cf
@ -138,17 +138,18 @@ impl<'a> Crafting<'a> {
|
|||||||
#[derive(Copy, Clone, Debug, EnumIter, PartialEq)]
|
#[derive(Copy, Clone, Debug, EnumIter, PartialEq)]
|
||||||
pub enum CraftingTab {
|
pub enum CraftingTab {
|
||||||
All,
|
All,
|
||||||
|
Tool,
|
||||||
Armor,
|
Armor,
|
||||||
Weapon,
|
Weapon,
|
||||||
Food,
|
ProcessedMaterial,
|
||||||
Dismantle,
|
Dismantle,
|
||||||
|
Food,
|
||||||
Potion,
|
Potion,
|
||||||
Bag,
|
Bag,
|
||||||
Tool,
|
|
||||||
Utility,
|
Utility,
|
||||||
Glider,
|
Glider,
|
||||||
ProcessedMaterial,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CraftingTab {
|
impl CraftingTab {
|
||||||
fn name_key(&self) -> &str {
|
fn name_key(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
@ -205,10 +206,7 @@ impl CraftingTab {
|
|||||||
ItemKind::Tool(_) => !item.tags().contains(&ItemTag::CraftingTool),
|
ItemKind::Tool(_) => !item.tags().contains(&ItemTag::CraftingTool),
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
CraftingTab::Dismantle => match item.kind() {
|
CraftingTab::Dismantle => matches!(item.kind(), ItemKind::Ingredient { .. }),
|
||||||
ItemKind::Ingredient { .. } => !item.tags().contains(&ItemTag::CraftingTool),
|
|
||||||
_ => false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user