mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed opening salvaging station not showing salvage text.
This commit is contained in:
parent
d089a5d239
commit
e70230819d
@ -184,13 +184,13 @@ impl Material {
|
||||
| Material::Hardwood
|
||||
| Material::Ironwood
|
||||
| Material::Frostwood
|
||||
| Material::Eldwood => unreachable!(),
|
||||
| Material::Eldwood => unimplemented!(),
|
||||
Material::Rock
|
||||
| Material::Granite
|
||||
| Material::Bone
|
||||
| Material::Basalt
|
||||
| Material::Obsidian
|
||||
| Material::Velorite => unreachable!(),
|
||||
| Material::Velorite => unimplemented!(),
|
||||
Material::Linen => "common.items.crafting_ing.cloth.linen",
|
||||
Material::Wool => "common.items.crafting_ing.cloth.wool",
|
||||
Material::Silk => "common.items.crafting_ing.cloth.silk",
|
||||
|
@ -583,6 +583,11 @@ impl<'a> Widget for Crafting<'a> {
|
||||
if state.selected_recipe.as_ref() == Some(name) {
|
||||
state.update(|s| s.selected_recipe = None);
|
||||
} else {
|
||||
if matches!(self.show.crafting_tab, CraftingTab::Dismantle) {
|
||||
// If current tab is dismantle, and recipe is selected, change to general
|
||||
// tab, as in dismantle tab recipe gets deselected
|
||||
events.push(Event::ChangeCraftingTab(CraftingTab::All));
|
||||
}
|
||||
state.update(|s| s.selected_recipe = Some(name.clone()));
|
||||
}
|
||||
}
|
||||
@ -641,6 +646,12 @@ impl<'a> Widget for Crafting<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
// Deselect recipe if current tab is dismantle, elsewhere if recipe selected
|
||||
// while dismantling, tab is changed to general
|
||||
if matches!(self.show.crafting_tab, CraftingTab::Dismantle) {
|
||||
state.update(|s| s.selected_recipe = None);
|
||||
}
|
||||
|
||||
// Selected Recipe
|
||||
if let Some((recipe_name, recipe)) = state
|
||||
.selected_recipe
|
||||
@ -959,7 +970,7 @@ impl<'a> Widget for Crafting<'a> {
|
||||
.hover_image(self.imgs.wpn_icon_border_mo)
|
||||
.with_item_tooltip(
|
||||
self.item_tooltip_manager,
|
||||
vec![&*item_def],
|
||||
core::iter::once(&*item_def as &dyn ItemDesc),
|
||||
&None,
|
||||
&item_tooltip,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user