From db0c636e16d7eec0abf48780120eafe4851243a3 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 5 Oct 2021 17:27:11 -0400 Subject: [PATCH 01/18] Backend stuff for salvaging. --- assets/common/recipe_book.ron | 18 +-- client/src/lib.rs | 3 +- common/src/comp/controller.rs | 14 ++- common/src/comp/inventory/item/mod.rs | 75 +++++++++++++ common/src/comp/mod.rs | 2 +- common/src/recipe.rs | 49 +++++++-- server/src/events/inventory_manip.rs | 151 ++++++++++++++++---------- 7 files changed, 232 insertions(+), 80 deletions(-) diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index cb49dea6fd..68b4898466 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -1927,15 +1927,15 @@ craft_sprite: Some(Anvil), is_recycling: false, ), - "linen": ( - output: ("common.items.crafting_ing.cloth.linen", 1), - inputs: [ - (Tag(Material(Linen)), 1), - (Item("common.items.crafting_tools.sewing_set"), 0), - ], - craft_sprite: None, - is_recycling: true, - ), + // "linen": ( + // output: ("common.items.crafting_ing.cloth.linen", 1), + // inputs: [ + // (Tag(Material(Linen)), 1), + // (Item("common.items.crafting_tools.sewing_set"), 0), + // ], + // craft_sprite: None, + // is_recycling: true, + // ), "wool": ( output: ("common.items.crafting_ing.cloth.wool", 1), inputs: [ diff --git a/client/src/lib.rs b/client/src/lib.rs index bdbcf94da0..7ddc91b0a6 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -23,6 +23,7 @@ use common::{ comp::{ self, chat::{KillSource, KillType}, + controller::CraftEvent, group, invite::{InviteKind, InviteResponse}, skills::Skill, @@ -1004,7 +1005,7 @@ impl Client { if can_craft && has_sprite { self.send_msg(ClientGeneral::ControlEvent(ControlEvent::InventoryEvent( InventoryEvent::CraftRecipe { - recipe: recipe.to_string(), + craft_event: CraftEvent::Simple(recipe.to_string()), craft_sprite: craft_sprite.map(|(pos, _)| pos), }, ))); diff --git a/common/src/comp/controller.rs b/common/src/comp/controller.rs index a3b9ca9076..61e2af20ab 100644 --- a/common/src/comp/controller.rs +++ b/common/src/comp/controller.rs @@ -23,7 +23,7 @@ pub enum InventoryEvent { SplitDrop(InvSlotId), Sort, CraftRecipe { - recipe: String, + craft_event: CraftEvent, craft_sprite: Option>, }, } @@ -48,7 +48,7 @@ pub enum InventoryManip { SplitDrop(Slot), Sort, CraftRecipe { - recipe: String, + craft_event: CraftEvent, craft_sprite: Option>, }, SwapEquippedWeapons, @@ -80,16 +80,22 @@ impl From for InventoryManip { InventoryEvent::SplitDrop(inv) => Self::SplitDrop(Slot::Inventory(inv)), InventoryEvent::Sort => Self::Sort, InventoryEvent::CraftRecipe { - recipe, + craft_event, craft_sprite, } => Self::CraftRecipe { - recipe, + craft_event, craft_sprite, }, } } } +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +pub enum CraftEvent { + Simple(String), + Salvage(InvSlotId), +} + #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum GroupManip { Leave, diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 2eec60db2e..53d3adde18 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -170,6 +170,41 @@ impl Material { | Material::Dragonscale => MaterialKind::Hide, } } + + pub fn asset_identifier(&self) -> &'static str { + match self { + Material::Bronze => "common.items.mineral.ingot.bronze", + Material::Iron => "common.items.mineral.ingot.iron", + Material::Steel => "common.items.mineral.ingot.steel", + Material::Cobalt => "common.items.mineral.ingot.cobalt", + Material::Bloodsteel => "common.items.mineral.ingot.bloodsteel", + Material::Orichalcum => "common.items.mineral.ingot.orichalcum", + Material::Wood + | Material::Bamboo + | Material::Hardwood + | Material::Ironwood + | Material::Frostwood + | Material::Eldwood => unreachable!(), + Material::Rock + | Material::Granite + | Material::Bone + | Material::Basalt + | Material::Obsidian + | Material::Velorite => unreachable!(), + Material::Linen => "common.items.crafting_ing.cloth.linen", + Material::Wool => "common.items.crafting_ing.cloth.wool", + Material::Silk => "common.items.crafting_ing.cloth.silk", + Material::Lifecloth => "common.items.crafting_ing.cloth.lifecloth", + Material::Moonweave => "common.items.crafting_ing.cloth.moonweave", + Material::Sunsilk => "common.items.crafting_ing.cloth.sunsilk", + Material::Rawhide => "common.items.crafting_ing.leather.simple_leather", + Material::Leather => "common.items.crafting_ing.leather.thick_leather", + Material::Scale => "common.items.crafting_ing.leather.scales", + Material::Carapace => "common.items.crafting_ing.leather.carapace", + Material::Plate => "common.items.crafting_ing.leather.plate", + Material::Dragonscale => "common.items.crafting_ing.leather.dragon_scale", + } + } } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -202,6 +237,7 @@ pub enum ItemTag { CraftingTool, // Pickaxe, Craftsman-Hammer, Sewing-Set Utility, Bag, + SalvageInto(Material), } impl TagExampleInfo for ItemTag { @@ -219,6 +255,7 @@ impl TagExampleInfo for ItemTag { ItemTag::CraftingTool => "tool", ItemTag::Utility => "utility", ItemTag::Bag => "bag", + ItemTag::SalvageInto(_) => "salvage", } } @@ -237,6 +274,7 @@ impl TagExampleInfo for ItemTag { ItemTag::CraftingTool => "common.items.tag_examples.placeholder", ItemTag::Utility => "common.items.tag_examples.placeholder", ItemTag::Bag => "common.items.tag_examples.placeholder", + ItemTag::SalvageInto(_) => "common.items.tag_examples.placeholder", } } } @@ -759,6 +797,43 @@ impl Item { } } + pub fn is_salvageable(&self) -> bool { + self.item_def + .tags + .iter() + .any(|tag| matches!(tag, ItemTag::SalvageInto(_))) + } + + // Attempts to salvage an item, returning the salvaged items if salvageable, + // else the original item is not Theoretically supports returning multiple + // items, only returns one per tag in the item for now + pub fn try_salvage(self) -> Result, Item> { + if !self.is_salvageable() { + return Err(self); + } + + let salvaged_items: Vec<_> = self + .item_def + .tags + .iter() + .filter_map(|tag| { + if let ItemTag::SalvageInto(material) = tag { + Some(material) + } else { + None + } + }) + .map(|material| material.asset_identifier()) + .map(|asset| Item::new_from_asset_expect(asset)) + .collect(); + + if salvaged_items.is_empty() { + Err(self) + } else { + Ok(salvaged_items) + } + } + pub fn name(&self) -> &str { &self.item_def.name } pub fn description(&self) -> &str { &self.item_def.description } diff --git a/common/src/comp/mod.rs b/common/src/comp/mod.rs index 677b5c17e2..4d6411722c 100644 --- a/common/src/comp/mod.rs +++ b/common/src/comp/mod.rs @@ -13,7 +13,7 @@ pub mod character_state; #[cfg(not(target_arch = "wasm32"))] pub mod combo; pub mod compass; #[cfg(not(target_arch = "wasm32"))] -mod controller; +pub mod controller; #[cfg(not(target_arch = "wasm32"))] pub mod dialogue; #[cfg(not(target_arch = "wasm32"))] mod energy; diff --git a/common/src/recipe.rs b/common/src/recipe.rs index 8130e52ea0..821272b28d 100644 --- a/common/src/recipe.rs +++ b/common/src/recipe.rs @@ -1,6 +1,7 @@ use crate::{ assets::{self, AssetExt, AssetHandle}, comp::{ + inventory::slot::InvSlotId, item::{modular, tool::AbilityMap, ItemDef, ItemTag, MaterialStatManifest}, Inventory, Item, }, @@ -32,7 +33,7 @@ impl Recipe { inv: &mut Inventory, ability_map: &AbilityMap, msm: &MaterialStatManifest, - ) -> Result, Vec<(&RecipeInput, u32)>> { + ) -> Result<(Item, u32), Vec<(&RecipeInput, u32)>> { // Get ingredient cells from inventory, let mut components = Vec::new(); @@ -47,15 +48,18 @@ impl Recipe { }) }); - for i in 0..self.output.1 { - let crafted_item = - Item::new_from_item_def(Arc::clone(&self.output.0), &components, ability_map, msm); - if let Err(item) = inv.push(crafted_item) { - return Ok(Some((item, self.output.1 - i))); - } - } + let crafted_item = + Item::new_from_item_def(Arc::clone(&self.output.0), &components, ability_map, msm); - Ok(None) + Ok((crafted_item, self.output.1)) + + // for i in 0..self.output.1 { + // if let Err(item) = inv.push(crafted_item) { + // return Ok(Some((item, self.output.1 - i))); + // } + // } + + // Ok(None) } pub fn inputs(&self) -> impl ExactSizeIterator { @@ -65,6 +69,33 @@ impl Recipe { } } +pub enum SalvageError { + NotSalvageable, +} + +pub fn try_salvage( + inv: &mut Inventory, + slot: InvSlotId, + ability_map: &AbilityMap, + msm: &MaterialStatManifest, +) -> Result, SalvageError> { + if inv.get(slot).map_or(false, |item| item.is_salvageable()) { + let salvage_item = inv + .take(slot, ability_map, msm) + .expect("Expected item to exist in inventory"); + match salvage_item.try_salvage() { + Ok(items) => Ok(items), + Err(item) => { + inv.push(item) + .expect("Item taken from inventory just before"); + Err(SalvageError::NotSalvageable) + }, + } + } else { + Err(SalvageError::NotSalvageable) + } +} + #[derive(Clone, Debug, Serialize, Deserialize)] pub struct RecipeBook { recipes: HashMap, diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index fb27e9354f..b2843f6322 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -11,7 +11,7 @@ use common::{ slot::{self, Slot}, }, consts::MAX_PICKUP_RANGE, - recipe::default_recipe_book, + recipe::{self, default_recipe_book}, trade::Trades, uid::Uid, util::find_dist::{self, FindDist}, @@ -563,53 +563,91 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv drop(inventories); }, comp::InventoryManip::CraftRecipe { - recipe, + craft_event, craft_sprite, } => { + use comp::controller::CraftEvent; let recipe_book = default_recipe_book().read(); - let craft_result = recipe_book - .get(&recipe) - .filter(|r| { - if let Some(needed_sprite) = r.craft_sprite { - let sprite = craft_sprite - .filter(|pos| { - let entity_cylinder = get_cylinder(state, entity); - if !within_pickup_range(entity_cylinder, || { - Some(find_dist::Cube { - min: pos.as_(), - side_length: 1.0, - }) - }) { - debug!( - ?entity_cylinder, - "Failed to craft recipe as not within range of required \ - sprite, sprite pos: {}", - pos - ); - false - } else { - true - } - }) - .and_then(|pos| state.terrain().get(pos).ok().copied()) - .and_then(|block| block.get_sprite()); - Some(needed_sprite) == sprite - } else { - true + let ability_map = &state.ecs().read_resource::(); + let msm = state.ecs().read_resource::(); + + let crafted_items = match craft_event { + CraftEvent::Simple(recipe) => recipe_book + .get(&recipe) + .filter(|r| { + if let Some(needed_sprite) = r.craft_sprite { + let sprite = craft_sprite + .filter(|pos| { + let entity_cylinder = get_cylinder(state, entity); + if !within_pickup_range(entity_cylinder, || { + Some(find_dist::Cube { + min: pos.as_(), + side_length: 1.0, + }) + }) { + debug!( + ?entity_cylinder, + "Failed to craft recipe as not within range of \ + required sprite, sprite pos: {}", + pos + ); + false + } else { + true + } + }) + .and_then(|pos| state.terrain().get(pos).ok().copied()) + .and_then(|block| block.get_sprite()); + Some(needed_sprite) == sprite + } else { + true + } + }) + .and_then(|r| { + r.perform( + &mut inventory, + &state.ecs().read_resource::(), + &state.ecs().read_resource::(), + ) + .ok() + }) + .map(|(crafted_item, amount)| { + let mut crafted_items = Vec::with_capacity(amount as usize); + for _ in 0..amount { + crafted_items.push(crafted_item.duplicate(ability_map, &msm)); + } + crafted_items + }), + CraftEvent::Salvage(slot) => { + recipe::try_salvage(&mut inventory, slot, ability_map, &msm).ok() + }, + }; + + // Attempt to insert items into inventory, dropping them if there is not enough + // space + let items_were_crafted = if let Some(crafted_items) = crafted_items { + for item in crafted_items { + if let Err(item) = inventory.push(item) { + dropped_items.push(( + state + .read_component_copied::(entity) + .unwrap_or_default(), + state + .read_component_copied::(entity) + .unwrap_or_default(), + item.duplicate(ability_map, &msm), + )); } - }) - .and_then(|r| { - r.perform( - &mut inventory, - &state.ecs().read_resource::(), - &state.ecs().read_resource::(), - ) - .ok() - }); + } + true + } else { + false + }; + drop(inventories); // FIXME: We should really require the drop and write to be atomic! - if craft_result.is_some() { + if items_were_crafted { let _ = state.ecs().write_storage().insert( entity, comp::InventoryUpdate::new(comp::InventoryUpdateEvent::Craft), @@ -617,21 +655,22 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv } // Drop the item if there wasn't enough space - if let Some(Some((item, amount))) = craft_result { - let ability_map = &state.ecs().read_resource::(); - let msm = state.ecs().read_resource::(); - for _ in 0..amount { - dropped_items.push(( - state - .read_component_copied::(entity) - .unwrap_or_default(), - state - .read_component_copied::(entity) - .unwrap_or_default(), - item.duplicate(ability_map, &msm), - )); - } - } + // if let Some(Some((item, amount))) = craft_result { + // let ability_map = &state.ecs().read_resource::(); + // let msm = + // state.ecs().read_resource::(); + // for _ in 0..amount { + // dropped_items.push(( + // state + // .read_component_copied::(entity) + // .unwrap_or_default(), + // state + // .read_component_copied::(entity) + // .unwrap_or_default(), + // item.duplicate(ability_map, &msm), + // )); + // } + // } }, comp::InventoryManip::Sort => { inventory.sort(); From cb5630b69ccf36e9ac2d4120cf1ee5242ec65f2f Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 5 Oct 2021 18:58:34 -0400 Subject: [PATCH 02/18] Added salvage tags to items, removed old salvage recipes from recipe book. --- assets/common/items/armor/assassin/belt.ron | 1 + assets/common/items/armor/assassin/chest.ron | 1 + assets/common/items/armor/assassin/foot.ron | 1 + assets/common/items/armor/assassin/hand.ron | 1 + assets/common/items/armor/assassin/head.ron | 1 + assets/common/items/armor/assassin/pants.ron | 1 + .../common/items/armor/assassin/shoulder.ron | 1 + .../common/items/armor/bonerattler/belt.ron | 1 + .../common/items/armor/bonerattler/chest.ron | 1 + .../common/items/armor/bonerattler/foot.ron | 1 + .../common/items/armor/bonerattler/hand.ron | 1 + .../common/items/armor/bonerattler/pants.ron | 1 + .../items/armor/bonerattler/shoulder.ron | 1 + .../common/items/armor/cloth/druid/back.ron | 1 + .../common/items/armor/cloth/druid/belt.ron | 1 + .../common/items/armor/cloth/druid/chest.ron | 1 + .../common/items/armor/cloth/druid/foot.ron | 1 + .../common/items/armor/cloth/druid/hand.ron | 1 + .../common/items/armor/cloth/druid/pants.ron | 1 + .../items/armor/cloth/druid/shoulder.ron | 1 + .../common/items/armor/cloth/linen/back.ron | 1 + .../common/items/armor/cloth/linen/belt.ron | 1 + .../common/items/armor/cloth/linen/chest.ron | 1 + .../common/items/armor/cloth/linen/foot.ron | 1 + .../common/items/armor/cloth/linen/hand.ron | 1 + .../common/items/armor/cloth/linen/pants.ron | 1 + .../items/armor/cloth/linen/shoulder.ron | 1 + .../items/armor/cloth/moonweave/back.ron | 1 + .../items/armor/cloth/moonweave/belt.ron | 1 + .../items/armor/cloth/moonweave/chest.ron | 1 + .../items/armor/cloth/moonweave/foot.ron | 1 + .../items/armor/cloth/moonweave/hand.ron | 1 + .../items/armor/cloth/moonweave/pants.ron | 1 + .../items/armor/cloth/moonweave/shoulder.ron | 1 + .../common/items/armor/cloth/silken/back.ron | 1 + .../common/items/armor/cloth/silken/belt.ron | 1 + .../common/items/armor/cloth/silken/chest.ron | 1 + .../common/items/armor/cloth/silken/foot.ron | 1 + .../common/items/armor/cloth/silken/hand.ron | 1 + .../common/items/armor/cloth/silken/pants.ron | 1 + .../items/armor/cloth/silken/shoulder.ron | 1 + .../common/items/armor/cloth/sunsilk/back.ron | 1 + .../common/items/armor/cloth/sunsilk/belt.ron | 1 + .../items/armor/cloth/sunsilk/chest.ron | 1 + .../common/items/armor/cloth/sunsilk/foot.ron | 1 + .../common/items/armor/cloth/sunsilk/hand.ron | 1 + .../items/armor/cloth/sunsilk/pants.ron | 1 + .../items/armor/cloth/sunsilk/shoulder.ron | 1 + .../common/items/armor/cloth/woolen/back.ron | 1 + .../common/items/armor/cloth/woolen/belt.ron | 1 + .../common/items/armor/cloth/woolen/chest.ron | 1 + .../common/items/armor/cloth/woolen/foot.ron | 1 + .../common/items/armor/cloth/woolen/hand.ron | 1 + .../common/items/armor/cloth/woolen/pants.ron | 1 + .../items/armor/cloth/woolen/shoulder.ron | 1 + assets/common/items/armor/cloth_blue/belt.ron | 1 + .../common/items/armor/cloth_blue/chest.ron | 1 + assets/common/items/armor/cloth_blue/foot.ron | 1 + assets/common/items/armor/cloth_blue/hand.ron | 1 + .../common/items/armor/cloth_blue/pants.ron | 1 + .../items/armor/cloth_blue/shoulder_0.ron | 1 + .../items/armor/cloth_blue/shoulder_1.ron | 1 + .../common/items/armor/cloth_green/belt.ron | 1 + .../common/items/armor/cloth_green/chest.ron | 1 + .../common/items/armor/cloth_green/foot.ron | 1 + .../common/items/armor/cloth_green/hand.ron | 1 + .../common/items/armor/cloth_green/pants.ron | 1 + .../items/armor/cloth_green/shoulder.ron | 1 + .../common/items/armor/cloth_purple/belt.ron | 1 + .../common/items/armor/cloth_purple/chest.ron | 1 + .../common/items/armor/cloth_purple/foot.ron | 1 + .../common/items/armor/cloth_purple/hand.ron | 1 + .../common/items/armor/cloth_purple/pants.ron | 1 + .../items/armor/cloth_purple/shoulder.ron | 1 + .../common/items/armor/hide/carapace/back.ron | 1 + .../common/items/armor/hide/carapace/belt.ron | 1 + .../items/armor/hide/carapace/chest.ron | 1 + .../common/items/armor/hide/carapace/foot.ron | 1 + .../common/items/armor/hide/carapace/hand.ron | 1 + .../items/armor/hide/carapace/pants.ron | 1 + .../items/armor/hide/carapace/shoulder.ron | 1 + .../items/armor/hide/dragonscale/back.ron | 1 + .../items/armor/hide/dragonscale/belt.ron | 1 + .../items/armor/hide/dragonscale/chest.ron | 1 + .../items/armor/hide/dragonscale/foot.ron | 1 + .../items/armor/hide/dragonscale/hand.ron | 1 + .../items/armor/hide/dragonscale/pants.ron | 1 + .../items/armor/hide/dragonscale/shoulder.ron | 1 + .../common/items/armor/hide/leather/back.ron | 1 + .../common/items/armor/hide/leather/belt.ron | 1 + .../common/items/armor/hide/leather/chest.ron | 1 + .../common/items/armor/hide/leather/foot.ron | 1 + .../common/items/armor/hide/leather/hand.ron | 1 + .../common/items/armor/hide/leather/head.ron | 1 + .../common/items/armor/hide/leather/pants.ron | 1 + .../items/armor/hide/leather/shoulder.ron | 1 + .../common/items/armor/hide/primal/back.ron | 1 + .../common/items/armor/hide/primal/belt.ron | 1 + .../common/items/armor/hide/primal/chest.ron | 1 + .../common/items/armor/hide/primal/foot.ron | 1 + .../common/items/armor/hide/primal/hand.ron | 1 + .../common/items/armor/hide/primal/pants.ron | 1 + .../items/armor/hide/primal/shoulder.ron | 1 + .../common/items/armor/hide/rawhide/back.ron | 1 + .../common/items/armor/hide/rawhide/belt.ron | 1 + .../common/items/armor/hide/rawhide/chest.ron | 1 + .../common/items/armor/hide/rawhide/foot.ron | 1 + .../common/items/armor/hide/rawhide/hand.ron | 1 + .../common/items/armor/hide/rawhide/pants.ron | 1 + .../items/armor/hide/rawhide/shoulder.ron | 1 + assets/common/items/armor/hide/scale/back.ron | 1 + assets/common/items/armor/hide/scale/belt.ron | 1 + .../common/items/armor/hide/scale/chest.ron | 1 + assets/common/items/armor/hide/scale/foot.ron | 1 + assets/common/items/armor/hide/scale/hand.ron | 1 + .../common/items/armor/hide/scale/pants.ron | 1 + .../items/armor/hide/scale/shoulder.ron | 1 + .../common/items/armor/leather_plate/belt.ron | 1 + .../items/armor/leather_plate/chest.ron | 1 + .../common/items/armor/leather_plate/foot.ron | 1 + .../common/items/armor/leather_plate/hand.ron | 1 + .../items/armor/leather_plate/pants.ron | 1 + .../items/armor/leather_plate/shoulder.ron | 1 + .../items/armor/mail/bloodsteel/back.ron | 1 + .../items/armor/mail/bloodsteel/belt.ron | 1 + .../items/armor/mail/bloodsteel/chest.ron | 1 + .../items/armor/mail/bloodsteel/foot.ron | 1 + .../items/armor/mail/bloodsteel/hand.ron | 1 + .../items/armor/mail/bloodsteel/pants.ron | 1 + .../items/armor/mail/bloodsteel/shoulder.ron | 1 + .../common/items/armor/mail/bronze/back.ron | 1 + .../common/items/armor/mail/bronze/belt.ron | 1 + .../common/items/armor/mail/bronze/chest.ron | 1 + .../common/items/armor/mail/bronze/foot.ron | 1 + .../common/items/armor/mail/bronze/hand.ron | 1 + .../common/items/armor/mail/bronze/pants.ron | 1 + .../items/armor/mail/bronze/shoulder.ron | 1 + .../common/items/armor/mail/cobalt/back.ron | 1 + .../common/items/armor/mail/cobalt/belt.ron | 1 + .../common/items/armor/mail/cobalt/chest.ron | 1 + .../common/items/armor/mail/cobalt/foot.ron | 1 + .../common/items/armor/mail/cobalt/hand.ron | 1 + .../common/items/armor/mail/cobalt/pants.ron | 1 + .../items/armor/mail/cobalt/shoulder.ron | 1 + assets/common/items/armor/mail/iron/back.ron | 1 + assets/common/items/armor/mail/iron/belt.ron | 1 + assets/common/items/armor/mail/iron/chest.ron | 1 + assets/common/items/armor/mail/iron/foot.ron | 1 + assets/common/items/armor/mail/iron/hand.ron | 1 + assets/common/items/armor/mail/iron/pants.ron | 1 + .../common/items/armor/mail/iron/shoulder.ron | 1 + .../items/armor/mail/orichalcum/back.ron | 1 + .../items/armor/mail/orichalcum/belt.ron | 1 + .../items/armor/mail/orichalcum/chest.ron | 1 + .../items/armor/mail/orichalcum/foot.ron | 1 + .../items/armor/mail/orichalcum/hand.ron | 1 + .../items/armor/mail/orichalcum/pants.ron | 1 + .../items/armor/mail/orichalcum/shoulder.ron | 1 + assets/common/items/armor/mail/steel/back.ron | 1 + assets/common/items/armor/mail/steel/belt.ron | 1 + .../common/items/armor/mail/steel/chest.ron | 1 + assets/common/items/armor/mail/steel/foot.ron | 1 + assets/common/items/armor/mail/steel/hand.ron | 1 + .../common/items/armor/mail/steel/pants.ron | 1 + .../items/armor/mail/steel/shoulder.ron | 1 + .../common/items/armor/misc/back/short_1.ron | 1 + .../items/armor/misc/chest/worker_green_0.ron | 1 + .../items/armor/misc/chest/worker_green_1.ron | 1 + .../armor/misc/chest/worker_orange_0.ron | 1 + .../armor/misc/chest/worker_orange_1.ron | 1 + .../armor/misc/chest/worker_purple_0.ron | 1 + .../armor/misc/chest/worker_purple_1.ron | 1 + .../armor/misc/chest/worker_purple_brown.ron | 1 + .../items/armor/misc/chest/worker_red_0.ron | 1 + .../items/armor/misc/chest/worker_red_1.ron | 1 + .../armor/misc/chest/worker_yellow_0.ron | 1 + .../armor/misc/chest/worker_yellow_1.ron | 1 + .../armor/misc/foot/jackalope_slippers.ron | 3 +- .../common/items/armor/misc/foot/sandals.ron | 3 +- .../items/armor/misc/pants/worker_blue.ron | 1 + .../items/armor/misc/pants/worker_brown.ron | 1 + .../items/armor/misc/shoulder/iron_spikes.ron | 1 + .../armor/misc/shoulder/leather_iron_0.ron | 1 + .../armor/misc/shoulder/leather_iron_1.ron | 1 + .../armor/misc/shoulder/leather_iron_2.ron | 1 + .../armor/misc/shoulder/leather_iron_3.ron | 1 + assets/common/items/armor/rugged/chest.ron | 1 + assets/common/items/armor/rugged/pants.ron | 1 + assets/common/items/armor/savage/back.ron | 1 + assets/common/items/armor/savage/belt.ron | 1 + assets/common/items/armor/savage/chest.ron | 1 + assets/common/items/armor/savage/foot.ron | 1 + assets/common/items/armor/savage/hand.ron | 1 + assets/common/items/armor/savage/pants.ron | 1 + assets/common/items/armor/savage/shoulder.ron | 1 + assets/common/recipe_book.ron | 254 ------------------ common/src/comp/inventory/item/modular.rs | 1 - common/src/comp/inventory/trade_pricing.rs | 41 ++- common/src/recipe.rs | 4 - voxygen/src/hud/crafting.rs | 8 +- 200 files changed, 220 insertions(+), 287 deletions(-) diff --git a/assets/common/items/armor/assassin/belt.ron b/assets/common/items/armor/assassin/belt.ron index ae349434f9..52a79db2a3 100644 --- a/assets/common/items/armor/assassin/belt.ron +++ b/assets/common/items/armor/assassin/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/assassin/chest.ron b/assets/common/items/armor/assassin/chest.ron index b96df379c6..c9fecb1a1d 100644 --- a/assets/common/items/armor/assassin/chest.ron +++ b/assets/common/items/armor/assassin/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/assassin/foot.ron b/assets/common/items/armor/assassin/foot.ron index 7f1c68f901..dd64f8a6d4 100644 --- a/assets/common/items/armor/assassin/foot.ron +++ b/assets/common/items/armor/assassin/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/assassin/hand.ron b/assets/common/items/armor/assassin/hand.ron index ee044382c9..c938266b4e 100644 --- a/assets/common/items/armor/assassin/hand.ron +++ b/assets/common/items/armor/assassin/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/assassin/head.ron b/assets/common/items/armor/assassin/head.ron index a5e0bf6963..943248bc8a 100644 --- a/assets/common/items/armor/assassin/head.ron +++ b/assets/common/items/armor/assassin/head.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/assassin/pants.ron b/assets/common/items/armor/assassin/pants.ron index 44661d30c2..b6a7bdad6c 100644 --- a/assets/common/items/armor/assassin/pants.ron +++ b/assets/common/items/armor/assassin/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/assassin/shoulder.ron b/assets/common/items/armor/assassin/shoulder.ron index 64987aba53..10a5888dcc 100644 --- a/assets/common/items/armor/assassin/shoulder.ron +++ b/assets/common/items/armor/assassin/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/bonerattler/belt.ron b/assets/common/items/armor/bonerattler/belt.ron index 54208a6940..b578be2ed9 100644 --- a/assets/common/items/armor/bonerattler/belt.ron +++ b/assets/common/items/armor/bonerattler/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/bonerattler/chest.ron b/assets/common/items/armor/bonerattler/chest.ron index 27988826c2..68b0947456 100644 --- a/assets/common/items/armor/bonerattler/chest.ron +++ b/assets/common/items/armor/bonerattler/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/bonerattler/foot.ron b/assets/common/items/armor/bonerattler/foot.ron index e86f96cbea..058574fdd1 100644 --- a/assets/common/items/armor/bonerattler/foot.ron +++ b/assets/common/items/armor/bonerattler/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/bonerattler/hand.ron b/assets/common/items/armor/bonerattler/hand.ron index b5f73984a5..b62e78a462 100644 --- a/assets/common/items/armor/bonerattler/hand.ron +++ b/assets/common/items/armor/bonerattler/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/bonerattler/pants.ron b/assets/common/items/armor/bonerattler/pants.ron index 93b3dcc961..0ca0371f82 100644 --- a/assets/common/items/armor/bonerattler/pants.ron +++ b/assets/common/items/armor/bonerattler/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/bonerattler/shoulder.ron b/assets/common/items/armor/bonerattler/shoulder.ron index 2970c9a351..a9a5ee64ee 100644 --- a/assets/common/items/armor/bonerattler/shoulder.ron +++ b/assets/common/items/armor/bonerattler/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/druid/back.ron b/assets/common/items/armor/cloth/druid/back.ron index 73e523287e..c35d6f8971 100644 --- a/assets/common/items/armor/cloth/druid/back.ron +++ b/assets/common/items/armor/cloth/druid/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Lifecloth), + SalvageInto(Lifecloth), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/druid/belt.ron b/assets/common/items/armor/cloth/druid/belt.ron index 7f9cfcf15d..951cc937dc 100644 --- a/assets/common/items/armor/cloth/druid/belt.ron +++ b/assets/common/items/armor/cloth/druid/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Lifecloth), + SalvageInto(Lifecloth), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/druid/chest.ron b/assets/common/items/armor/cloth/druid/chest.ron index 945f44b57d..fd2969ed39 100644 --- a/assets/common/items/armor/cloth/druid/chest.ron +++ b/assets/common/items/armor/cloth/druid/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Lifecloth), + SalvageInto(Lifecloth), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/druid/foot.ron b/assets/common/items/armor/cloth/druid/foot.ron index 38e8fd04bf..7304e24097 100644 --- a/assets/common/items/armor/cloth/druid/foot.ron +++ b/assets/common/items/armor/cloth/druid/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Lifecloth), + SalvageInto(Lifecloth), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/druid/hand.ron b/assets/common/items/armor/cloth/druid/hand.ron index bfc156b2d5..0e8d545dd1 100644 --- a/assets/common/items/armor/cloth/druid/hand.ron +++ b/assets/common/items/armor/cloth/druid/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Lifecloth), + SalvageInto(Lifecloth), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/druid/pants.ron b/assets/common/items/armor/cloth/druid/pants.ron index ee13b630cc..529108a56c 100644 --- a/assets/common/items/armor/cloth/druid/pants.ron +++ b/assets/common/items/armor/cloth/druid/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Lifecloth), + SalvageInto(Lifecloth), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/druid/shoulder.ron b/assets/common/items/armor/cloth/druid/shoulder.ron index 605b11214f..d250a8091d 100644 --- a/assets/common/items/armor/cloth/druid/shoulder.ron +++ b/assets/common/items/armor/cloth/druid/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Lifecloth), + SalvageInto(Lifecloth), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/linen/back.ron b/assets/common/items/armor/cloth/linen/back.ron index 95b5f35d70..10d9d6beb3 100644 --- a/assets/common/items/armor/cloth/linen/back.ron +++ b/assets/common/items/armor/cloth/linen/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/linen/belt.ron b/assets/common/items/armor/cloth/linen/belt.ron index 1ca81837c3..959a5aee5f 100644 --- a/assets/common/items/armor/cloth/linen/belt.ron +++ b/assets/common/items/armor/cloth/linen/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/linen/chest.ron b/assets/common/items/armor/cloth/linen/chest.ron index dfc9b267bd..1686dcf5a4 100644 --- a/assets/common/items/armor/cloth/linen/chest.ron +++ b/assets/common/items/armor/cloth/linen/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/linen/foot.ron b/assets/common/items/armor/cloth/linen/foot.ron index 53ea34addf..851c1d9662 100644 --- a/assets/common/items/armor/cloth/linen/foot.ron +++ b/assets/common/items/armor/cloth/linen/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/linen/hand.ron b/assets/common/items/armor/cloth/linen/hand.ron index 60b6a8e25d..05c1a82a21 100644 --- a/assets/common/items/armor/cloth/linen/hand.ron +++ b/assets/common/items/armor/cloth/linen/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/linen/pants.ron b/assets/common/items/armor/cloth/linen/pants.ron index eb7dfd8947..500b61954d 100644 --- a/assets/common/items/armor/cloth/linen/pants.ron +++ b/assets/common/items/armor/cloth/linen/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/linen/shoulder.ron b/assets/common/items/armor/cloth/linen/shoulder.ron index 819ab2c70e..b3c0287791 100644 --- a/assets/common/items/armor/cloth/linen/shoulder.ron +++ b/assets/common/items/armor/cloth/linen/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/moonweave/back.ron b/assets/common/items/armor/cloth/moonweave/back.ron index 72aa5a3749..9a5bef7ffb 100644 --- a/assets/common/items/armor/cloth/moonweave/back.ron +++ b/assets/common/items/armor/cloth/moonweave/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Moonweave), + SalvageInto(Moonweave), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/moonweave/belt.ron b/assets/common/items/armor/cloth/moonweave/belt.ron index cdc7ab5af5..b420a8fb2c 100644 --- a/assets/common/items/armor/cloth/moonweave/belt.ron +++ b/assets/common/items/armor/cloth/moonweave/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Moonweave), + SalvageInto(Moonweave), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/moonweave/chest.ron b/assets/common/items/armor/cloth/moonweave/chest.ron index e4a53d91b8..d8b6389266 100644 --- a/assets/common/items/armor/cloth/moonweave/chest.ron +++ b/assets/common/items/armor/cloth/moonweave/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Moonweave), + SalvageInto(Moonweave), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/moonweave/foot.ron b/assets/common/items/armor/cloth/moonweave/foot.ron index ab946c5578..385e34d39a 100644 --- a/assets/common/items/armor/cloth/moonweave/foot.ron +++ b/assets/common/items/armor/cloth/moonweave/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Moonweave), + SalvageInto(Moonweave), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/moonweave/hand.ron b/assets/common/items/armor/cloth/moonweave/hand.ron index 785499ed9b..3046d5c474 100644 --- a/assets/common/items/armor/cloth/moonweave/hand.ron +++ b/assets/common/items/armor/cloth/moonweave/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Moonweave), + SalvageInto(Moonweave), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/moonweave/pants.ron b/assets/common/items/armor/cloth/moonweave/pants.ron index 544777e50a..dfaa82927d 100644 --- a/assets/common/items/armor/cloth/moonweave/pants.ron +++ b/assets/common/items/armor/cloth/moonweave/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Moonweave), + SalvageInto(Moonweave), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/moonweave/shoulder.ron b/assets/common/items/armor/cloth/moonweave/shoulder.ron index c03c783cb6..da67683e70 100644 --- a/assets/common/items/armor/cloth/moonweave/shoulder.ron +++ b/assets/common/items/armor/cloth/moonweave/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Moonweave), + SalvageInto(Moonweave), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/silken/back.ron b/assets/common/items/armor/cloth/silken/back.ron index 65040dca56..e9f0f71ae8 100644 --- a/assets/common/items/armor/cloth/silken/back.ron +++ b/assets/common/items/armor/cloth/silken/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Silk), + SalvageInto(Silk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/silken/belt.ron b/assets/common/items/armor/cloth/silken/belt.ron index 644cbcbbce..275d5a53f4 100644 --- a/assets/common/items/armor/cloth/silken/belt.ron +++ b/assets/common/items/armor/cloth/silken/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Silk), + SalvageInto(Silk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/silken/chest.ron b/assets/common/items/armor/cloth/silken/chest.ron index 3400cfabb7..3ef5f56719 100644 --- a/assets/common/items/armor/cloth/silken/chest.ron +++ b/assets/common/items/armor/cloth/silken/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Silk), + SalvageInto(Silk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/silken/foot.ron b/assets/common/items/armor/cloth/silken/foot.ron index a0f1354c00..5b132466e7 100644 --- a/assets/common/items/armor/cloth/silken/foot.ron +++ b/assets/common/items/armor/cloth/silken/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Silk), + SalvageInto(Silk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/silken/hand.ron b/assets/common/items/armor/cloth/silken/hand.ron index 8c446b1e06..af928ea10c 100644 --- a/assets/common/items/armor/cloth/silken/hand.ron +++ b/assets/common/items/armor/cloth/silken/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Silk), + SalvageInto(Silk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/silken/pants.ron b/assets/common/items/armor/cloth/silken/pants.ron index 87ff1cd4e7..974ffaa12e 100644 --- a/assets/common/items/armor/cloth/silken/pants.ron +++ b/assets/common/items/armor/cloth/silken/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Silk), + SalvageInto(Silk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/silken/shoulder.ron b/assets/common/items/armor/cloth/silken/shoulder.ron index 6d7914bed1..ffd38d5894 100644 --- a/assets/common/items/armor/cloth/silken/shoulder.ron +++ b/assets/common/items/armor/cloth/silken/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Silk), + SalvageInto(Silk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/sunsilk/back.ron b/assets/common/items/armor/cloth/sunsilk/back.ron index d4536e1522..11ad7a5cc9 100644 --- a/assets/common/items/armor/cloth/sunsilk/back.ron +++ b/assets/common/items/armor/cloth/sunsilk/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Sunsilk), + SalvageInto(Sunsilk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/sunsilk/belt.ron b/assets/common/items/armor/cloth/sunsilk/belt.ron index 27047fe94d..655950a24c 100644 --- a/assets/common/items/armor/cloth/sunsilk/belt.ron +++ b/assets/common/items/armor/cloth/sunsilk/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Sunsilk), + SalvageInto(Sunsilk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/sunsilk/chest.ron b/assets/common/items/armor/cloth/sunsilk/chest.ron index 0b0e8acefa..a149af2cac 100644 --- a/assets/common/items/armor/cloth/sunsilk/chest.ron +++ b/assets/common/items/armor/cloth/sunsilk/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Sunsilk), + SalvageInto(Sunsilk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/sunsilk/foot.ron b/assets/common/items/armor/cloth/sunsilk/foot.ron index 384a570b86..aa0ae09b1e 100644 --- a/assets/common/items/armor/cloth/sunsilk/foot.ron +++ b/assets/common/items/armor/cloth/sunsilk/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Sunsilk), + SalvageInto(Sunsilk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/sunsilk/hand.ron b/assets/common/items/armor/cloth/sunsilk/hand.ron index c2667fec96..ca1c5e296a 100644 --- a/assets/common/items/armor/cloth/sunsilk/hand.ron +++ b/assets/common/items/armor/cloth/sunsilk/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Sunsilk), + SalvageInto(Sunsilk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/sunsilk/pants.ron b/assets/common/items/armor/cloth/sunsilk/pants.ron index 4ae3194ead..36bc0e6e7e 100644 --- a/assets/common/items/armor/cloth/sunsilk/pants.ron +++ b/assets/common/items/armor/cloth/sunsilk/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Sunsilk), + SalvageInto(Sunsilk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/sunsilk/shoulder.ron b/assets/common/items/armor/cloth/sunsilk/shoulder.ron index 58f9119d43..efcee8b991 100644 --- a/assets/common/items/armor/cloth/sunsilk/shoulder.ron +++ b/assets/common/items/armor/cloth/sunsilk/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Sunsilk), + SalvageInto(Sunsilk), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/woolen/back.ron b/assets/common/items/armor/cloth/woolen/back.ron index dd2afbbe85..831b017f37 100644 --- a/assets/common/items/armor/cloth/woolen/back.ron +++ b/assets/common/items/armor/cloth/woolen/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Wool), + SalvageInto(Wool), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/woolen/belt.ron b/assets/common/items/armor/cloth/woolen/belt.ron index 547129cbdd..f0d645baa9 100644 --- a/assets/common/items/armor/cloth/woolen/belt.ron +++ b/assets/common/items/armor/cloth/woolen/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Wool), + SalvageInto(Wool), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/woolen/chest.ron b/assets/common/items/armor/cloth/woolen/chest.ron index ab4d0b295d..bd9d860633 100644 --- a/assets/common/items/armor/cloth/woolen/chest.ron +++ b/assets/common/items/armor/cloth/woolen/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Wool), + SalvageInto(Wool), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/woolen/foot.ron b/assets/common/items/armor/cloth/woolen/foot.ron index fa17a3f483..30fcfce7a1 100644 --- a/assets/common/items/armor/cloth/woolen/foot.ron +++ b/assets/common/items/armor/cloth/woolen/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Wool), + SalvageInto(Wool), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/woolen/hand.ron b/assets/common/items/armor/cloth/woolen/hand.ron index 0ce7b74d93..6f03c05861 100644 --- a/assets/common/items/armor/cloth/woolen/hand.ron +++ b/assets/common/items/armor/cloth/woolen/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Wool), + SalvageInto(Wool), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/woolen/pants.ron b/assets/common/items/armor/cloth/woolen/pants.ron index dcb11ba481..dfaeba29fe 100644 --- a/assets/common/items/armor/cloth/woolen/pants.ron +++ b/assets/common/items/armor/cloth/woolen/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Wool), + SalvageInto(Wool), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth/woolen/shoulder.ron b/assets/common/items/armor/cloth/woolen/shoulder.ron index 8d41605ee8..c939118a16 100644 --- a/assets/common/items/armor/cloth/woolen/shoulder.ron +++ b/assets/common/items/armor/cloth/woolen/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Wool), + SalvageInto(Wool), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_blue/belt.ron b/assets/common/items/armor/cloth_blue/belt.ron index 0bdda2d7b6..8727abacb2 100644 --- a/assets/common/items/armor/cloth_blue/belt.ron +++ b/assets/common/items/armor/cloth_blue/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_blue/chest.ron b/assets/common/items/armor/cloth_blue/chest.ron index 1629e7500e..6ffe11a9ab 100644 --- a/assets/common/items/armor/cloth_blue/chest.ron +++ b/assets/common/items/armor/cloth_blue/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_blue/foot.ron b/assets/common/items/armor/cloth_blue/foot.ron index 8f42e6b97f..a3a6e9a55a 100644 --- a/assets/common/items/armor/cloth_blue/foot.ron +++ b/assets/common/items/armor/cloth_blue/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_blue/hand.ron b/assets/common/items/armor/cloth_blue/hand.ron index 68cf2ed18b..00b72bbd04 100644 --- a/assets/common/items/armor/cloth_blue/hand.ron +++ b/assets/common/items/armor/cloth_blue/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_blue/pants.ron b/assets/common/items/armor/cloth_blue/pants.ron index 3bcdd35fb8..660428ca31 100644 --- a/assets/common/items/armor/cloth_blue/pants.ron +++ b/assets/common/items/armor/cloth_blue/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_blue/shoulder_0.ron b/assets/common/items/armor/cloth_blue/shoulder_0.ron index 831819fe4c..0ed0a4215d 100644 --- a/assets/common/items/armor/cloth_blue/shoulder_0.ron +++ b/assets/common/items/armor/cloth_blue/shoulder_0.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_blue/shoulder_1.ron b/assets/common/items/armor/cloth_blue/shoulder_1.ron index 7d8dfdbad3..65f02266b0 100644 --- a/assets/common/items/armor/cloth_blue/shoulder_1.ron +++ b/assets/common/items/armor/cloth_blue/shoulder_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_green/belt.ron b/assets/common/items/armor/cloth_green/belt.ron index e7f6f148c4..fa09715437 100644 --- a/assets/common/items/armor/cloth_green/belt.ron +++ b/assets/common/items/armor/cloth_green/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_green/chest.ron b/assets/common/items/armor/cloth_green/chest.ron index dc85c1d24c..ae552cf913 100644 --- a/assets/common/items/armor/cloth_green/chest.ron +++ b/assets/common/items/armor/cloth_green/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_green/foot.ron b/assets/common/items/armor/cloth_green/foot.ron index 9191c48b75..b14f98f26e 100644 --- a/assets/common/items/armor/cloth_green/foot.ron +++ b/assets/common/items/armor/cloth_green/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_green/hand.ron b/assets/common/items/armor/cloth_green/hand.ron index e67884c81f..5208242269 100644 --- a/assets/common/items/armor/cloth_green/hand.ron +++ b/assets/common/items/armor/cloth_green/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_green/pants.ron b/assets/common/items/armor/cloth_green/pants.ron index 6db606c17a..e05fca4720 100644 --- a/assets/common/items/armor/cloth_green/pants.ron +++ b/assets/common/items/armor/cloth_green/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_green/shoulder.ron b/assets/common/items/armor/cloth_green/shoulder.ron index bcb610c6d6..017599bd2f 100644 --- a/assets/common/items/armor/cloth_green/shoulder.ron +++ b/assets/common/items/armor/cloth_green/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_purple/belt.ron b/assets/common/items/armor/cloth_purple/belt.ron index 69db3e70ae..433d66b6fa 100644 --- a/assets/common/items/armor/cloth_purple/belt.ron +++ b/assets/common/items/armor/cloth_purple/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_purple/chest.ron b/assets/common/items/armor/cloth_purple/chest.ron index 65fa293261..cd86c5e9af 100644 --- a/assets/common/items/armor/cloth_purple/chest.ron +++ b/assets/common/items/armor/cloth_purple/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_purple/foot.ron b/assets/common/items/armor/cloth_purple/foot.ron index db158a54ed..1794de738b 100644 --- a/assets/common/items/armor/cloth_purple/foot.ron +++ b/assets/common/items/armor/cloth_purple/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_purple/hand.ron b/assets/common/items/armor/cloth_purple/hand.ron index d32a36f46b..751187283b 100644 --- a/assets/common/items/armor/cloth_purple/hand.ron +++ b/assets/common/items/armor/cloth_purple/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_purple/pants.ron b/assets/common/items/armor/cloth_purple/pants.ron index 89faf32704..37b0c88f1b 100644 --- a/assets/common/items/armor/cloth_purple/pants.ron +++ b/assets/common/items/armor/cloth_purple/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/cloth_purple/shoulder.ron b/assets/common/items/armor/cloth_purple/shoulder.ron index 244e5623ba..d656104cb4 100644 --- a/assets/common/items/armor/cloth_purple/shoulder.ron +++ b/assets/common/items/armor/cloth_purple/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/carapace/back.ron b/assets/common/items/armor/hide/carapace/back.ron index 8b242c7647..bd3fb7c844 100644 --- a/assets/common/items/armor/hide/carapace/back.ron +++ b/assets/common/items/armor/hide/carapace/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Carapace), + SalvageInto(Carapace), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/carapace/belt.ron b/assets/common/items/armor/hide/carapace/belt.ron index 0ce1c25a62..23aa91e9af 100644 --- a/assets/common/items/armor/hide/carapace/belt.ron +++ b/assets/common/items/armor/hide/carapace/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Carapace), + SalvageInto(Carapace), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/carapace/chest.ron b/assets/common/items/armor/hide/carapace/chest.ron index f4fd77cfd3..77317457f4 100644 --- a/assets/common/items/armor/hide/carapace/chest.ron +++ b/assets/common/items/armor/hide/carapace/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Carapace), + SalvageInto(Carapace), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/carapace/foot.ron b/assets/common/items/armor/hide/carapace/foot.ron index 9d6907abd2..a5c695a006 100644 --- a/assets/common/items/armor/hide/carapace/foot.ron +++ b/assets/common/items/armor/hide/carapace/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Carapace), + SalvageInto(Carapace), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/carapace/hand.ron b/assets/common/items/armor/hide/carapace/hand.ron index f701512391..bd90a9c851 100644 --- a/assets/common/items/armor/hide/carapace/hand.ron +++ b/assets/common/items/armor/hide/carapace/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Carapace), + SalvageInto(Carapace), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/carapace/pants.ron b/assets/common/items/armor/hide/carapace/pants.ron index afd8e7b4bc..3b2f427476 100644 --- a/assets/common/items/armor/hide/carapace/pants.ron +++ b/assets/common/items/armor/hide/carapace/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Carapace), + SalvageInto(Carapace), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/carapace/shoulder.ron b/assets/common/items/armor/hide/carapace/shoulder.ron index efe922a93c..7c0c66cb1a 100644 --- a/assets/common/items/armor/hide/carapace/shoulder.ron +++ b/assets/common/items/armor/hide/carapace/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Carapace), + SalvageInto(Carapace), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/dragonscale/back.ron b/assets/common/items/armor/hide/dragonscale/back.ron index 6455d9ec4b..0c7a7c891d 100644 --- a/assets/common/items/armor/hide/dragonscale/back.ron +++ b/assets/common/items/armor/hide/dragonscale/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Dragonscale), + SalvageInto(Dragonscale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/dragonscale/belt.ron b/assets/common/items/armor/hide/dragonscale/belt.ron index 1f2e46a9b7..697930971b 100644 --- a/assets/common/items/armor/hide/dragonscale/belt.ron +++ b/assets/common/items/armor/hide/dragonscale/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Dragonscale), + SalvageInto(Dragonscale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/dragonscale/chest.ron b/assets/common/items/armor/hide/dragonscale/chest.ron index 4b247c71d6..3c5cfaab07 100644 --- a/assets/common/items/armor/hide/dragonscale/chest.ron +++ b/assets/common/items/armor/hide/dragonscale/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Dragonscale), + SalvageInto(Dragonscale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/dragonscale/foot.ron b/assets/common/items/armor/hide/dragonscale/foot.ron index 31dc68c61d..c29becebf4 100644 --- a/assets/common/items/armor/hide/dragonscale/foot.ron +++ b/assets/common/items/armor/hide/dragonscale/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Dragonscale), + SalvageInto(Dragonscale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/dragonscale/hand.ron b/assets/common/items/armor/hide/dragonscale/hand.ron index d695225c13..a7886801c8 100644 --- a/assets/common/items/armor/hide/dragonscale/hand.ron +++ b/assets/common/items/armor/hide/dragonscale/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Dragonscale), + SalvageInto(Dragonscale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/dragonscale/pants.ron b/assets/common/items/armor/hide/dragonscale/pants.ron index 7b6d5b1fe2..0413e71df2 100644 --- a/assets/common/items/armor/hide/dragonscale/pants.ron +++ b/assets/common/items/armor/hide/dragonscale/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Dragonscale), + SalvageInto(Dragonscale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/dragonscale/shoulder.ron b/assets/common/items/armor/hide/dragonscale/shoulder.ron index f91e15073c..d5ed120823 100644 --- a/assets/common/items/armor/hide/dragonscale/shoulder.ron +++ b/assets/common/items/armor/hide/dragonscale/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Dragonscale), + SalvageInto(Dragonscale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/back.ron b/assets/common/items/armor/hide/leather/back.ron index c36a93202c..83488c3cf2 100644 --- a/assets/common/items/armor/hide/leather/back.ron +++ b/assets/common/items/armor/hide/leather/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/belt.ron b/assets/common/items/armor/hide/leather/belt.ron index d32d140ab5..cc364b753f 100644 --- a/assets/common/items/armor/hide/leather/belt.ron +++ b/assets/common/items/armor/hide/leather/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/chest.ron b/assets/common/items/armor/hide/leather/chest.ron index f1c4aaa6a2..f55d7e026a 100644 --- a/assets/common/items/armor/hide/leather/chest.ron +++ b/assets/common/items/armor/hide/leather/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/foot.ron b/assets/common/items/armor/hide/leather/foot.ron index 63195d60da..8df165b117 100644 --- a/assets/common/items/armor/hide/leather/foot.ron +++ b/assets/common/items/armor/hide/leather/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/hand.ron b/assets/common/items/armor/hide/leather/hand.ron index 2b96f7b96c..d28250d313 100644 --- a/assets/common/items/armor/hide/leather/hand.ron +++ b/assets/common/items/armor/hide/leather/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/head.ron b/assets/common/items/armor/hide/leather/head.ron index 335c7561e7..a9dc709406 100644 --- a/assets/common/items/armor/hide/leather/head.ron +++ b/assets/common/items/armor/hide/leather/head.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/pants.ron b/assets/common/items/armor/hide/leather/pants.ron index 5148803d70..8ec051b361 100644 --- a/assets/common/items/armor/hide/leather/pants.ron +++ b/assets/common/items/armor/hide/leather/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/leather/shoulder.ron b/assets/common/items/armor/hide/leather/shoulder.ron index 3f51e5dbba..715452c242 100644 --- a/assets/common/items/armor/hide/leather/shoulder.ron +++ b/assets/common/items/armor/hide/leather/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/primal/back.ron b/assets/common/items/armor/hide/primal/back.ron index 6b8e31aca0..3d500a7971 100644 --- a/assets/common/items/armor/hide/primal/back.ron +++ b/assets/common/items/armor/hide/primal/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Plate), + SalvageInto(Plate), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/primal/belt.ron b/assets/common/items/armor/hide/primal/belt.ron index b9c848fb2a..635d68e6dc 100644 --- a/assets/common/items/armor/hide/primal/belt.ron +++ b/assets/common/items/armor/hide/primal/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Plate), + SalvageInto(Plate), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/primal/chest.ron b/assets/common/items/armor/hide/primal/chest.ron index ae8cf8434a..5f4dcf4d21 100644 --- a/assets/common/items/armor/hide/primal/chest.ron +++ b/assets/common/items/armor/hide/primal/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Plate), + SalvageInto(Plate), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/primal/foot.ron b/assets/common/items/armor/hide/primal/foot.ron index e4e4d48e51..65c69bb9ef 100644 --- a/assets/common/items/armor/hide/primal/foot.ron +++ b/assets/common/items/armor/hide/primal/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Plate), + SalvageInto(Plate), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/primal/hand.ron b/assets/common/items/armor/hide/primal/hand.ron index aff402165c..6581019dfc 100644 --- a/assets/common/items/armor/hide/primal/hand.ron +++ b/assets/common/items/armor/hide/primal/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Plate), + SalvageInto(Plate), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/primal/pants.ron b/assets/common/items/armor/hide/primal/pants.ron index bec3af846b..678cf61c1c 100644 --- a/assets/common/items/armor/hide/primal/pants.ron +++ b/assets/common/items/armor/hide/primal/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Plate), + SalvageInto(Plate), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/primal/shoulder.ron b/assets/common/items/armor/hide/primal/shoulder.ron index e05513d52e..2cefbb86f5 100644 --- a/assets/common/items/armor/hide/primal/shoulder.ron +++ b/assets/common/items/armor/hide/primal/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Plate), + SalvageInto(Plate), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/rawhide/back.ron b/assets/common/items/armor/hide/rawhide/back.ron index 7f2f8889c8..28d3fc1f35 100644 --- a/assets/common/items/armor/hide/rawhide/back.ron +++ b/assets/common/items/armor/hide/rawhide/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Rawhide), + SalvageInto(Rawhide), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/rawhide/belt.ron b/assets/common/items/armor/hide/rawhide/belt.ron index 0b2b582eb2..99c0460d32 100644 --- a/assets/common/items/armor/hide/rawhide/belt.ron +++ b/assets/common/items/armor/hide/rawhide/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Rawhide), + SalvageInto(Rawhide), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/rawhide/chest.ron b/assets/common/items/armor/hide/rawhide/chest.ron index 9535cf38c8..0ad1978587 100644 --- a/assets/common/items/armor/hide/rawhide/chest.ron +++ b/assets/common/items/armor/hide/rawhide/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Rawhide), + SalvageInto(Rawhide), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/rawhide/foot.ron b/assets/common/items/armor/hide/rawhide/foot.ron index c8b00d14b3..bebed0b05c 100644 --- a/assets/common/items/armor/hide/rawhide/foot.ron +++ b/assets/common/items/armor/hide/rawhide/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Rawhide), + SalvageInto(Rawhide), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/rawhide/hand.ron b/assets/common/items/armor/hide/rawhide/hand.ron index 66f615ce60..a35671207a 100644 --- a/assets/common/items/armor/hide/rawhide/hand.ron +++ b/assets/common/items/armor/hide/rawhide/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Rawhide), + SalvageInto(Rawhide), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/rawhide/pants.ron b/assets/common/items/armor/hide/rawhide/pants.ron index 1a2996d589..6fd1f63938 100644 --- a/assets/common/items/armor/hide/rawhide/pants.ron +++ b/assets/common/items/armor/hide/rawhide/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Rawhide), + SalvageInto(Rawhide), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/rawhide/shoulder.ron b/assets/common/items/armor/hide/rawhide/shoulder.ron index adc173c0ae..6e27aa8326 100644 --- a/assets/common/items/armor/hide/rawhide/shoulder.ron +++ b/assets/common/items/armor/hide/rawhide/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Rawhide), + SalvageInto(Rawhide), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/scale/back.ron b/assets/common/items/armor/hide/scale/back.ron index 8ef6c62d53..19974f08b1 100644 --- a/assets/common/items/armor/hide/scale/back.ron +++ b/assets/common/items/armor/hide/scale/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Scale), + SalvageInto(Scale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/scale/belt.ron b/assets/common/items/armor/hide/scale/belt.ron index d8629fc490..b2afaecf9f 100644 --- a/assets/common/items/armor/hide/scale/belt.ron +++ b/assets/common/items/armor/hide/scale/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Scale), + SalvageInto(Scale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/scale/chest.ron b/assets/common/items/armor/hide/scale/chest.ron index ae93fe0be5..15aed051a0 100644 --- a/assets/common/items/armor/hide/scale/chest.ron +++ b/assets/common/items/armor/hide/scale/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Scale), + SalvageInto(Scale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/scale/foot.ron b/assets/common/items/armor/hide/scale/foot.ron index 1b99ba609d..e323c2e2af 100644 --- a/assets/common/items/armor/hide/scale/foot.ron +++ b/assets/common/items/armor/hide/scale/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Scale), + SalvageInto(Scale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/scale/hand.ron b/assets/common/items/armor/hide/scale/hand.ron index d27eed0118..bd8a26bf86 100644 --- a/assets/common/items/armor/hide/scale/hand.ron +++ b/assets/common/items/armor/hide/scale/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Scale), + SalvageInto(Scale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/scale/pants.ron b/assets/common/items/armor/hide/scale/pants.ron index 94b3c48413..ca64f5e270 100644 --- a/assets/common/items/armor/hide/scale/pants.ron +++ b/assets/common/items/armor/hide/scale/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Scale), + SalvageInto(Scale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/hide/scale/shoulder.ron b/assets/common/items/armor/hide/scale/shoulder.ron index c2dcb6fd76..53ca1f067d 100644 --- a/assets/common/items/armor/hide/scale/shoulder.ron +++ b/assets/common/items/armor/hide/scale/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Scale), + SalvageInto(Scale), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/leather_plate/belt.ron b/assets/common/items/armor/leather_plate/belt.ron index 5e0287a31c..e12d9d827d 100644 --- a/assets/common/items/armor/leather_plate/belt.ron +++ b/assets/common/items/armor/leather_plate/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/leather_plate/chest.ron b/assets/common/items/armor/leather_plate/chest.ron index 31607eec34..f071b5a88e 100644 --- a/assets/common/items/armor/leather_plate/chest.ron +++ b/assets/common/items/armor/leather_plate/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/leather_plate/foot.ron b/assets/common/items/armor/leather_plate/foot.ron index eed1dc7010..aae02d7dd1 100644 --- a/assets/common/items/armor/leather_plate/foot.ron +++ b/assets/common/items/armor/leather_plate/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/leather_plate/hand.ron b/assets/common/items/armor/leather_plate/hand.ron index 2a3b43b46a..601ab543c4 100644 --- a/assets/common/items/armor/leather_plate/hand.ron +++ b/assets/common/items/armor/leather_plate/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/leather_plate/pants.ron b/assets/common/items/armor/leather_plate/pants.ron index 10390e03e4..022e083986 100644 --- a/assets/common/items/armor/leather_plate/pants.ron +++ b/assets/common/items/armor/leather_plate/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/leather_plate/shoulder.ron b/assets/common/items/armor/leather_plate/shoulder.ron index 6c80726cd3..a43ea3118c 100644 --- a/assets/common/items/armor/leather_plate/shoulder.ron +++ b/assets/common/items/armor/leather_plate/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bloodsteel/back.ron b/assets/common/items/armor/mail/bloodsteel/back.ron index c0195f2586..3e9df7ca6a 100644 --- a/assets/common/items/armor/mail/bloodsteel/back.ron +++ b/assets/common/items/armor/mail/bloodsteel/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Bloodsteel), + SalvageInto(Bloodsteel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bloodsteel/belt.ron b/assets/common/items/armor/mail/bloodsteel/belt.ron index 23c0b1ab91..343989b1ec 100644 --- a/assets/common/items/armor/mail/bloodsteel/belt.ron +++ b/assets/common/items/armor/mail/bloodsteel/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Bloodsteel), + SalvageInto(Bloodsteel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bloodsteel/chest.ron b/assets/common/items/armor/mail/bloodsteel/chest.ron index 4d6c3581f7..9e88b8a946 100644 --- a/assets/common/items/armor/mail/bloodsteel/chest.ron +++ b/assets/common/items/armor/mail/bloodsteel/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Bloodsteel), + SalvageInto(Bloodsteel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bloodsteel/foot.ron b/assets/common/items/armor/mail/bloodsteel/foot.ron index e96d1ec562..67717e5960 100644 --- a/assets/common/items/armor/mail/bloodsteel/foot.ron +++ b/assets/common/items/armor/mail/bloodsteel/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Bloodsteel), + SalvageInto(Bloodsteel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bloodsteel/hand.ron b/assets/common/items/armor/mail/bloodsteel/hand.ron index f6bfa3d8d7..c62f705c58 100644 --- a/assets/common/items/armor/mail/bloodsteel/hand.ron +++ b/assets/common/items/armor/mail/bloodsteel/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Bloodsteel), + SalvageInto(Bloodsteel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bloodsteel/pants.ron b/assets/common/items/armor/mail/bloodsteel/pants.ron index 6493d17f44..6491261180 100644 --- a/assets/common/items/armor/mail/bloodsteel/pants.ron +++ b/assets/common/items/armor/mail/bloodsteel/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Bloodsteel), + SalvageInto(Bloodsteel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bloodsteel/shoulder.ron b/assets/common/items/armor/mail/bloodsteel/shoulder.ron index 78680d5ce4..8312bf6df7 100644 --- a/assets/common/items/armor/mail/bloodsteel/shoulder.ron +++ b/assets/common/items/armor/mail/bloodsteel/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Epic, tags: [ Material(Bloodsteel), + SalvageInto(Bloodsteel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bronze/back.ron b/assets/common/items/armor/mail/bronze/back.ron index 5b28331710..9cbd001e87 100644 --- a/assets/common/items/armor/mail/bronze/back.ron +++ b/assets/common/items/armor/mail/bronze/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Bronze), + SalvageInto(Bronze), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bronze/belt.ron b/assets/common/items/armor/mail/bronze/belt.ron index 37ae6dc5e9..a58bf23c6e 100644 --- a/assets/common/items/armor/mail/bronze/belt.ron +++ b/assets/common/items/armor/mail/bronze/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Bronze), + SalvageInto(Bronze), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bronze/chest.ron b/assets/common/items/armor/mail/bronze/chest.ron index a4d454ccf7..34d848df3f 100644 --- a/assets/common/items/armor/mail/bronze/chest.ron +++ b/assets/common/items/armor/mail/bronze/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Bronze), + SalvageInto(Bronze), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bronze/foot.ron b/assets/common/items/armor/mail/bronze/foot.ron index c438c13284..a0657e7cad 100644 --- a/assets/common/items/armor/mail/bronze/foot.ron +++ b/assets/common/items/armor/mail/bronze/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Bronze), + SalvageInto(Bronze), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bronze/hand.ron b/assets/common/items/armor/mail/bronze/hand.ron index 45f9adc7c3..50f77e2d58 100644 --- a/assets/common/items/armor/mail/bronze/hand.ron +++ b/assets/common/items/armor/mail/bronze/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Bronze), + SalvageInto(Bronze), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bronze/pants.ron b/assets/common/items/armor/mail/bronze/pants.ron index b98511295e..77aa7f1665 100644 --- a/assets/common/items/armor/mail/bronze/pants.ron +++ b/assets/common/items/armor/mail/bronze/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Bronze), + SalvageInto(Bronze), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/bronze/shoulder.ron b/assets/common/items/armor/mail/bronze/shoulder.ron index 2e8b2f6990..f9e6a4ebd1 100644 --- a/assets/common/items/armor/mail/bronze/shoulder.ron +++ b/assets/common/items/armor/mail/bronze/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Bronze), + SalvageInto(Bronze), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/cobalt/back.ron b/assets/common/items/armor/mail/cobalt/back.ron index d84d650df7..e596598fa2 100644 --- a/assets/common/items/armor/mail/cobalt/back.ron +++ b/assets/common/items/armor/mail/cobalt/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Cobalt), + SalvageInto(Cobalt), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/cobalt/belt.ron b/assets/common/items/armor/mail/cobalt/belt.ron index 8987f85843..bdb2d14064 100644 --- a/assets/common/items/armor/mail/cobalt/belt.ron +++ b/assets/common/items/armor/mail/cobalt/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Cobalt), + SalvageInto(Cobalt), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/cobalt/chest.ron b/assets/common/items/armor/mail/cobalt/chest.ron index ddaa397476..27488eeda6 100644 --- a/assets/common/items/armor/mail/cobalt/chest.ron +++ b/assets/common/items/armor/mail/cobalt/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Cobalt), + SalvageInto(Cobalt), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/cobalt/foot.ron b/assets/common/items/armor/mail/cobalt/foot.ron index c10e58eb3d..40ee6af1e9 100644 --- a/assets/common/items/armor/mail/cobalt/foot.ron +++ b/assets/common/items/armor/mail/cobalt/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Cobalt), + SalvageInto(Cobalt), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/cobalt/hand.ron b/assets/common/items/armor/mail/cobalt/hand.ron index 077d554aaf..b95fd43825 100644 --- a/assets/common/items/armor/mail/cobalt/hand.ron +++ b/assets/common/items/armor/mail/cobalt/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Cobalt), + SalvageInto(Cobalt), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/cobalt/pants.ron b/assets/common/items/armor/mail/cobalt/pants.ron index 1a3f02c809..fa8e967327 100644 --- a/assets/common/items/armor/mail/cobalt/pants.ron +++ b/assets/common/items/armor/mail/cobalt/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Cobalt), + SalvageInto(Cobalt), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/cobalt/shoulder.ron b/assets/common/items/armor/mail/cobalt/shoulder.ron index abca8ae263..e69fbd37dd 100644 --- a/assets/common/items/armor/mail/cobalt/shoulder.ron +++ b/assets/common/items/armor/mail/cobalt/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Cobalt), + SalvageInto(Cobalt), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/iron/back.ron b/assets/common/items/armor/mail/iron/back.ron index 1371644b2c..bb77f9405c 100644 --- a/assets/common/items/armor/mail/iron/back.ron +++ b/assets/common/items/armor/mail/iron/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/iron/belt.ron b/assets/common/items/armor/mail/iron/belt.ron index 28f67c5a69..62458f7832 100644 --- a/assets/common/items/armor/mail/iron/belt.ron +++ b/assets/common/items/armor/mail/iron/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/iron/chest.ron b/assets/common/items/armor/mail/iron/chest.ron index 8222e2217a..dc24713cbf 100644 --- a/assets/common/items/armor/mail/iron/chest.ron +++ b/assets/common/items/armor/mail/iron/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/iron/foot.ron b/assets/common/items/armor/mail/iron/foot.ron index 1e54414573..bc553affcc 100644 --- a/assets/common/items/armor/mail/iron/foot.ron +++ b/assets/common/items/armor/mail/iron/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/iron/hand.ron b/assets/common/items/armor/mail/iron/hand.ron index 69db4edc60..d9010445cb 100644 --- a/assets/common/items/armor/mail/iron/hand.ron +++ b/assets/common/items/armor/mail/iron/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/iron/pants.ron b/assets/common/items/armor/mail/iron/pants.ron index ccdd8a6dde..da20199fd6 100644 --- a/assets/common/items/armor/mail/iron/pants.ron +++ b/assets/common/items/armor/mail/iron/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/iron/shoulder.ron b/assets/common/items/armor/mail/iron/shoulder.ron index e900f11a8a..856b0ba6d1 100644 --- a/assets/common/items/armor/mail/iron/shoulder.ron +++ b/assets/common/items/armor/mail/iron/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/orichalcum/back.ron b/assets/common/items/armor/mail/orichalcum/back.ron index da999fbcfc..f8de6cfb71 100644 --- a/assets/common/items/armor/mail/orichalcum/back.ron +++ b/assets/common/items/armor/mail/orichalcum/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Orichalcum), + SalvageInto(Orichalcum), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/orichalcum/belt.ron b/assets/common/items/armor/mail/orichalcum/belt.ron index df4fb55a6c..2852660f15 100644 --- a/assets/common/items/armor/mail/orichalcum/belt.ron +++ b/assets/common/items/armor/mail/orichalcum/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Orichalcum), + SalvageInto(Orichalcum), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/orichalcum/chest.ron b/assets/common/items/armor/mail/orichalcum/chest.ron index d301351799..167dc6a37e 100644 --- a/assets/common/items/armor/mail/orichalcum/chest.ron +++ b/assets/common/items/armor/mail/orichalcum/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Orichalcum), + SalvageInto(Orichalcum), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/orichalcum/foot.ron b/assets/common/items/armor/mail/orichalcum/foot.ron index 2c4b61d588..1c74c8407b 100644 --- a/assets/common/items/armor/mail/orichalcum/foot.ron +++ b/assets/common/items/armor/mail/orichalcum/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Orichalcum), + SalvageInto(Orichalcum), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/orichalcum/hand.ron b/assets/common/items/armor/mail/orichalcum/hand.ron index 3031fedda3..4189fd933b 100644 --- a/assets/common/items/armor/mail/orichalcum/hand.ron +++ b/assets/common/items/armor/mail/orichalcum/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Orichalcum), + SalvageInto(Orichalcum), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/orichalcum/pants.ron b/assets/common/items/armor/mail/orichalcum/pants.ron index fcc4010dd4..d4aa66a383 100644 --- a/assets/common/items/armor/mail/orichalcum/pants.ron +++ b/assets/common/items/armor/mail/orichalcum/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Orichalcum), + SalvageInto(Orichalcum), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/orichalcum/shoulder.ron b/assets/common/items/armor/mail/orichalcum/shoulder.ron index 6bfcd85816..da90962728 100644 --- a/assets/common/items/armor/mail/orichalcum/shoulder.ron +++ b/assets/common/items/armor/mail/orichalcum/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Legendary, tags: [ Material(Orichalcum), + SalvageInto(Orichalcum), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/steel/back.ron b/assets/common/items/armor/mail/steel/back.ron index 3c1888970e..30d5a9f8bb 100644 --- a/assets/common/items/armor/mail/steel/back.ron +++ b/assets/common/items/armor/mail/steel/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Steel), + SalvageInto(Steel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/steel/belt.ron b/assets/common/items/armor/mail/steel/belt.ron index c93be72068..020fadbfac 100644 --- a/assets/common/items/armor/mail/steel/belt.ron +++ b/assets/common/items/armor/mail/steel/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Steel), + SalvageInto(Steel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/steel/chest.ron b/assets/common/items/armor/mail/steel/chest.ron index 90840998dd..da90c7f752 100644 --- a/assets/common/items/armor/mail/steel/chest.ron +++ b/assets/common/items/armor/mail/steel/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Steel), + SalvageInto(Steel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/steel/foot.ron b/assets/common/items/armor/mail/steel/foot.ron index 53fda973e6..cc53ff0515 100644 --- a/assets/common/items/armor/mail/steel/foot.ron +++ b/assets/common/items/armor/mail/steel/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Steel), + SalvageInto(Steel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/steel/hand.ron b/assets/common/items/armor/mail/steel/hand.ron index 02f0e33828..2b4dab9fc4 100644 --- a/assets/common/items/armor/mail/steel/hand.ron +++ b/assets/common/items/armor/mail/steel/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Steel), + SalvageInto(Steel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/steel/pants.ron b/assets/common/items/armor/mail/steel/pants.ron index 01c3a20fcb..3a35a3b4b0 100644 --- a/assets/common/items/armor/mail/steel/pants.ron +++ b/assets/common/items/armor/mail/steel/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Steel), + SalvageInto(Steel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/mail/steel/shoulder.ron b/assets/common/items/armor/mail/steel/shoulder.ron index f08a3d481c..3007106b02 100644 --- a/assets/common/items/armor/mail/steel/shoulder.ron +++ b/assets/common/items/armor/mail/steel/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Steel), + SalvageInto(Steel), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/back/short_1.ron b/assets/common/items/armor/misc/back/short_1.ron index 88eb5c7fb7..b69e357be8 100644 --- a/assets/common/items/armor/misc/back/short_1.ron +++ b/assets/common/items/armor/misc/back/short_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_green_0.ron b/assets/common/items/armor/misc/chest/worker_green_0.ron index 14cd0c0ccc..7a46b526f5 100644 --- a/assets/common/items/armor/misc/chest/worker_green_0.ron +++ b/assets/common/items/armor/misc/chest/worker_green_0.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_green_1.ron b/assets/common/items/armor/misc/chest/worker_green_1.ron index 0d18b5dc3d..fee96a8dea 100644 --- a/assets/common/items/armor/misc/chest/worker_green_1.ron +++ b/assets/common/items/armor/misc/chest/worker_green_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_orange_0.ron b/assets/common/items/armor/misc/chest/worker_orange_0.ron index c3b1c043d4..fec35a4f11 100644 --- a/assets/common/items/armor/misc/chest/worker_orange_0.ron +++ b/assets/common/items/armor/misc/chest/worker_orange_0.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_orange_1.ron b/assets/common/items/armor/misc/chest/worker_orange_1.ron index e7e5a2f40f..63745c22dc 100644 --- a/assets/common/items/armor/misc/chest/worker_orange_1.ron +++ b/assets/common/items/armor/misc/chest/worker_orange_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_purple_0.ron b/assets/common/items/armor/misc/chest/worker_purple_0.ron index 0aac60fdde..20bc248af9 100644 --- a/assets/common/items/armor/misc/chest/worker_purple_0.ron +++ b/assets/common/items/armor/misc/chest/worker_purple_0.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_purple_1.ron b/assets/common/items/armor/misc/chest/worker_purple_1.ron index e363f315e2..f8f4f97810 100644 --- a/assets/common/items/armor/misc/chest/worker_purple_1.ron +++ b/assets/common/items/armor/misc/chest/worker_purple_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_purple_brown.ron b/assets/common/items/armor/misc/chest/worker_purple_brown.ron index 5208c32ff3..0b0aaf0f88 100644 --- a/assets/common/items/armor/misc/chest/worker_purple_brown.ron +++ b/assets/common/items/armor/misc/chest/worker_purple_brown.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_red_0.ron b/assets/common/items/armor/misc/chest/worker_red_0.ron index 2336f9c58b..1b01bf4b57 100644 --- a/assets/common/items/armor/misc/chest/worker_red_0.ron +++ b/assets/common/items/armor/misc/chest/worker_red_0.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_red_1.ron b/assets/common/items/armor/misc/chest/worker_red_1.ron index 1c09588620..79df51d9d7 100644 --- a/assets/common/items/armor/misc/chest/worker_red_1.ron +++ b/assets/common/items/armor/misc/chest/worker_red_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_yellow_0.ron b/assets/common/items/armor/misc/chest/worker_yellow_0.ron index 6da0dfcb59..b990f7bcd3 100644 --- a/assets/common/items/armor/misc/chest/worker_yellow_0.ron +++ b/assets/common/items/armor/misc/chest/worker_yellow_0.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/chest/worker_yellow_1.ron b/assets/common/items/armor/misc/chest/worker_yellow_1.ron index 5b000afb90..9c1d27079f 100644 --- a/assets/common/items/armor/misc/chest/worker_yellow_1.ron +++ b/assets/common/items/armor/misc/chest/worker_yellow_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/foot/jackalope_slippers.ron b/assets/common/items/armor/misc/foot/jackalope_slippers.ron index 6f57e44c96..0e6de98b70 100644 --- a/assets/common/items/armor/misc/foot/jackalope_slippers.ron +++ b/assets/common/items/armor/misc/foot/jackalope_slippers.ron @@ -14,6 +14,7 @@ ItemDef( )), quality: High, tags: [ - Material(Linen) + Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/foot/sandals.ron b/assets/common/items/armor/misc/foot/sandals.ron index 3640a4b569..5af6ee91a2 100644 --- a/assets/common/items/armor/misc/foot/sandals.ron +++ b/assets/common/items/armor/misc/foot/sandals.ron @@ -14,6 +14,7 @@ ItemDef( )), quality: Low, tags: [ - Material(Linen) + Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/pants/worker_blue.ron b/assets/common/items/armor/misc/pants/worker_blue.ron index dd767d3594..0b16523695 100644 --- a/assets/common/items/armor/misc/pants/worker_blue.ron +++ b/assets/common/items/armor/misc/pants/worker_blue.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/pants/worker_brown.ron b/assets/common/items/armor/misc/pants/worker_brown.ron index 566874c1bd..4352a3a28f 100644 --- a/assets/common/items/armor/misc/pants/worker_brown.ron +++ b/assets/common/items/armor/misc/pants/worker_brown.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/shoulder/iron_spikes.ron b/assets/common/items/armor/misc/shoulder/iron_spikes.ron index 466ae7c618..b3820916c6 100644 --- a/assets/common/items/armor/misc/shoulder/iron_spikes.ron +++ b/assets/common/items/armor/misc/shoulder/iron_spikes.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Iron), + SalvageInto(Iron), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/shoulder/leather_iron_0.ron b/assets/common/items/armor/misc/shoulder/leather_iron_0.ron index 3f7824848b..1cdc1c9d7e 100644 --- a/assets/common/items/armor/misc/shoulder/leather_iron_0.ron +++ b/assets/common/items/armor/misc/shoulder/leather_iron_0.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/shoulder/leather_iron_1.ron b/assets/common/items/armor/misc/shoulder/leather_iron_1.ron index 12af395560..22963d0fa1 100644 --- a/assets/common/items/armor/misc/shoulder/leather_iron_1.ron +++ b/assets/common/items/armor/misc/shoulder/leather_iron_1.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/shoulder/leather_iron_2.ron b/assets/common/items/armor/misc/shoulder/leather_iron_2.ron index dcf5a19b13..36a6c5657e 100644 --- a/assets/common/items/armor/misc/shoulder/leather_iron_2.ron +++ b/assets/common/items/armor/misc/shoulder/leather_iron_2.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/misc/shoulder/leather_iron_3.ron b/assets/common/items/armor/misc/shoulder/leather_iron_3.ron index 991590a958..6b4933f104 100644 --- a/assets/common/items/armor/misc/shoulder/leather_iron_3.ron +++ b/assets/common/items/armor/misc/shoulder/leather_iron_3.ron @@ -15,5 +15,6 @@ ItemDef( quality: Common, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/rugged/chest.ron b/assets/common/items/armor/rugged/chest.ron index 2318127dec..391c768d6f 100644 --- a/assets/common/items/armor/rugged/chest.ron +++ b/assets/common/items/armor/rugged/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/rugged/pants.ron b/assets/common/items/armor/rugged/pants.ron index 28162eda55..341154e02b 100644 --- a/assets/common/items/armor/rugged/pants.ron +++ b/assets/common/items/armor/rugged/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Low, tags: [ Material(Linen), + SalvageInto(Linen), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/savage/back.ron b/assets/common/items/armor/savage/back.ron index d54a50e977..e3025f739c 100644 --- a/assets/common/items/armor/savage/back.ron +++ b/assets/common/items/armor/savage/back.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/savage/belt.ron b/assets/common/items/armor/savage/belt.ron index a5ce6d028e..8cd124b3ea 100644 --- a/assets/common/items/armor/savage/belt.ron +++ b/assets/common/items/armor/savage/belt.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/savage/chest.ron b/assets/common/items/armor/savage/chest.ron index 1ac98e24d2..bb6e529ab8 100644 --- a/assets/common/items/armor/savage/chest.ron +++ b/assets/common/items/armor/savage/chest.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/savage/foot.ron b/assets/common/items/armor/savage/foot.ron index 9577564894..892f66737b 100644 --- a/assets/common/items/armor/savage/foot.ron +++ b/assets/common/items/armor/savage/foot.ron @@ -15,5 +15,6 @@ ItemDef( quality: High, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/savage/hand.ron b/assets/common/items/armor/savage/hand.ron index d7e73d3451..e847e5c51c 100644 --- a/assets/common/items/armor/savage/hand.ron +++ b/assets/common/items/armor/savage/hand.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/savage/pants.ron b/assets/common/items/armor/savage/pants.ron index 3c9880a925..7346996265 100644 --- a/assets/common/items/armor/savage/pants.ron +++ b/assets/common/items/armor/savage/pants.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/items/armor/savage/shoulder.ron b/assets/common/items/armor/savage/shoulder.ron index 91a58b2ad3..078d1197f1 100644 --- a/assets/common/items/armor/savage/shoulder.ron +++ b/assets/common/items/armor/savage/shoulder.ron @@ -15,5 +15,6 @@ ItemDef( quality: Moderate, tags: [ Material(Leather), + SalvageInto(Leather), ], ) \ No newline at end of file diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 68b4898466..3fcc5ee09e 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -6,7 +6,6 @@ (Item("common.items.crafting_ing.stones"), 6), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "mortar_pestle": ( output: ("common.items.crafting_tools.mortar_pestle", 1), @@ -16,7 +15,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "sewing_set": ( output: ("common.items.crafting_tools.sewing_set", 1), @@ -25,7 +23,6 @@ (Item("common.items.mineral.ingot.tin"), 1), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "velorite_frag": ( output: ("common.items.mineral.ore.veloritefrag", 2), @@ -34,7 +31,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "potion_s": ( output: ("common.items.consumable.potion_minor", 1), @@ -44,7 +40,6 @@ (Item("common.items.crafting_ing.honey"), 1), ], craft_sprite: Some(Cauldron), - is_recycling: false, ), "potion_m": ( output: ("common.items.consumable.potion_med", 1), @@ -53,7 +48,6 @@ (Item("common.items.mineral.ore.veloritefrag"), 4), ], craft_sprite: Some(Cauldron), - is_recycling: false, ), "cactus_colada": ( output: ("common.items.food.cactus_colada", 1), @@ -62,7 +56,6 @@ (Item("common.items.crafting_ing.cactus"), 8), ], craft_sprite: Some(Cauldron), - is_recycling: false, ), "collar_basic": ( output: ("common.items.utility.collar", 1), @@ -71,7 +64,6 @@ (Item("common.items.mineral.gem.ruby"), 1), ], craft_sprite: None, - is_recycling: false, ), "bomb_coconut": ( output: ("common.items.utility.bomb", 1), @@ -82,7 +74,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "firework_blue": ( output: ("common.items.utility.firework_blue", 1), @@ -94,7 +85,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "firework_green": ( output: ("common.items.utility.firework_green", 1), @@ -106,7 +96,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "firework_purple": ( output: ("common.items.utility.firework_purple", 1), @@ -118,7 +107,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "firework_red": ( output: ("common.items.utility.firework_red", 1), @@ -130,7 +118,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "firework_white": ( output: ("common.items.utility.firework_white", 1), @@ -142,7 +129,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "firework_yellow": ( output: ("common.items.utility.firework_yellow", 1), @@ -154,7 +140,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "apple_shroom_curry": ( output: ("common.items.food.apple_mushroom_curry", 1), @@ -165,7 +150,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), "fish_cooked": ( output: ("common.items.food.meat.fish_cooked", 1), @@ -173,7 +157,6 @@ (Item("common.items.food.meat.fish_raw"), 1), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), "bird_cooked": ( output: ("common.items.food.meat.bird_cooked", 1), @@ -181,7 +164,6 @@ (Item("common.items.food.meat.bird_raw"), 1), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), "bird_large_cooked": ( output: ("common.items.food.meat.bird_large_cooked", 1), @@ -189,7 +171,6 @@ (Item("common.items.food.meat.bird_large_raw"), 1), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), "beast_small_cooked": ( output: ("common.items.food.meat.beast_small_cooked", 1), @@ -197,7 +178,6 @@ (Item("common.items.food.meat.beast_small_raw"), 1), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), "beast_large_cooked": ( output: ("common.items.food.meat.beast_large_cooked", 1), @@ -205,7 +185,6 @@ (Item("common.items.food.meat.beast_large_raw"), 1), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), "tough_cooked": ( output: ("common.items.food.meat.tough_cooked", 1), @@ -213,7 +192,6 @@ (Item("common.items.food.meat.tough_raw"), 1), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), "leather strips": ( output: ("common.items.crafting_ing.leather.leather_strips", 4), @@ -221,7 +199,6 @@ (Item("common.items.crafting_ing.leather.simple_leather"), 1), ], craft_sprite: Some(TanningRack), - is_recycling: false, ), "simple leather": ( output: ("common.items.crafting_ing.leather.simple_leather", 1), @@ -229,7 +206,6 @@ (Item("common.items.crafting_ing.hide.animal_hide"), 1), ], craft_sprite: Some(TanningRack), - is_recycling: false, ), "thick leather": ( output: ("common.items.crafting_ing.leather.thick_leather", 1), @@ -237,7 +213,6 @@ (Item("common.items.crafting_ing.hide.tough_hide"), 1), ], craft_sprite: Some(TanningRack), - is_recycling: false, ), "rigid leather": ( output: ("common.items.crafting_ing.leather.rigid_leather", 1), @@ -245,7 +220,6 @@ (Item("common.items.crafting_ing.hide.rugged_hide"), 1), ], craft_sprite: Some(TanningRack), - is_recycling: false, ), "gold ingot": ( output: ("common.items.mineral.ingot.gold", 1), @@ -253,7 +227,6 @@ (Item("common.items.mineral.ore.gold"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "silver ingot": ( output: ("common.items.mineral.ingot.silver", 1), @@ -261,7 +234,6 @@ (Item("common.items.mineral.ore.silver"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "iron ingot": ( output: ("common.items.mineral.ingot.iron", 1), @@ -269,7 +241,6 @@ (Item("common.items.mineral.ore.iron"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "cobalt ingot": ( output: ("common.items.mineral.ingot.cobalt", 1), @@ -277,7 +248,6 @@ (Item("common.items.mineral.ore.cobalt"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "tin ingot": ( output: ("common.items.mineral.ingot.tin", 2), @@ -285,7 +255,6 @@ (Item("common.items.mineral.ore.tin"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "orichalcum ingot": ( output: ("common.items.mineral.ingot.orichalcum", 2), @@ -294,7 +263,6 @@ (Item("common.items.mineral.ingot.silver"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "copper ingot": ( output: ("common.items.mineral.ingot.copper", 2), @@ -302,7 +270,6 @@ (Item("common.items.mineral.ore.copper"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "bloodsteel ingot": ( output: ("common.items.mineral.ingot.bloodsteel", 2), @@ -312,7 +279,6 @@ (Item("common.items.mineral.ore.coal"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "steel ingot": ( output: ("common.items.mineral.ingot.steel", 1), @@ -321,7 +287,6 @@ (Item("common.items.mineral.ore.coal"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "bronze ingot": ( output: ("common.items.mineral.ingot.bronze", 2), @@ -330,7 +295,6 @@ (Item("common.items.mineral.ingot.tin"), 1), ], craft_sprite: Some(Forge), - is_recycling: false, ), "cotton": ( output: ("common.items.crafting_ing.cloth.cotton", 1), @@ -338,7 +302,6 @@ (Item("common.items.crafting_ing.cotton_boll"), 1), ], craft_sprite: Some(SpinningWheel), - is_recycling: false, ), "linen_flax": ( output: ("common.items.crafting_ing.cloth.linen", 1), @@ -346,7 +309,6 @@ (Item("common.items.flowers.wild_flax"), 1), ], craft_sprite: Some(SpinningWheel), - is_recycling: false, ), "silk": ( output: ("common.items.crafting_ing.cloth.silk", 1), @@ -354,7 +316,6 @@ (Item("common.items.crafting_ing.sticky_thread"), 1), ], craft_sprite: Some(SpinningWheel), - is_recycling: false, ), "lifecloth": ( output: ("common.items.crafting_ing.cloth.lifecloth", 1), @@ -363,7 +324,6 @@ (Item("common.items.crafting_ing.cloth.cotton"), 1), ], craft_sprite: Some(SpinningWheel), - is_recycling: false, ), "moonweave": ( output: ("common.items.crafting_ing.cloth.moonweave", 1), @@ -371,7 +331,6 @@ (Item("common.items.flowers.moonbell"), 1), ], craft_sprite: Some(SpinningWheel), - is_recycling: false, ), "sunsilk": ( output: ("common.items.crafting_ing.cloth.sunsilk", 1), @@ -379,7 +338,6 @@ (Item("common.items.flowers.pyrebloom"), 1), ], craft_sprite: Some(SpinningWheel), - is_recycling: false, ), "salad_plain": ( output: ("common.items.food.plainsalad", 1), @@ -388,7 +346,6 @@ (Item("common.items.crafting_ing.bowl"), 1), ], craft_sprite: None, - is_recycling: false, ), "salad_tomato": ( output: ("common.items.food.tomatosalad", 1), @@ -398,7 +355,6 @@ (Item("common.items.crafting_ing.bowl"), 1), ], craft_sprite: None, - is_recycling: false, ), "apples_stick": ( output: ("common.items.food.apple_stick", 1), @@ -407,7 +363,6 @@ (Item("common.items.food.apple"), 2), ], craft_sprite: None, - is_recycling: false, ), "mushroom_stick": ( output: ("common.items.food.mushroom_stick", 1), @@ -416,7 +371,6 @@ (Item("common.items.food.mushroom"), 3), ], craft_sprite: None, - is_recycling: false, ), "sunflower_icetea": ( output: ("common.items.food.sunflower_icetea", 4), @@ -427,7 +381,6 @@ (Item("common.items.crafting_ing.honey"), 1), ], craft_sprite: Some(Cauldron), - is_recycling: false, ), "Plain Cloth Glider": ( output: ("common.items.glider.basic_white", 1), @@ -439,7 +392,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Red Cloth Glider": ( output: ("common.items.glider.basic_red", 1), @@ -451,7 +403,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Leaves Glider": ( output: ("common.items.glider.leaves", 1), @@ -464,7 +415,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Sand Raptor Wings": ( output: ("common.items.glider.sandraptor", 1), @@ -477,7 +427,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Snow Raptor Wings": ( output: ("common.items.glider.snowraptor", 1), @@ -491,7 +440,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Wood Raptor Wings": ( output: ("common.items.glider.woodraptor", 1), @@ -504,7 +452,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Healing Sceptre": ( output: ("common.items.weapons.sceptre.starter_sceptre", 1), @@ -513,7 +460,6 @@ (Item("common.items.crafting_ing.stones"), 0), ], craft_sprite: None, - is_recycling: false, ), "Soothing Loop": ( output: ("common.items.weapons.sceptre.loops0", 1), @@ -524,7 +470,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Hunting Bow": ( output: ("common.items.weapons.bow.wood-2", 1), @@ -533,7 +478,6 @@ (Item("common.items.crafting_ing.twigs"), 6), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "Forest Spirit": ( output: ("common.items.weapons.sword.wood-2", 1), @@ -542,7 +486,6 @@ (Item("common.items.crafting_ing.twigs"), 10), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "Burnt Drumstick": ( output: ("common.items.weapons.hammer.burnt_drumstick", 1), @@ -550,7 +493,6 @@ (Item("common.items.food.meat.bird_large_cooked"), 1), ], craft_sprite: Some(CookingPot), - is_recycling: false, ), //ARMOR/HIDE/RAWHIDE "rawhide back": ( @@ -560,7 +502,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "rawhide belt": ( output: ("common.items.armor.hide.rawhide.belt", 1), @@ -569,7 +510,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "rawhide chest": ( output: ("common.items.armor.hide.rawhide.chest", 1), @@ -578,7 +518,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "rawhide feet": ( output: ("common.items.armor.hide.rawhide.foot", 1), @@ -587,7 +526,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "rawhide hands": ( output: ("common.items.armor.hide.rawhide.hand", 1), @@ -596,7 +534,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "rawhide pants": ( output: ("common.items.armor.hide.rawhide.pants", 1), @@ -605,7 +542,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "rawhide shoulder": ( output: ("common.items.armor.hide.rawhide.shoulder", 1), @@ -614,7 +550,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 6), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), //ARMOR/HIDE/LEATHER "leather back": ( @@ -624,7 +559,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "leather belt": ( output: ("common.items.armor.hide.leather.belt", 1), @@ -633,7 +567,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "leather chest": ( output: ("common.items.armor.hide.leather.chest", 1), @@ -642,7 +575,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "leather feet": ( output: ("common.items.armor.hide.leather.foot", 1), @@ -651,7 +583,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "leather hands": ( output: ("common.items.armor.hide.leather.hand", 1), @@ -660,7 +591,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "leather pants": ( output: ("common.items.armor.hide.leather.pants", 1), @@ -669,7 +599,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "leather shoulder": ( output: ("common.items.armor.hide.leather.shoulder", 1), @@ -678,7 +607,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 6), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), //ARMOR/HIDE/SCALE "scale back": ( @@ -688,7 +616,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "scale belt": ( output: ("common.items.armor.hide.scale.belt", 1), @@ -697,7 +624,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "scale chest": ( output: ("common.items.armor.hide.scale.chest", 1), @@ -706,7 +632,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "scale feet": ( output: ("common.items.armor.hide.scale.foot", 1), @@ -715,7 +640,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "scale hands": ( output: ("common.items.armor.hide.scale.hand", 1), @@ -724,7 +648,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "scale pants": ( output: ("common.items.armor.hide.scale.pants", 1), @@ -733,7 +656,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "scale shoulder": ( output: ("common.items.armor.hide.scale.shoulder", 1), @@ -742,7 +664,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 6), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), //ARMOR/HIDE/CARAPACE "carapace back": ( @@ -753,7 +674,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "carapace belt": ( output: ("common.items.armor.hide.carapace.belt", 1), @@ -763,7 +683,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "carapace chest": ( output: ("common.items.armor.hide.carapace.chest", 1), @@ -773,7 +692,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "carapace feet": ( output: ("common.items.armor.hide.carapace.foot", 1), @@ -783,7 +701,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "carapace hands": ( output: ("common.items.armor.hide.carapace.hand", 1), @@ -793,7 +710,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "carapace pants": ( output: ("common.items.armor.hide.carapace.pants", 1), @@ -803,7 +719,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "carapace shoulder": ( output: ("common.items.armor.hide.carapace.shoulder", 1), @@ -813,7 +728,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 6), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), //ARMOR/HIDE/PRIMAL "primal back": ( @@ -825,7 +739,6 @@ (Item("common.items.crafting_ing.leather.rigid_leather"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "primal belt": ( output: ("common.items.armor.hide.primal.belt", 1), @@ -835,7 +748,6 @@ (Item("common.items.crafting_ing.leather.rigid_leather"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "primal chest": ( output: ("common.items.armor.hide.primal.chest", 1), @@ -846,7 +758,6 @@ (Item("common.items.crafting_ing.leather.rigid_leather"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "primal feet": ( output: ("common.items.armor.hide.primal.foot", 1), @@ -856,7 +767,6 @@ (Item("common.items.crafting_ing.leather.rigid_leather"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "primal hands": ( output: ("common.items.armor.hide.primal.hand", 1), @@ -866,7 +776,6 @@ (Item("common.items.crafting_ing.leather.rigid_leather"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "primal pants": ( output: ("common.items.armor.hide.primal.pants", 1), @@ -877,7 +786,6 @@ (Item("common.items.crafting_ing.leather.rigid_leather"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "primal shoulder": ( output: ("common.items.armor.hide.primal.shoulder", 1), @@ -888,7 +796,6 @@ (Item("common.items.crafting_ing.leather.rigid_leather"), 6), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), //ARMOR/HIDE/DRAGONSCALE "dragonscale back": ( @@ -900,7 +807,6 @@ (Item("common.items.crafting_ing.hide.scales"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "dragonscale belt": ( output: ("common.items.armor.hide.dragonscale.belt", 1), @@ -910,7 +816,6 @@ (Item("common.items.crafting_ing.hide.scales"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "dragonscale chest": ( output: ("common.items.armor.hide.dragonscale.chest", 1), @@ -921,7 +826,6 @@ (Item("common.items.crafting_ing.hide.scales"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "dragonscale feet": ( output: ("common.items.armor.hide.dragonscale.foot", 1), @@ -931,7 +835,6 @@ (Item("common.items.crafting_ing.hide.scales"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "dragonscale hands": ( output: ("common.items.armor.hide.dragonscale.hand", 1), @@ -941,7 +844,6 @@ (Item("common.items.crafting_ing.hide.scales"), 2), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "dragonscale pants": ( output: ("common.items.armor.hide.dragonscale.pants", 1), @@ -952,7 +854,6 @@ (Item("common.items.crafting_ing.hide.scales"), 4), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "dragonscale shoulder": ( output: ("common.items.armor.hide.dragonscale.shoulder", 1), @@ -963,7 +864,6 @@ (Item("common.items.crafting_ing.hide.scales"), 6), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), //ARMOR/CLOTH/LINEN "linen back": ( @@ -972,7 +872,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 3), ], craft_sprite: Some(Loom), - is_recycling: false, ), "linen belt": ( output: ("common.items.armor.cloth.linen.belt", 1), @@ -980,7 +879,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 2), ], craft_sprite: Some(Loom), - is_recycling: false, ), "linen chest": ( output: ("common.items.armor.cloth.linen.chest", 1), @@ -988,7 +886,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 10), ], craft_sprite: Some(Loom), - is_recycling: false, ), "linen feet": ( output: ("common.items.armor.cloth.linen.foot", 1), @@ -996,7 +893,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 3), ], craft_sprite: Some(Loom), - is_recycling: false, ), "linen hands": ( output: ("common.items.armor.cloth.linen.hand", 1), @@ -1004,7 +900,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 3), ], craft_sprite: Some(Loom), - is_recycling: false, ), "linen pants": ( output: ("common.items.armor.cloth.linen.pants", 1), @@ -1012,7 +907,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 8), ], craft_sprite: Some(Loom), - is_recycling: false, ), "linen shoulder": ( output: ("common.items.armor.cloth.linen.shoulder", 1), @@ -1020,7 +914,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 8), ], craft_sprite: Some(Loom), - is_recycling: false, ), //ARMOR/CLOTH/WOOLEN "woolen back": ( @@ -1032,7 +925,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "woolen belt": ( output: ("common.items.armor.cloth.woolen.belt", 1), @@ -1043,7 +935,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "woolen chest": ( output: ("common.items.armor.cloth.woolen.chest", 1), @@ -1054,7 +945,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "woolen feet": ( output: ("common.items.armor.cloth.woolen.foot", 1), @@ -1065,7 +955,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "woolen hands": ( output: ("common.items.armor.cloth.woolen.hand", 1), @@ -1076,7 +965,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "woolen pants": ( output: ("common.items.armor.cloth.woolen.pants", 1), @@ -1087,7 +975,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "woolen shoulder": ( output: ("common.items.armor.cloth.woolen.shoulder", 1), @@ -1098,7 +985,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), //ARMOR/CLOTH/SILKEN "silken back": ( @@ -1108,7 +994,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "silken belt": ( output: ("common.items.armor.cloth.silken.belt", 1), @@ -1117,7 +1002,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "silken chest": ( output: ("common.items.armor.cloth.silken.chest", 1), @@ -1127,7 +1011,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "silken feet": ( output: ("common.items.armor.cloth.silken.foot", 1), @@ -1136,7 +1019,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "silken hands": ( output: ("common.items.armor.cloth.silken.hand", 1), @@ -1145,7 +1027,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "silken pants": ( output: ("common.items.armor.cloth.silken.pants", 1), @@ -1155,7 +1036,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "silken shoulder": ( output: ("common.items.armor.cloth.silken.shoulder", 1), @@ -1165,7 +1045,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), //ARMOR/CLOTH/DRUID "druid back": ( @@ -1176,7 +1055,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "druid belt": ( output: ("common.items.armor.cloth.druid.belt", 1), @@ -1186,7 +1064,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "druid chest": ( output: ("common.items.armor.cloth.druid.chest", 1), @@ -1196,7 +1073,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "druid feet": ( output: ("common.items.armor.cloth.druid.foot", 1), @@ -1206,7 +1082,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "druid hands": ( output: ("common.items.armor.cloth.druid.hand", 1), @@ -1216,7 +1091,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "druid pants": ( output: ("common.items.armor.cloth.druid.pants", 1), @@ -1226,7 +1100,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "druid shoulder": ( output: ("common.items.armor.cloth.druid.shoulder", 1), @@ -1236,7 +1109,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), //ARMOR/CLOTH/MOONWEAVE "moonweave back": ( @@ -1249,7 +1121,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "moonweave belt": ( output: ("common.items.armor.cloth.moonweave.belt", 1), @@ -1260,7 +1131,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "moonweave chest": ( output: ("common.items.armor.cloth.moonweave.chest", 1), @@ -1272,7 +1142,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "moonweave feet": ( output: ("common.items.armor.cloth.moonweave.foot", 1), @@ -1283,7 +1152,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "moonweave hands": ( output: ("common.items.armor.cloth.moonweave.hand", 1), @@ -1294,7 +1162,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "moonweave pants": ( output: ("common.items.armor.cloth.moonweave.pants", 1), @@ -1305,7 +1172,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "moonweave shoulder": ( output: ("common.items.armor.cloth.moonweave.shoulder", 1), @@ -1316,7 +1182,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), //ARMOR/CLOTH/SUNSILK "sunsilk back": ( @@ -1328,7 +1193,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "sunsilk belt": ( output: ("common.items.armor.cloth.sunsilk.belt", 1), @@ -1338,7 +1202,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "sunsilk chest": ( output: ("common.items.armor.cloth.sunsilk.chest", 1), @@ -1349,7 +1212,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "sunsilk feet": ( output: ("common.items.armor.cloth.sunsilk.foot", 1), @@ -1359,7 +1221,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "sunsilk hands": ( output: ("common.items.armor.cloth.sunsilk.hand", 1), @@ -1369,7 +1230,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "sunsilk pants": ( output: ("common.items.armor.cloth.sunsilk.pants", 1), @@ -1379,7 +1239,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), "sunsilk shoulder": ( output: ("common.items.armor.cloth.sunsilk.shoulder", 1), @@ -1389,7 +1248,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(Loom), - is_recycling: false, ), //ARMOR/MAIL/BRONZE "bronze back": ( @@ -1399,7 +1257,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bronze belt": ( output: ("common.items.armor.mail.bronze.belt", 1), @@ -1408,7 +1265,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bronze chest": ( output: ("common.items.armor.mail.bronze.chest", 1), @@ -1417,7 +1273,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bronze feet": ( output: ("common.items.armor.mail.bronze.foot", 1), @@ -1426,7 +1281,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bronze hands": ( output: ("common.items.armor.mail.bronze.hand", 1), @@ -1435,7 +1289,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bronze pants": ( output: ("common.items.armor.mail.bronze.pants", 1), @@ -1444,7 +1297,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bronze shoulder": ( output: ("common.items.armor.mail.bronze.shoulder", 1), @@ -1453,7 +1305,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 6), ], craft_sprite: Some(Anvil), - is_recycling: false, ), //ARMOR/MAIL/IRON "iron back": ( @@ -1463,7 +1314,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "iron belt": ( output: ("common.items.armor.mail.iron.belt", 1), @@ -1472,7 +1322,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "iron chest": ( output: ("common.items.armor.mail.iron.chest", 1), @@ -1481,7 +1330,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "iron feet": ( output: ("common.items.armor.mail.iron.foot", 1), @@ -1490,7 +1338,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "iron hands": ( output: ("common.items.armor.mail.iron.hand", 1), @@ -1499,7 +1346,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "iron pants": ( output: ("common.items.armor.mail.iron.pants", 1), @@ -1508,7 +1354,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 4), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "iron shoulder": ( output: ("common.items.armor.mail.iron.shoulder", 1), @@ -1517,7 +1362,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 6), ], craft_sprite: Some(Anvil), - is_recycling: false, ), //ARMOR/MAIL/STEEL "steel back": ( @@ -1527,7 +1371,6 @@ (Item("common.items.crafting_ing.cloth.linen"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "steel belt": ( output: ("common.items.armor.mail.steel.belt", 1), @@ -1536,7 +1379,6 @@ (Item("common.items.crafting_ing.leather.thick_leather"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "steel chest": ( output: ("common.items.armor.mail.steel.chest", 1), @@ -1545,7 +1387,6 @@ (Item("common.items.crafting_ing.leather.thick_leather"), 4), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "steel feet": ( output: ("common.items.armor.mail.steel.foot", 1), @@ -1554,7 +1395,6 @@ (Item("common.items.crafting_ing.leather.thick_leather"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "steel hands": ( output: ("common.items.armor.mail.steel.hand", 1), @@ -1563,7 +1403,6 @@ (Item("common.items.crafting_ing.leather.thick_leather"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "steel pants": ( output: ("common.items.armor.mail.steel.pants", 1), @@ -1572,7 +1411,6 @@ (Item("common.items.crafting_ing.leather.thick_leather"), 4), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "steel shoulder": ( output: ("common.items.armor.mail.steel.shoulder", 1), @@ -1581,7 +1419,6 @@ (Item("common.items.crafting_ing.leather.thick_leather"), 6), ], craft_sprite: Some(Anvil), - is_recycling: false, ), //ARMOR/MAIL/COBALT "cobalt back": ( @@ -1592,7 +1429,6 @@ (Item("common.items.mineral.gem.sapphire"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "cobalt belt": ( output: ("common.items.armor.mail.cobalt.belt", 1), @@ -1602,7 +1438,6 @@ (Item("common.items.mineral.gem.sapphire"), 1), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "cobalt chest": ( output: ("common.items.armor.mail.cobalt.chest", 1), @@ -1612,7 +1447,6 @@ (Item("common.items.mineral.gem.sapphire"), 3), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "cobalt feet": ( output: ("common.items.armor.mail.cobalt.foot", 1), @@ -1621,7 +1455,6 @@ (Item("common.items.crafting_ing.cloth.silk"), 3), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "cobalt hands": ( output: ("common.items.armor.mail.cobalt.hand", 1), @@ -1630,7 +1463,6 @@ (Item("common.items.crafting_ing.cloth.silk"), 3), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "cobalt pants": ( output: ("common.items.armor.mail.cobalt.pants", 1), @@ -1640,7 +1472,6 @@ (Item("common.items.mineral.gem.sapphire"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "cobalt shoulder": ( output: ("common.items.armor.mail.cobalt.shoulder", 1), @@ -1650,7 +1481,6 @@ (Item("common.items.mineral.gem.sapphire"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), //ARMOR/MAIL/BLOODSTEEL "bloodsteel back": ( @@ -1662,7 +1492,6 @@ (Item("common.items.mineral.gem.ruby"), 1), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bloodsteel belt": ( output: ("common.items.armor.mail.bloodsteel.belt", 1), @@ -1671,7 +1500,6 @@ (Item("common.items.crafting_ing.hide.carapace"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bloodsteel chest": ( output: ("common.items.armor.mail.bloodsteel.chest", 1), @@ -1682,7 +1510,6 @@ (Item("common.items.mineral.gem.ruby"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bloodsteel feet": ( output: ("common.items.armor.mail.bloodsteel.foot", 1), @@ -1691,7 +1518,6 @@ (Item("common.items.crafting_ing.hide.carapace"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bloodsteel hands": ( output: ("common.items.armor.mail.bloodsteel.hand", 1), @@ -1700,7 +1526,6 @@ (Item("common.items.crafting_ing.hide.carapace"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bloodsteel pants": ( output: ("common.items.armor.mail.bloodsteel.pants", 1), @@ -1710,7 +1535,6 @@ (Item("common.items.mineral.gem.ruby"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "bloodsteel shoulder": ( output: ("common.items.armor.mail.bloodsteel.shoulder", 1), @@ -1720,7 +1544,6 @@ (Item("common.items.mineral.gem.ruby"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), //ARMOR/MAIL/ORICHALCUM "orichalcum back": ( @@ -1733,7 +1556,6 @@ (Item("common.items.mineral.gem.sapphire"), 1), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "orichalcum belt": ( output: ("common.items.armor.mail.orichalcum.belt", 1), @@ -1744,7 +1566,6 @@ (Item("common.items.mineral.gem.sapphire"), 1), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "orichalcum chest": ( output: ("common.items.armor.mail.orichalcum.chest", 1), @@ -1756,7 +1577,6 @@ (Item("common.items.mineral.gem.sapphire"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "orichalcum feet": ( output: ("common.items.armor.mail.orichalcum.foot", 1), @@ -1767,7 +1587,6 @@ (Item("common.items.mineral.gem.sapphire"), 1), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "orichalcum hands": ( output: ("common.items.armor.mail.orichalcum.hand", 1), @@ -1778,7 +1597,6 @@ (Item("common.items.mineral.gem.sapphire"), 1), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "orichalcum pants": ( output: ("common.items.armor.mail.orichalcum.pants", 1), @@ -1789,7 +1607,6 @@ (Item("common.items.mineral.gem.diamond"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "orichalcum shoulder": ( output: ("common.items.armor.mail.orichalcum.shoulder", 1), @@ -1799,7 +1616,6 @@ (Item("common.items.mineral.gem.sapphire"), 2), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "Seashell Necklace": ( @@ -1811,7 +1627,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "red cloth": ( output: ("common.items.crafting_ing.cloth.linen_red", 1), @@ -1821,7 +1636,6 @@ (Item("common.items.crafting_tools.mortar_pestle"), 0), ], craft_sprite: None, - is_recycling: false, ), "tiny red pouch": ( output: ("common.items.armor.misc.bag.tiny_red_pouch", 1), @@ -1829,7 +1643,6 @@ (Item("common.items.crafting_ing.cloth.linen_red"), 3), ], craft_sprite: None, - is_recycling: false, ), "tiny leather pouch": ( output: ("common.items.armor.misc.bag.tiny_leather_pouch", 1), @@ -1837,7 +1650,6 @@ (Item("common.items.crafting_ing.leather.leather_strips"), 12), ], craft_sprite: None, - is_recycling: false, ), "knitted red pouch": ( output: ("common.items.armor.misc.bag.knitted_red_pouch", 1), @@ -1847,7 +1659,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: None, - is_recycling: false, ), "woven red bag": ( output: ("common.items.armor.misc.bag.woven_red_bag", 1), @@ -1857,7 +1668,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: None, - is_recycling: false, ), "traveler backpack": ( output: ("common.items.armor.misc.back.backpack", 1), @@ -1870,7 +1680,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "sturdy red backpack": ( output: ("common.items.armor.misc.bag.sturdy_red_backpack", 1), @@ -1882,7 +1691,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: None, - is_recycling: false, ), "troll hide pack": ( output: ("common.items.armor.misc.bag.troll_hide_pack", 1), @@ -1893,7 +1701,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: None, - is_recycling: false, ), "Mindflayer Spellbag": ( output: ("common.items.armor.misc.bag.mindflayer_spellbag", 1), @@ -1905,7 +1712,6 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: None, - is_recycling: false, ), "tin pickaxe": ( output: ("common.items.tool.pickaxe_stone", 1), @@ -1915,7 +1721,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(Anvil), - is_recycling: false, ), "steel pickaxe": ( output: ("common.items.tool.pickaxe_steel", 1), @@ -1925,59 +1730,6 @@ (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(Anvil), - is_recycling: false, - ), - // "linen": ( - // output: ("common.items.crafting_ing.cloth.linen", 1), - // inputs: [ - // (Tag(Material(Linen)), 1), - // (Item("common.items.crafting_tools.sewing_set"), 0), - // ], - // craft_sprite: None, - // is_recycling: true, - // ), - "wool": ( - output: ("common.items.crafting_ing.cloth.wool", 1), - inputs: [ - (Tag(Material(Wool)), 1), - (Item("common.items.crafting_tools.sewing_set"), 0), - ], - craft_sprite: None, - is_recycling: true, - ), - "rawhide": ( - output: ("common.items.crafting_ing.leather.simple_leather", 1), - inputs: [ - (Tag(Material(Rawhide)), 1), - (Item("common.items.crafting_tools.sewing_set"), 0), - ], - craft_sprite: None, - is_recycling: true, - ), - "leather": ( - output: ("common.items.crafting_ing.leather.thick_leather", 1), - inputs: [ - (Tag(Material(Leather)), 1), - (Item("common.items.crafting_tools.sewing_set"), 0), - ], - craft_sprite: None, - is_recycling: true, - ), - "bronze": ( - output: ("common.items.mineral.ingot.bronze", 1), - inputs: [ - (Tag(Material(Bronze)), 1), - ], - craft_sprite: Some(Anvil), - is_recycling: true, - ), - "iron": ( - output: ("common.items.mineral.ingot.iron", 1), - inputs: [ - (Tag(Material(Iron)), 1), - ], - craft_sprite: Some(Anvil), - is_recycling: true, ), "fang necklace": ( output: ("common.items.armor.misc.neck.fang", 1), @@ -2004,7 +1756,6 @@ (Item("common.items.mineral.gem.diamond"), 1), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "diamond necklace": ( output: ("common.items.armor.misc.neck.diamond", 1), @@ -2022,7 +1773,6 @@ (Item("common.items.mineral.gem.ruby"), 1), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "ruby necklace": ( output: ("common.items.armor.misc.neck.ruby", 1), @@ -2040,7 +1790,6 @@ (Item("common.items.mineral.gem.emerald"), 1), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "emerald necklace": ( output: ("common.items.armor.misc.neck.emerald", 1), @@ -2058,7 +1807,6 @@ (Item("common.items.mineral.gem.sapphire"), 1), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "sapphire necklace": ( output: ("common.items.armor.misc.neck.sapphire", 1), @@ -2076,7 +1824,6 @@ (Item("common.items.mineral.gem.topaz"), 1), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "topaz necklace": ( output: ("common.items.armor.misc.neck.topaz", 1), @@ -2094,7 +1841,6 @@ (Item("common.items.mineral.gem.amethyst"), 1), ], craft_sprite: Some(CraftingBench), - is_recycling: false, ), "amethyst necklace": ( output: ("common.items.armor.misc.neck.amethyst", 1), diff --git a/common/src/comp/inventory/item/modular.rs b/common/src/comp/inventory/item/modular.rs index e5d0710732..e6a53d3dd4 100644 --- a/common/src/comp/inventory/item/modular.rs +++ b/common/src/comp/inventory/item/modular.rs @@ -232,7 +232,6 @@ fn make_recipe_def(identifier: String, toolkind: ToolKind) -> RawRecipe { output, inputs, craft_sprite: None, - is_recycling: false, } } diff --git a/common/src/comp/inventory/trade_pricing.rs b/common/src/comp/inventory/trade_pricing.rs index 45b2ab2631..3558f623b8 100644 --- a/common/src/comp/inventory/trade_pricing.rs +++ b/common/src/comp/inventory/trade_pricing.rs @@ -374,30 +374,27 @@ impl TradePricing { let mut ordered_recipes: Vec = Vec::new(); for (_, recipe) in book.iter() { let (ref asset_path, amount) = recipe.output; - // Trading don't know how to work with recycling yet - if !recipe.is_recycling { - ordered_recipes.push(RememberedRecipe { - output: asset_path.id().into(), - amount, - material_cost: Self::UNAVAILABLE_PRICE, - input: recipe - .inputs - .iter() - .filter_map(|&(ref recipe_input, count)| { - if let RecipeInput::Item(it) = recipe_input { - // If item is not consumed in craft, ignore it - if count == 0 { - None - } else { - Some((it.id().into(), count)) - } - } else { + ordered_recipes.push(RememberedRecipe { + output: asset_path.id().into(), + amount, + material_cost: Self::UNAVAILABLE_PRICE, + input: recipe + .inputs + .iter() + .filter_map(|&(ref recipe_input, count)| { + if let RecipeInput::Item(it) = recipe_input { + // If item is not consumed in craft, ignore it + if count == 0 { None + } else { + Some((it.id().into(), count)) } - }) - .collect(), - }); - } + } else { + None + } + }) + .collect(), + }); } // re-evaluate prices based on crafting tables diff --git a/common/src/recipe.rs b/common/src/recipe.rs index 821272b28d..b0c5f84df3 100644 --- a/common/src/recipe.rs +++ b/common/src/recipe.rs @@ -22,7 +22,6 @@ pub struct Recipe { pub output: (Arc, u32), pub inputs: Vec<(RecipeInput, u32)>, pub craft_sprite: Option, - pub is_recycling: bool, } #[allow(clippy::type_complexity)] @@ -126,7 +125,6 @@ pub(crate) struct RawRecipe { pub(crate) output: (String, u32), pub(crate) inputs: Vec<(RawRecipeInput, u32)>, pub(crate) craft_sprite: Option, - pub(crate) is_recycling: bool, } #[derive(Clone, Deserialize)] @@ -180,7 +178,6 @@ impl assets::Compound for RecipeBook { output, inputs, craft_sprite, - is_recycling, }, )| { let inputs = inputs @@ -192,7 +189,6 @@ impl assets::Compound for RecipeBook { output, inputs, craft_sprite: *craft_sprite, - is_recycling: *is_recycling, })) }, ) diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index 552d5b98fc..0d00119459 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -195,11 +195,10 @@ impl CraftingTab { CraftingTab::Glider => matches!(item.kind(), ItemKind::Glider(_)), CraftingTab::Potion => item.tags().contains(&ItemTag::Potion), CraftingTab::ProcessedMaterial => { - (item.tags().contains(&ItemTag::MetalIngot) + item.tags().contains(&ItemTag::MetalIngot) || item.tags().contains(&ItemTag::Textile) || item.tags().contains(&ItemTag::Leather) - || item.tags().contains(&ItemTag::BaseMaterial)) - && !recipe.is_recycling + || item.tags().contains(&ItemTag::BaseMaterial) }, CraftingTab::Bag => item.tags().contains(&ItemTag::Bag), CraftingTab::Tool => item.tags().contains(&ItemTag::CraftingTool), @@ -208,7 +207,8 @@ impl CraftingTab { ItemKind::Tool(_) => !item.tags().contains(&ItemTag::CraftingTool), _ => false, }, - CraftingTab::Dismantle => recipe.is_recycling, + // Only has salavging UI which doesn't use recipes + CraftingTab::Dismantle => false, } } } From 899f4db654b2bc5846f229802f8215f531efd18a Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 5 Oct 2021 22:08:03 -0400 Subject: [PATCH 03/18] Salvage works by double clicking from inventory while salvage tab in crafting is open. --- client/src/lib.rs | 22 +++++++++++++++++++++- voxygen/src/hud/mod.rs | 19 ++++++++++++++----- voxygen/src/session/mod.rs | 3 +++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 7ddc91b0a6..0cf679117c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -27,7 +27,7 @@ use common::{ group, invite::{InviteKind, InviteResponse}, skills::Skill, - slot::Slot, + slot::{InvSlotId, Slot}, CharacterState, ChatMode, ControlAction, ControlEvent, Controller, ControllerInputs, GroupManip, InputKind, InventoryAction, InventoryEvent, InventoryUpdateEvent, UtteranceKind, @@ -1015,6 +1015,26 @@ impl Client { } } + pub fn can_salvage_item(&self, slot: InvSlotId) -> bool { + self.inventories() + .get(self.entity()) + .and_then(|inv| inv.get(slot)) + .map_or(false, |item| item.is_salvageable()) + } + + pub fn salvage_item(&mut self, slot: InvSlotId) -> bool { + let is_salvageable = self.can_salvage_item(slot); + if is_salvageable { + self.send_msg(ClientGeneral::ControlEvent(ControlEvent::InventoryEvent( + InventoryEvent::CraftRecipe { + craft_event: CraftEvent::Salvage(slot), + craft_sprite: None, + }, + ))); + } + is_salvageable + } + fn update_available_recipes(&mut self) { self.available_recipes = self .recipe_book diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 2281261fa5..fbe61773be 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -75,7 +75,7 @@ use common::{ combat, comp::{ self, fluid_dynamics, - inventory::trade_pricing::TradePricing, + inventory::{slot::InvSlotId, trade_pricing::TradePricing}, item::{tool::ToolKind, ItemDesc, MaterialStatManifest, Quality}, skills::{Skill, SkillGroupKind}, BuffData, BuffKind, Item, @@ -521,6 +521,7 @@ pub enum Event { recipe: String, craft_sprite: Option<(Vec3, SpriteKind)>, }, + SalvageItem(InvSlotId), InviteMember(Uid), AcceptInvite, DeclineInvite, @@ -3329,10 +3330,18 @@ impl Hud { slot::Event::Used(from) => { // Item used (selected and then clicked again) if let Some(from) = to_slot(from) { - events.push(Event::UseSlot { - slot: from, - bypass_dialog: false, - }); + if self.show.crafting + && matches!(self.show.crafting_tab, CraftingTab::Dismantle) + { + if let Slot::Inventory(slot) = from { + events.push(Event::SalvageItem(slot)) + } + } else { + events.push(Event::UseSlot { + slot: from, + bypass_dialog: false, + }); + } } else if let Hotbar(h) = from { // Used from hotbar self.hotbar.get(h).map(|s| { diff --git a/voxygen/src/session/mod.rs b/voxygen/src/session/mod.rs index 58ff24ac25..4cdae8a24f 100644 --- a/voxygen/src/session/mod.rs +++ b/voxygen/src/session/mod.rs @@ -1397,6 +1397,9 @@ impl PlayState for SessionState { } => { self.client.borrow_mut().craft_recipe(&recipe, craft_sprite); }, + HudEvent::SalvageItem(slot) => { + self.client.borrow_mut().salvage_item(slot); + }, HudEvent::InviteMember(uid) => { self.client.borrow_mut().send_invite(uid, InviteKind::Group); }, From 404ff2918ec5a83045512c4aba3ef376ec2333f8 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 6 Oct 2021 18:18:12 -0400 Subject: [PATCH 04/18] Simple recipes now take a vec of slots to look in for the ingredients. --- client/src/lib.rs | 8 +- common/src/comp/controller.rs | 5 +- common/src/comp/inventory/mod.rs | 45 +--------- common/src/recipe.rs | 120 +++++++++++++++++++++------ server/src/events/inventory_manip.rs | 12 +-- voxygen/src/session/mod.rs | 17 +++- 6 files changed, 124 insertions(+), 83 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 0cf679117c..794ace1d55 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -988,7 +988,7 @@ impl Client { .zip(self.inventories().get(self.entity())) .map(|(recipe, inv)| { ( - inv.contains_ingredients(&*recipe).is_ok(), + recipe.inventory_contains_ingredients(inv).is_ok(), recipe.craft_sprite, ) }) @@ -998,6 +998,7 @@ impl Client { pub fn craft_recipe( &mut self, recipe: &str, + slots: Vec, craft_sprite: Option<(Vec3, SpriteKind)>, ) -> bool { let (can_craft, required_sprite) = self.can_craft_recipe(recipe); @@ -1005,7 +1006,10 @@ impl Client { if can_craft && has_sprite { self.send_msg(ClientGeneral::ControlEvent(ControlEvent::InventoryEvent( InventoryEvent::CraftRecipe { - craft_event: CraftEvent::Simple(recipe.to_string()), + craft_event: CraftEvent::Simple { + recipe: recipe.to_string(), + slots, + }, craft_sprite: craft_sprite.map(|(pos, _)| pos), }, ))); diff --git a/common/src/comp/controller.rs b/common/src/comp/controller.rs index 61e2af20ab..a12fa2b404 100644 --- a/common/src/comp/controller.rs +++ b/common/src/comp/controller.rs @@ -92,7 +92,10 @@ impl From for InventoryManip { #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum CraftEvent { - Simple(String), + Simple { + recipe: String, + slots: Vec, + }, Salvage(InvSlotId), } diff --git a/common/src/comp/inventory/mod.rs b/common/src/comp/inventory/mod.rs index 76ea19e12b..a1347a4dd5 100644 --- a/common/src/comp/inventory/mod.rs +++ b/common/src/comp/inventory/mod.rs @@ -2,7 +2,7 @@ use core::ops::Not; use serde::{Deserialize, Serialize}; use specs::{Component, DerefFlaggedStorage}; use specs_idvs::IdvStorage; -use std::{collections::HashMap, convert::TryFrom, mem, ops::Range}; +use std::{convert::TryFrom, mem, ops::Range}; use tracing::{debug, trace, warn}; use vek::Vec3; @@ -16,7 +16,6 @@ use crate::{ slot::{InvSlotId, SlotId}, Item, }, - recipe::{Recipe, RecipeInput}, uid::Uid, LoadoutBuilder, }; @@ -460,48 +459,6 @@ impl Inventory { .sum() } - /// Determine whether the inventory contains the ingredients for a recipe. - /// If it does, return a vector of numbers, where is number corresponds - /// to an inventory slot, along with the number of items that need - /// removing from it. It items are missing, return the missing items, and - /// how many are missing. - pub fn contains_ingredients<'a>( - &self, - recipe: &'a Recipe, - ) -> Result, Vec<(&'a RecipeInput, u32)>> { - let mut slot_claims = HashMap::::new(); - let mut missing = Vec::<(&RecipeInput, u32)>::new(); - - for (input, mut needed) in recipe.inputs() { - let mut contains_any = false; - - for (inv_slot_id, slot) in self.slots_with_id() { - if let Some(item) = slot - .as_ref() - .filter(|item| item.matches_recipe_input(&*input)) - { - let claim = slot_claims.entry(inv_slot_id).or_insert(0); - // FIXME: Fishy, looks like it can underflow before min which can trigger an - // overflow check. - let can_claim = (item.amount() - *claim).min(needed); - *claim += can_claim; - needed -= can_claim; - contains_any = true; - } - } - - if needed > 0 || !contains_any { - missing.push((input, needed)); - } - } - - if missing.is_empty() { - Ok(slot_claims) - } else { - Err(missing) - } - } - /// Adds a new item to the first empty slot of the inventory. Returns the /// item again in an Err if no free slot was found, otherwise returns a /// reference to the item. diff --git a/common/src/recipe.rs b/common/src/recipe.rs index b0c5f84df3..2ceea34c11 100644 --- a/common/src/recipe.rs +++ b/common/src/recipe.rs @@ -27,38 +27,60 @@ pub struct Recipe { #[allow(clippy::type_complexity)] impl Recipe { /// Perform a recipe, returning a list of missing items on failure - pub fn perform( + pub fn craft_simple( &self, inv: &mut Inventory, + slots: Vec, ability_map: &AbilityMap, msm: &MaterialStatManifest, - ) -> Result<(Item, u32), Vec<(&RecipeInput, u32)>> { - // Get ingredient cells from inventory, - let mut components = Vec::new(); + ) -> Result, Vec<(&RecipeInput, u32)>> { + let mut recipe_inputs = Vec::new(); + let mut unsatisfied_requirements = Vec::new(); - inv.contains_ingredients(self)? - .into_iter() - .for_each(|(pos, n)| { - (0..n).for_each(|_| { - let component = inv - .take(pos, ability_map, msm) - .expect("Expected item to exist in inventory"); - components.push(component); - }) + self.inputs + .iter() + .enumerate() + .for_each(|(i, (input, amount))| { + let valid_input = if let Some(item) = slots.get(i).and_then(|slot| inv.get(*slot)) { + item.matches_recipe_input(input) + } else { + false + }; + + if let Some(slot) = slots.get(i) { + if !valid_input { + unsatisfied_requirements.push((input, *amount)); + } else { + for taken in 0..*amount { + if let Some(item) = inv.take(*slot, ability_map, msm) { + recipe_inputs.push(item); + } else { + unsatisfied_requirements.push((input, *amount - taken)); + break; + } + } + } + } else { + unsatisfied_requirements.push((input, *amount)); + } }); - let crafted_item = - Item::new_from_item_def(Arc::clone(&self.output.0), &components, ability_map, msm); - - Ok((crafted_item, self.output.1)) - - // for i in 0..self.output.1 { - // if let Err(item) = inv.push(crafted_item) { - // return Ok(Some((item, self.output.1 - i))); - // } - // } - - // Ok(None) + if unsatisfied_requirements.is_empty() { + let (item_def, quantity) = &self.output; + let crafted_item = + Item::new_from_item_def(Arc::clone(item_def), &[], ability_map, msm); + let mut crafted_items = Vec::with_capacity(*quantity as usize); + for _ in 0..*quantity { + crafted_items.push(crafted_item.duplicate(ability_map, msm)); + } + Ok(crafted_items) + } else { + for item in recipe_inputs { + inv.push(item) + .expect("Item was in inventory before craft attempt"); + } + Err(unsatisfied_requirements) + } } pub fn inputs(&self) -> impl ExactSizeIterator { @@ -66,6 +88,52 @@ impl Recipe { .iter() .map(|(item_def, amount)| (item_def, *amount)) } + + /// Determine whether the inventory contains the ingredients for a recipe. + /// If it does, return a vec of inventory slots that contain the + /// ingredients needed, whose positions correspond to particular recipe + /// inputs. If items are missing, return the missing items, and how many + /// are missing. + pub fn inventory_contains_ingredients<'a>( + &self, + inv: &'a Inventory, + ) -> Result, Vec<(&RecipeInput, u32)>> { + let mut slot_claims = HashMap::::new(); + // Important to be a vec and to remain separate from slot_claims as it must + // remain ordered, unlike the hashmap + let mut slots = Vec::::new(); + let mut missing = Vec::<(&RecipeInput, u32)>::new(); + + for (input, mut needed) in self.inputs() { + let mut contains_any = false; + + for (inv_slot_id, slot) in inv.slots_with_id() { + if let Some(item) = slot + .as_ref() + .filter(|item| item.matches_recipe_input(&*input)) + { + let claim = slot_claims.entry(inv_slot_id).or_insert(0); + slots.push(inv_slot_id); + // FIXME: Fishy, looks like it can underflow before min which can trigger an + // overflow check. + let can_claim = (item.amount() - *claim).min(needed); + *claim += can_claim; + needed -= can_claim; + contains_any = true; + } + } + + if needed > 0 || !contains_any { + missing.push((input, needed)); + } + } + + if missing.is_empty() { + Ok(slots) + } else { + Err(missing) + } + } } pub enum SalvageError { @@ -108,7 +176,7 @@ impl RecipeBook { pub fn get_available(&self, inv: &Inventory) -> Vec<(String, Recipe)> { self.recipes .iter() - .filter(|(_, recipe)| inv.contains_ingredients(recipe).is_ok()) + .filter(|(_, recipe)| recipe.inventory_contains_ingredients(inv).is_ok()) .map(|(name, recipe)| (name.clone(), recipe.clone())) .collect() } diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index b2843f6322..d3b8c4c627 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -572,7 +572,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv let msm = state.ecs().read_resource::(); let crafted_items = match craft_event { - CraftEvent::Simple(recipe) => recipe_book + CraftEvent::Simple { recipe, slots } => recipe_book .get(&recipe) .filter(|r| { if let Some(needed_sprite) = r.craft_sprite { @@ -604,19 +604,13 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv } }) .and_then(|r| { - r.perform( + r.craft_simple( &mut inventory, + slots, &state.ecs().read_resource::(), &state.ecs().read_resource::(), ) .ok() - }) - .map(|(crafted_item, amount)| { - let mut crafted_items = Vec::with_capacity(amount as usize); - for _ in 0..amount { - crafted_items.push(crafted_item.duplicate(ability_map, &msm)); - } - crafted_items }), CraftEvent::Salvage(slot) => { recipe::try_salvage(&mut inventory, slot, ability_map, &msm).ok() diff --git a/voxygen/src/session/mod.rs b/voxygen/src/session/mod.rs index 4cdae8a24f..7d04cea671 100644 --- a/voxygen/src/session/mod.rs +++ b/voxygen/src/session/mod.rs @@ -1395,7 +1395,22 @@ impl PlayState for SessionState { recipe, craft_sprite, } => { - self.client.borrow_mut().craft_recipe(&recipe, craft_sprite); + let slots = { + let client = self.client.borrow(); + if let Some(recipe) = client.recipe_book().get(&recipe) { + client + .inventories() + .get(client.entity()) + .and_then(|inv| recipe.inventory_contains_ingredients(inv).ok()) + } else { + None + } + }; + if let Some(slots) = slots { + self.client + .borrow_mut() + .craft_recipe(&recipe, slots, craft_sprite); + } }, HudEvent::SalvageItem(slot) => { self.client.borrow_mut().salvage_item(slot); From b924ae9f547a386fbb460598748c9930be73eff7 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 6 Oct 2021 18:29:09 -0400 Subject: [PATCH 05/18] Added comments in areas that were lacking. --- common/src/comp/inventory/item/mod.rs | 6 +++--- common/src/recipe.rs | 11 +++++++++-- server/src/events/inventory_manip.rs | 18 ------------------ 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 53d3adde18..8a0ba0f5cf 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -804,14 +804,14 @@ impl Item { .any(|tag| matches!(tag, ItemTag::SalvageInto(_))) } - // Attempts to salvage an item, returning the salvaged items if salvageable, - // else the original item is not Theoretically supports returning multiple - // items, only returns one per tag in the item for now + // Attempts to salvage an item by consuming it, returns the salvaged items if + // salvageable, else the original item pub fn try_salvage(self) -> Result, Item> { if !self.is_salvageable() { return Err(self); } + // Creates one item for every salvage tag in the target item let salvaged_items: Vec<_> = self .item_def .tags diff --git a/common/src/recipe.rs b/common/src/recipe.rs index 2ceea34c11..a5398ff034 100644 --- a/common/src/recipe.rs +++ b/common/src/recipe.rs @@ -37,6 +37,11 @@ impl Recipe { let mut recipe_inputs = Vec::new(); let mut unsatisfied_requirements = Vec::new(); + // Checks each input against a slot in the inventory. If the slot contains an + // item that fulfills the need of the input, takes from the inventory up to the + // quantity needed for the crafting input. If the item either cannot be used, or + // there is insufficient quantity, adds input and number of materials needed to + // unsatisfied requirements. self.inputs .iter() .enumerate() @@ -65,10 +70,12 @@ impl Recipe { } }); + // If there are no unsatisfied requirements, create the items produced by the + // recipe in the necessary quantity, else insert the ingredients back into the + // inventory if unsatisfied_requirements.is_empty() { let (item_def, quantity) = &self.output; - let crafted_item = - Item::new_from_item_def(Arc::clone(item_def), &[], ability_map, msm); + let crafted_item = Item::new_from_item_def(Arc::clone(item_def), &[], ability_map, msm); let mut crafted_items = Vec::with_capacity(*quantity as usize); for _ in 0..*quantity { crafted_items.push(crafted_item.duplicate(ability_map, msm)); diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index d3b8c4c627..3fa3a07bb0 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -647,24 +647,6 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv comp::InventoryUpdate::new(comp::InventoryUpdateEvent::Craft), ); } - - // Drop the item if there wasn't enough space - // if let Some(Some((item, amount))) = craft_result { - // let ability_map = &state.ecs().read_resource::(); - // let msm = - // state.ecs().read_resource::(); - // for _ in 0..amount { - // dropped_items.push(( - // state - // .read_component_copied::(entity) - // .unwrap_or_default(), - // state - // .read_component_copied::(entity) - // .unwrap_or_default(), - // item.duplicate(ability_map, &msm), - // )); - // } - // } }, comp::InventoryManip::Sort => { inventory.sort(); From dc24801ca1872b873d924b75797cf53993b28191 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 7 Oct 2021 21:02:48 -0400 Subject: [PATCH 06/18] Inventory now highlights salvageable items when in salvage mode. --- voxygen/src/hud/bag.rs | 8 ++++++++ voxygen/src/hud/mod.rs | 4 ++++ voxygen/src/hud/trade.rs | 1 + 3 files changed, 13 insertions(+) diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index be66dcf485..4bcb2fd991 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -87,6 +87,7 @@ pub struct InventoryScroller<'a> { is_us: bool, inventory: &'a Inventory, bg_ids: &'a BackgroundIds, + show_salvage: bool, } impl<'a> InventoryScroller<'a> { @@ -109,6 +110,7 @@ impl<'a> InventoryScroller<'a> { is_us: bool, inventory: &'a Inventory, bg_ids: &'a BackgroundIds, + show_salvage: bool, ) -> Self { InventoryScroller { client, @@ -129,6 +131,7 @@ impl<'a> InventoryScroller<'a> { is_us, inventory, bg_ids, + show_salvage, } } @@ -358,6 +361,10 @@ impl<'a> InventoryScroller<'a> { slot_widget = slot_widget.with_background_color(Color::Rgba(1.0, 1.0, 1.0, 1.0)); } + if self.show_salvage && item.as_ref().map_or(false, |item| item.is_salvageable()) { + slot_widget = slot_widget.with_background_color(Color::Rgba(1.0, 1.0, 1.0, 1.0)); + } + if let Some(item) = item { let quality_col_img = match item.quality() { Quality::Low => self.imgs.inv_slot_grey, @@ -727,6 +734,7 @@ impl<'a> Widget for Bag<'a> { true, inventory, &state.bg_ids, + self.show.salvage, ) .set(state.ids.inventory_scroller, ui); diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index fbe61773be..0ba05f0f61 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -657,6 +657,7 @@ pub struct Show { prompt_dialog: Option, location_marker: Option>, map_marker: bool, + salvage: bool, } impl Show { fn bag(&mut self, open: bool) { @@ -1036,6 +1037,7 @@ impl Hud { prompt_dialog: None, location_marker: None, map_marker: false, + salvage: false, }, to_focus: None, //never_show: false, @@ -1077,6 +1079,8 @@ impl Hud { camera: &Camera, interactable: Option, ) -> Vec { + self.show.salvage = + self.show.crafting && matches!(self.show.crafting_tab, CraftingTab::Dismantle); span!(_guard, "update_layout", "Hud::update_layout"); let mut events = core::mem::take(&mut self.events); if global_state.settings.interface.map_show_voxel_map { diff --git a/voxygen/src/hud/trade.rs b/voxygen/src/hud/trade.rs index 51d5f3835f..8eaede4b0b 100644 --- a/voxygen/src/hud/trade.rs +++ b/voxygen/src/hud/trade.rs @@ -326,6 +326,7 @@ impl<'a> Trade<'a> { false, inventory, &state.bg_ids, + false, ) .set(state.ids.inventory_scroller, ui); } From c7b6c7c3b423d72f64552ca3c03bde6efe852ed3 Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Sun, 10 Oct 2021 22:27:41 +0200 Subject: [PATCH 07/18] bench --- assets/voxygen/i18n/en/hud/crafting.ron | 1 + assets/voxygen/item_image_manifest.ron | 4 ++++ .../salvaging_station/salvaging_station-0.vox | Bin 0 -> 5168 bytes assets/voxygen/voxel/sprite_manifest.ron | 11 +++++++++++ common/src/terrain/block.rs | 1 + common/src/terrain/sprite.rs | 3 +++ voxygen/src/hud/crafting.rs | 3 +++ voxygen/src/hud/mod.rs | 1 + voxygen/src/scene/terrain/watcher.rs | 4 ++++ .../site/settlement/building/archetype/house.rs | 3 ++- 10 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 assets/voxygen/voxel/sprite/salvaging_station/salvaging_station-0.vox diff --git a/assets/voxygen/i18n/en/hud/crafting.ron b/assets/voxygen/i18n/en/hud/crafting.ron index f702b1540f..5db166ea1f 100644 --- a/assets/voxygen/i18n/en/hud/crafting.ron +++ b/assets/voxygen/i18n/en/hud/crafting.ron @@ -18,6 +18,7 @@ "hud.crafting.loom": "Loom", "hud.crafting.spinning_wheel": "Spinning Wheel", "hud.crafting.tanning_rack": "Tanning Rack", + "hud.crafting.salvaging_station": "Salvaging Bench", // Tabs "hud.crafting.tabs.all": "All", "hud.crafting.tabs.armor": "Armor", diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index c372bdc3b9..57c18023ac 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -35,6 +35,10 @@ "voxel.object.tanning_rack", (0.0, 0.0, 0.0), (-90.0, 20.0, 0.0), 1.0, ), + Tool("SalvagingBench"): VoxTrans( + "voxel.sprite.salvaging_station.salvaging_station-0", + (0.0, 0.0, 0.0), (-90.0, 20.0, 0.0), 1.0, + ), // Weapons // Diary Example Images Tool("example_utility"): VoxTrans( diff --git a/assets/voxygen/voxel/sprite/salvaging_station/salvaging_station-0.vox b/assets/voxygen/voxel/sprite/salvaging_station/salvaging_station-0.vox new file mode 100644 index 0000000000000000000000000000000000000000..c2fa637b22d24a974e66513e57a6a3ec87262fb9 GIT binary patch literal 5168 zcmciFTdZA08Nl(GwdOvv)@-C)S`cahX^R4-NQliQX79AuU3vY?ol2?IOIKb&P$y4Q>e`iSR+Om*f5)Ky)Acv3S^3dagTGH&rF5&t z8uYCi)>e%xqsFvRW(<|~fVL{ERoE-BB^p>bcm(<*F%dHgI@*2Vc^J^v9nb98 zZ^ydi+UO09(W4#}+G;+B9%`q@tJ7oJ6Fo8LVGVj*N5&)LiFTqtYxb)rdQ@^`#x|qKA&?X$SI%M4ss@#E#e(o=uH54SQ)uEz!WjnP#I$AdieCWb%TJ{+@OvYTJxg zXxEHYXiwWWoH^}4j6~?vj5n#7=us2x%)Cr2&8R8O#XEqiG>Ln5?q$Ev3tXa{0!$C}tq^r+-I(GQ)8neozYY)U(7 zOFM2#%U)Xc(sG9FFqC#Ik|$y&7Gj6K@N8wG3>?gJ`H;@+&9Bs%+S*gv?F;!CNJp7`(k*XJlj~##d0o| zz1R)fTF%9?7b3K`V~w{HJu0~lmODm&WIWPN#6-;WXZnj}FP3*?c}JGLSoUH$7t3BO zcgwOD%emNLp|2zMg=a$>$6g%g;x<;IwvKagW7@f~#<__e)w!Yej(g+Ab#Uy3@koSD zMCeS+^cTl{ah!|eTpah@@jZ0x#qo|D_rdUh=h!S z4m~P#Lk(IOICum^BxDqH=ux3tKhdCtfrW!dKtw`DL5Ci-rPg@PjAt5ZVd3Br5Rs5k z(4l93rA}KvY%I@(frW!dKtw`DL5CjIdcMP+cS0=;EF3%nA`&tRI`pX2Y0q;#wJ@-7 z@Cb-V$SCO0qk3uswSig~SU7kDL?mPsbm&n7wUIqXYGGjE;1Lj!kWtW~M~$Al<@rsb z76uj$9sv;v83i4B)WmZ$wV7HNSU7kDL?mPsbm&ntwT1UvJl`kJ_sR1+Ls6OJYm4rLP#7j%YtRQd+gE6W--9BOPBv@kY|TR324n@Zr$SCO0(_e`L>Xl~=&py!l zaKsQToDYXR?cl@FNIN0ZF7$Ww_2iYl0re`dMqrJ=K8OZ3grhF726-Sx#u723prgM> zrGG%ZimVa&ERlW0aMZ+b*uv50X$NAYosh{3u_N}V7*MYgYou_vK??($!Vw2g9unt~ zI1gkL`aAl2VkHi!SD7_3`#_udEU<92Juzg?gFGRV7h*^38LPwr^{TK&2}c{Wg)=Rz zLGFkip>Q5ZjAhz|*r8`m#bBzw3lj}m7+5%X1Vkic6m;lOp;a6;Xknmq99eh-L?mPs zbm&o`8fu$(ux;X`C3mP$E&XkrY}5sWE4~=6Zzebd!1n%$;3U`#NEZj^%Vog zm5tne_6BR?Zb$SsE)R(0$x?%2t&6)G7Y8kji+in$dmOxr%K{?f ziFPIyV#mB5m3%AjE}o5oR1fK1Vkj}Wcmv_=JlwaHKp95Zky(T25y&Is zi9DlZ)?i+bNoicmzZwWR${ZVP22Q+`&|R7rFD)!;o8|gGWF_ zLPkM{9(Ag&=f1VyDTQ za*qIA=r8ockn4_iM;nIRxx(|x$on!1aDhCO4FQqdMcR=z;#8iPhifjqcq#w4|MYL+ z!iBPV^Je*AyOPVEeqBzRc2xd0ZJNCL>S~$#dw%79xnkA1a_dctWbCt8PTr>EOD`!2 zLnYl7CCAb}{y8P*ug-G$-2++k;IZ=PfzQkG%}TD`q2#s~l-&0=wO7xOQ`XLs(>KqR z3-&FMlh#d>S&z?FU|C^N#am^S2hr&byY$t3UjwzGokicV2s1_C0l@y!wkV z$vMl3#~vdyXU>#)b7si}XMa(?dfpt__VCH_!p~>PAAdJj-h1mTd5UN5dq&Bd2bKKg z_ewUcoh?spnJ=$Dzf3;<)3vhhv4K4P%W3kfx2MZ{a_ax(^I!GlGe7q9bq%XE2Tw~}|iqvW~Svt`blIda!&Bl*T%}wVz?$i@owNGv`A^N8TI+^u-;{NC ziQM8&;epYpcJJtWdZ5PSIcP{yK L{Im6+X{)~jn&Xc{ literal 0 HcmV?d00001 diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index 7672a1b9a5..c3807ec7ba 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -3216,6 +3216,17 @@ Loom: Some(( ], wind_sway: 0.0, )), +// SalvagingBench +SalvagingBench: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.salvaging_station.salvaging_station-0", + offset: (-8.5, -7.5, 0.0), + lod_axes: (0.0, 0.0, 0.0), + ), + ], + wind_sway: 0.0, +)), SpinningWheel: Some(( variations: [ ( diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index 8665c20ed2..302a24b815 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -261,6 +261,7 @@ impl Block { | SpriteKind::Forge | SpriteKind::Loom | SpriteKind::SpinningWheel + | SpriteKind::SalvagingBench | SpriteKind::TanningRack => None, SpriteKind::EnsnaringVines => Some(0.1), _ => Some(0.25), diff --git a/common/src/terrain/sprite.rs b/common/src/terrain/sprite.rs index f4b4269de4..bff6f3274a 100644 --- a/common/src/terrain/sprite.rs +++ b/common/src/terrain/sprite.rs @@ -182,6 +182,7 @@ make_case_elim!( CavernGrassBlueLong = 0x9B, CavernLillypadBlue = 0x9C, CavernMycelBlue = 0x9D, + SalvagingBench = 0x9E, } ); @@ -238,6 +239,7 @@ impl SpriteKind { SpriteKind::Loom => 1.27, SpriteKind::Anvil => 1.1, SpriteKind::CookingPot => 1.36, + SpriteKind::SalvagingBench => 1.18, // TODO: Find suitable heights. SpriteKind::BarrelCactus | SpriteKind::RoundCactus @@ -440,6 +442,7 @@ impl SpriteKind { | SpriteKind::SpinningWheel | SpriteKind::TanningRack | SpriteKind::Loom + | SpriteKind::SalvagingBench ) } } diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index 0d00119459..9d9e531f79 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -617,6 +617,7 @@ impl<'a> Widget for Crafting<'a> { Some(SpriteKind::Loom) => Some("Loom"), Some(SpriteKind::SpinningWheel) => Some("SpinningWheel"), Some(SpriteKind::TanningRack) => Some("TanningRack"), + Some(SpriteKind::SalvagingBench) => Some("SalvagingBench"), _ => None, }; @@ -792,6 +793,7 @@ impl<'a> Widget for Crafting<'a> { Some(SpriteKind::Loom) => "Loom", Some(SpriteKind::SpinningWheel) => "SpinningWheel", Some(SpriteKind::TanningRack) => "TanningRack", + Some(SpriteKind::SalvagingBench) => "SalvagingBench", None => "CraftsmanHammer", _ => "CraftsmanHammer", }; @@ -815,6 +817,7 @@ impl<'a> Widget for Crafting<'a> { Some(SpriteKind::Loom) => "hud.crafting.loom", Some(SpriteKind::SpinningWheel) => "hud.crafting.spinning_wheel", Some(SpriteKind::TanningRack) => "hud.crafting.tanning_rack", + Some(SpriteKind::SalvagingBench) => "hud.crafting.salvaging_station", _ => "", }; Text::new(self.localized_strings.get(station_name)) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 0ba05f0f61..4c7c2410fe 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -4078,6 +4078,7 @@ pub fn get_sprite_desc(sprite: SpriteKind, localized_strings: &Localization) -> SpriteKind::Loom => "hud.crafting.loom", SpriteKind::SpinningWheel => "hud.crafting.spinning_wheel", SpriteKind::TanningRack => "hud.crafting.tanning_rack", + SpriteKind::SalvagingBench => "hud.crafting.salvaging_station", sprite => return Some(Cow::Owned(format!("{:?}", sprite))), }; Some(Cow::Borrowed(localized_strings.get(i18n_key))) diff --git a/voxygen/src/scene/terrain/watcher.rs b/voxygen/src/scene/terrain/watcher.rs index bcf3a952ff..f05714656c 100644 --- a/voxygen/src/scene/terrain/watcher.rs +++ b/voxygen/src/scene/terrain/watcher.rs @@ -136,6 +136,10 @@ impl BlocksOfInterest { fires.push(pos); interactables.push((pos, Interaction::Craft(CraftingTab::Food))) }, + Some(SpriteKind::SalvagingBench) => { + fires.push(pos); + interactables.push((pos, Interaction::Craft(CraftingTab::Dismantle))) + }, _ => {}, }, } diff --git a/world/src/site/settlement/building/archetype/house.rs b/world/src/site/settlement/building/archetype/house.rs index fb9b1f15c6..c9437113c7 100644 --- a/world/src/site/settlement/building/archetype/house.rs +++ b/world/src/site/settlement/building/archetype/house.rs @@ -526,7 +526,7 @@ impl Archetype for House { center_offset.x, center_offset.y, z + 100, - )) % 12 + )) % 13 { 0..=1 => SpriteKind::Crate, 2 => SpriteKind::Bench, @@ -539,6 +539,7 @@ impl Archetype for House { 9 => SpriteKind::Loom, 10 => SpriteKind::SpinningWheel, 11 => SpriteKind::TanningRack, + 12 => SpriteKind::SalvagingBench, _ => unreachable!(), }; From 26dfd961a856797cd9330b99ff02b7212a0e629a Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 11 Oct 2021 17:24:14 -0400 Subject: [PATCH 08/18] Fixed item path of leather items under hide folder. --- common/src/comp/inventory/item/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 8a0ba0f5cf..eb6eec9cc6 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -199,10 +199,10 @@ impl Material { Material::Sunsilk => "common.items.crafting_ing.cloth.sunsilk", Material::Rawhide => "common.items.crafting_ing.leather.simple_leather", Material::Leather => "common.items.crafting_ing.leather.thick_leather", - Material::Scale => "common.items.crafting_ing.leather.scales", - Material::Carapace => "common.items.crafting_ing.leather.carapace", - Material::Plate => "common.items.crafting_ing.leather.plate", - Material::Dragonscale => "common.items.crafting_ing.leather.dragon_scale", + Material::Scale => "common.items.crafting_ing.hide.scales", + Material::Carapace => "common.items.crafting_ing.hide.carapace", + Material::Plate => "common.items.crafting_ing.hide.plate", + Material::Dragonscale => "common.items.crafting_ing.hide.dragon_scale", } } } From b4b6eeb0d1c75794ac87ba39c6da239468b53a76 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 11 Oct 2021 19:29:50 -0400 Subject: [PATCH 09/18] Added function that returns the output of salvaging an item when result just needs to be checked. --- common/src/comp/inventory/item/mod.rs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index eb6eec9cc6..19a38f3a00 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -804,16 +804,8 @@ impl Item { .any(|tag| matches!(tag, ItemTag::SalvageInto(_))) } - // Attempts to salvage an item by consuming it, returns the salvaged items if - // salvageable, else the original item - pub fn try_salvage(self) -> Result, Item> { - if !self.is_salvageable() { - return Err(self); - } - - // Creates one item for every salvage tag in the target item - let salvaged_items: Vec<_> = self - .item_def + pub fn salvage_output(&self) -> impl Iterator { + self.item_def .tags .iter() .filter_map(|tag| { @@ -824,6 +816,18 @@ impl Item { } }) .map(|material| material.asset_identifier()) + } + + // Attempts to salvage an item by consuming it, returns the salvaged items if + // salvageable, else the original item + pub fn try_salvage(self) -> Result, Item> { + if !self.is_salvageable() { + return Err(self); + } + + // Creates one item for every salvage tag in the target item + let salvaged_items: Vec<_> = self + .salvage_output() .map(|asset| Item::new_from_asset_expect(asset)) .collect(); From 67b19f54743ad11a3d1f856f47a9dfd6bcd78172 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 12 Oct 2021 19:47:14 -0400 Subject: [PATCH 10/18] Salvaging now requires a salvaging station. --- client/src/lib.rs | 4 ++-- server/src/events/inventory_manip.rs | 29 +++++++++++++++++++++++++++- voxygen/src/hud/mod.rs | 16 +++++++++------ voxygen/src/scene/terrain/watcher.rs | 5 ++--- voxygen/src/session/mod.rs | 4 ++-- 5 files changed, 44 insertions(+), 14 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 794ace1d55..5baf84d9f7 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1026,13 +1026,13 @@ impl Client { .map_or(false, |item| item.is_salvageable()) } - pub fn salvage_item(&mut self, slot: InvSlotId) -> bool { + pub fn salvage_item(&mut self, slot: InvSlotId, salvage_pos: Vec3) -> bool { let is_salvageable = self.can_salvage_item(slot); if is_salvageable { self.send_msg(ClientGeneral::ControlEvent(ControlEvent::InventoryEvent( InventoryEvent::CraftRecipe { craft_event: CraftEvent::Salvage(slot), - craft_sprite: None, + craft_sprite: Some(salvage_pos), }, ))); } diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index 3fa3a07bb0..19cb1ba87c 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -12,6 +12,7 @@ use common::{ }, consts::MAX_PICKUP_RANGE, recipe::{self, default_recipe_book}, + terrain::SpriteKind, trade::Trades, uid::Uid, util::find_dist::{self, FindDist}, @@ -613,7 +614,33 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv .ok() }), CraftEvent::Salvage(slot) => { - recipe::try_salvage(&mut inventory, slot, ability_map, &msm).ok() + let sprite = craft_sprite + .filter(|pos| { + let entity_cylinder = get_cylinder(state, entity); + if !within_pickup_range(entity_cylinder, || { + Some(find_dist::Cube { + min: pos.as_(), + side_length: 1.0, + }) + }) { + debug!( + ?entity_cylinder, + "Failed to craft recipe as not within range of required \ + sprite, sprite pos: {}", + pos + ); + false + } else { + true + } + }) + .and_then(|pos| state.terrain().get(pos).ok().copied()) + .and_then(|block| block.get_sprite()); + if matches!(sprite, Some(SpriteKind::SalvagingBench)) { + recipe::try_salvage(&mut inventory, slot, ability_map, &msm).ok() + } else { + None + } }, }; diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 4c7c2410fe..88370c2175 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -521,7 +521,10 @@ pub enum Event { recipe: String, craft_sprite: Option<(Vec3, SpriteKind)>, }, - SalvageItem(InvSlotId), + SalvageItem { + slot: InvSlotId, + salvage_pos: Vec3, + }, InviteMember(Uid), AcceptInvite, DeclineInvite, @@ -725,6 +728,7 @@ impl Show { self.selected_crafting_tab(tab); self.crafting(true); self.craft_sprite = self.craft_sprite.or(craft_sprite); + self.salvage = matches!(craft_sprite, Some((_, SpriteKind::SalvagingBench))); } fn diary(&mut self, open: bool) { @@ -1079,8 +1083,6 @@ impl Hud { camera: &Camera, interactable: Option, ) -> Vec { - self.show.salvage = - self.show.crafting && matches!(self.show.crafting_tab, CraftingTab::Dismantle); span!(_guard, "update_layout", "Hud::update_layout"); let mut events = core::mem::take(&mut self.events); if global_state.settings.interface.map_show_voxel_map { @@ -3334,11 +3336,13 @@ impl Hud { slot::Event::Used(from) => { // Item used (selected and then clicked again) if let Some(from) = to_slot(from) { - if self.show.crafting + if self.show.salvage && matches!(self.show.crafting_tab, CraftingTab::Dismantle) { - if let Slot::Inventory(slot) = from { - events.push(Event::SalvageItem(slot)) + if let (Slot::Inventory(slot), Some((salvage_pos, _sprite_kind))) = + (from, self.show.craft_sprite) + { + events.push(Event::SalvageItem { slot, salvage_pos }) } } else { events.push(Event::UseSlot { diff --git a/voxygen/src/scene/terrain/watcher.rs b/voxygen/src/scene/terrain/watcher.rs index f05714656c..e801d0feff 100644 --- a/voxygen/src/scene/terrain/watcher.rs +++ b/voxygen/src/scene/terrain/watcher.rs @@ -114,9 +114,8 @@ impl BlocksOfInterest { Some(SpriteKind::SmokeDummy) => { smokers.push(pos); }, - Some(SpriteKind::Forge) => { - interactables.push((pos, Interaction::Craft(CraftingTab::Dismantle))) - }, + Some(SpriteKind::Forge) => interactables + .push((pos, Interaction::Craft(CraftingTab::ProcessedMaterial))), Some(SpriteKind::TanningRack) => interactables .push((pos, Interaction::Craft(CraftingTab::ProcessedMaterial))), Some(SpriteKind::SpinningWheel) => { diff --git a/voxygen/src/session/mod.rs b/voxygen/src/session/mod.rs index 7d04cea671..b891446e8d 100644 --- a/voxygen/src/session/mod.rs +++ b/voxygen/src/session/mod.rs @@ -1412,8 +1412,8 @@ impl PlayState for SessionState { .craft_recipe(&recipe, slots, craft_sprite); } }, - HudEvent::SalvageItem(slot) => { - self.client.borrow_mut().salvage_item(slot); + HudEvent::SalvageItem { slot, salvage_pos } => { + self.client.borrow_mut().salvage_item(slot, salvage_pos); }, HudEvent::InviteMember(uid) => { self.client.borrow_mut().send_invite(uid, InviteKind::Group); From 154dec2b4f9ab20558a4c6fe269c2cb290065e7d Mon Sep 17 00:00:00 2001 From: Snowram Date: Thu, 14 Oct 2021 02:00:45 +0200 Subject: [PATCH 11/18] Make item tooltip accept multiple items for salvage --- voxygen/src/hud/bag.rs | 18 +++- voxygen/src/hud/crafting.rs | 10 ++- voxygen/src/hud/loot_scroller.rs | 7 +- voxygen/src/hud/skillbar.rs | 2 +- voxygen/src/hud/trade.rs | 2 +- voxygen/src/ui/mod.rs | 1 - voxygen/src/ui/widgets/item_tooltip.rs | 118 +++++++++++++------------ 7 files changed, 92 insertions(+), 66 deletions(-) diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 4bcb2fd991..0cf96acc5a 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -21,7 +21,7 @@ use common::{ combat::{combat_rating, Damage}, comp::{ inventory::InventorySortOrder, - item::{ItemDef, MaterialStatManifest, Quality}, + item::{Item, ItemDef, ItemDesc, MaterialStatManifest, Quality}, Body, Energy, Health, Inventory, Poise, SkillSet, Stats, }, }; @@ -383,6 +383,20 @@ impl<'a> InventoryScroller<'a> { .as_ref() .and_then(|(_, _, prices)| prices.clone()); + let salvage_result: Vec = item + .salvage_output() + .map(|asset| Item::new_from_asset_expect(asset)) + .collect(); + + let item: Vec<&dyn ItemDesc> = if self.show_salvage { + salvage_result + .iter() + .map(|item| item as &dyn ItemDesc) + .collect() + } else { + vec![item] + }; + slot_widget .filled_slot(quality_col_img) .with_item_tooltip( @@ -851,7 +865,7 @@ impl<'a> Widget for Bag<'a> { if let Some(item) = inventory.equipped($slot) { let manager = &mut *self.item_tooltip_manager; $slot_maker - .with_item_tooltip(manager, item, &None, &item_tooltip) + .with_item_tooltip(manager, vec![item], &None, &item_tooltip) .set($slot_id, ui) } else { let manager = &mut *self.tooltip_manager; diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index 9d9e531f79..0ae79ca579 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -724,7 +724,7 @@ impl<'a> Widget for Crafting<'a> { .middle_of(state.ids.output_img_frame) .with_item_tooltip( self.item_tooltip_manager, - &*recipe.output.0, + vec![&*recipe.output.0], &None, &item_tooltip, ) @@ -953,7 +953,7 @@ impl<'a> Widget for Crafting<'a> { .w_h(22.0, 22.0) .middle_of(state.ids.ingredient_frame[i]) .hover_image(self.imgs.wpn_icon_border_mo) - .with_item_tooltip(self.item_tooltip_manager, &*item_def, &None, &item_tooltip) + .with_item_tooltip(self.item_tooltip_manager, vec![&*item_def], &None, &item_tooltip) .set(state.ids.ingredient_btn[i], ui) .was_clicked() { @@ -968,6 +968,12 @@ impl<'a> Widget for Crafting<'a> { .middle_of(state.ids.ingredient_btn[i]) .w_h(20.0, 20.0) .graphics_for(state.ids.ingredient_btn[i]) + .with_item_tooltip( + self.item_tooltip_manager, + vec![&*item_def], + &None, + &item_tooltip, + ) .set(state.ids.ingredient_img[i], ui); // Ingredients text and amount diff --git a/voxygen/src/hud/loot_scroller.rs b/voxygen/src/hud/loot_scroller.rs index 53e88d6820..4654c56193 100644 --- a/voxygen/src/hud/loot_scroller.rs +++ b/voxygen/src/hud/loot_scroller.rs @@ -333,7 +333,12 @@ impl<'a> Widget for LootScroller<'a> { .color(Some(shade_color(color::hsla(0.0, 0.0, 1.0, 1.0)))) .w_h(ICON_SIZE, ICON_SIZE) .middle_of(state.ids.message_icon_bgs[i]) - .with_item_tooltip(self.item_tooltip_manager, &**item, &None, &item_tooltip) + .with_item_tooltip( + self.item_tooltip_manager, + vec![&**item], + &None, + &item_tooltip, + ) .set(state.ids.message_icons[i], ui); let label = if *amount == 1 { diff --git a/voxygen/src/hud/skillbar.rs b/voxygen/src/hud/skillbar.rs index 71362c9b51..5183d036bf 100644 --- a/voxygen/src/hud/skillbar.rs +++ b/voxygen/src/hud/skillbar.rs @@ -645,7 +645,7 @@ impl<'a> Skillbar<'a> { .position(entry.position); // if there is an item attached, show item tooltip if let Some(item) = slot_content(entry.slot) { - slot.with_item_tooltip(self.item_tooltip_manager, item, &None, &item_tooltip) + slot.with_item_tooltip(self.item_tooltip_manager, vec![item], &None, &item_tooltip) .set(entry.widget_id, ui); // if we can gather some text to display, show it } else if let Some((title, desc)) = tooltip_text(entry.slot) { diff --git a/voxygen/src/hud/trade.rs b/voxygen/src/hud/trade.rs index 8eaede4b0b..e4b1f1b89a 100644 --- a/voxygen/src/hud/trade.rs +++ b/voxygen/src/hud/trade.rs @@ -393,7 +393,7 @@ impl<'a> Trade<'a> { slot_widget .filled_slot(quality_col_img) - .with_item_tooltip(self.item_tooltip_manager, item, prices, &item_tooltip) + .with_item_tooltip(self.item_tooltip_manager, vec![item], prices, &item_tooltip) .set(slot_id, ui); } else { slot_widget.set(slot_id, ui); diff --git a/voxygen/src/ui/mod.rs b/voxygen/src/ui/mod.rs index 83b04859e0..ce29fa2cc9 100644 --- a/voxygen/src/ui/mod.rs +++ b/voxygen/src/ui/mod.rs @@ -157,7 +157,6 @@ impl Ui { ui.set_num_redraw_frames(1); let item_tooltip_manager = ItemTooltipManager::new( - ui.widget_id_generator(), Duration::from_millis(1), Duration::from_millis(0), scale.scale_factor_logical(), diff --git a/voxygen/src/ui/widgets/item_tooltip.rs b/voxygen/src/ui/widgets/item_tooltip.rs index 3992212248..a6afc65f7d 100644 --- a/voxygen/src/ui/widgets/item_tooltip.rs +++ b/voxygen/src/ui/widgets/item_tooltip.rs @@ -40,7 +40,6 @@ enum HoverState { const MOUSE_PAD_Y: f64 = 15.0; pub struct ItemTooltipManager { - tooltip_id: widget::Id, state: HoverState, // How long before a tooltip is displayed when hovering hover_dur: Duration, @@ -51,14 +50,8 @@ pub struct ItemTooltipManager { } impl ItemTooltipManager { - pub fn new( - mut generator: widget::id::Generator, - hover_dur: Duration, - fade_dur: Duration, - logical_scale_factor: f64, - ) -> Self { + pub fn new(hover_dur: Duration, fade_dur: Duration, logical_scale_factor: f64) -> Self { Self { - tooltip_id: generator.next(), state: HoverState::None, hover_dur, fade_dur, @@ -115,63 +108,72 @@ impl ItemTooltipManager { fn set_tooltip( &mut self, tooltip: &ItemTooltip, - item: &dyn ItemDesc, + items: Vec<&dyn ItemDesc>, prices: &Option, img_id: Option, image_dims: Option<(f64, f64)>, src_id: widget::Id, ui: &mut UiCell, ) { - let tooltip_id = self.tooltip_id; + let mut y_offset = 0.0; let mp_h = MOUSE_PAD_Y / self.logical_scale_factor; + for item in items { + let tooltip_id = ui.widget_id_generator().next(); - let tooltip = |transparency, mouse_pos: [f64; 2], ui: &mut UiCell| { - // Fill in text and the potential image beforehand to get an accurate size for - // spacing - let tooltip = tooltip - .clone() - .item(item) - .prices(prices) - .image(img_id) - .image_dims(image_dims); + let mut tooltip = |transparency, mouse_pos: [f64; 2], ui: &mut UiCell| { + // Fill in text and the potential image beforehand to get an accurate size for + // spacing + let tooltip = tooltip + .clone() + .item(item) + .prices(prices) + .image(img_id) + .image_dims(image_dims); - let [t_w, t_h] = tooltip.get_wh(ui).unwrap_or([0.0, 0.0]); - let [m_x, m_y] = [mouse_pos[0], mouse_pos[1]]; - let (w_w, w_h) = (ui.win_w, ui.win_h); + let [t_w, t_h] = tooltip.get_wh(ui).unwrap_or([0.0, 0.0]); + let [m_x, m_y] = [mouse_pos[0], mouse_pos[1]]; + let (w_w, w_h) = (ui.win_w, ui.win_h); - // Determine position based on size and mouse position - // Flow to the top left of the mouse when there is space - let x = if (m_x + w_w / 2.0) > t_w { - m_x - t_w / 2.0 - } else { - m_x + t_w / 2.0 + // Determine position based on size and mouse position + // Flow to the top left of the mouse when there is space + let x = if (m_x + w_w / 2.0) > t_w { + m_x - t_w / 2.0 + } else { + m_x + t_w / 2.0 + }; + let y = if w_h - (m_y + w_h / 2.0) > t_h + mp_h { + m_y + mp_h + t_h / 2.0 + } else { + m_y - mp_h - t_h / 2.0 + }; + tooltip + .floating(true) + .transparency(transparency) + .x_y(x, y + y_offset) + .set(tooltip_id, ui); + + // Increase the offset to stack the next tooltip on top of the previous one + y_offset += t_h + 5.0; }; - let y = if w_h - (m_y + w_h / 2.0) > t_h + mp_h { - m_y + mp_h + t_h / 2.0 - } else { - m_y - mp_h - t_h / 2.0 - }; - tooltip - .floating(true) - .transparency(transparency) - .x_y(x, y) - .set(tooltip_id, ui); - }; - match self.state { - HoverState::Hovering(Hover(id, xy)) if id == src_id => tooltip(1.0, xy, ui), - HoverState::Fading(start, Hover(id, xy), _) if id == src_id => tooltip( - (0.1f32 - start.elapsed().as_millis() as f32 / self.hover_dur.as_millis() as f32) - .max(0.0), - xy, - ui, - ), - HoverState::Start(start, id) if id == src_id && start.elapsed() > self.hover_dur => { - let xy = ui.global_input().current.mouse.xy; - self.state = HoverState::Hovering(Hover(id, xy)); - tooltip(1.0, xy, ui); - }, - _ => (), + match self.state { + HoverState::Hovering(Hover(id, xy)) if id == src_id => tooltip(1.0, xy, ui), + HoverState::Fading(start, Hover(id, xy), _) if id == src_id => tooltip( + (0.1f32 + - start.elapsed().as_millis() as f32 / self.hover_dur.as_millis() as f32) + .max(0.0), + xy, + ui, + ), + HoverState::Start(start, id) + if id == src_id && start.elapsed() > self.hover_dur => + { + let xy = ui.global_input().current.mouse.xy; + self.state = HoverState::Hovering(Hover(id, xy)); + tooltip(1.0, xy, ui); + } + _ => (), + } } } } @@ -180,7 +182,7 @@ pub struct ItemTooltipped<'a, W> { inner: W, tooltip_manager: &'a mut ItemTooltipManager, - item: &'a dyn ItemDesc, + items: Vec<&'a dyn ItemDesc>, prices: &'a Option, img_id: Option, image_dims: Option<(f64, f64)>, @@ -201,7 +203,7 @@ impl<'a, W: Widget> ItemTooltipped<'a, W> { let event = self.inner.set(id, ui); self.tooltip_manager.set_tooltip( self.tooltip, - self.item, + self.items, self.prices, self.img_id, self.image_dims, @@ -218,7 +220,7 @@ pub trait ItemTooltipable { self, tooltip_manager: &'a mut ItemTooltipManager, - item: &'a dyn ItemDesc, + items: Vec<&'a dyn ItemDesc>, prices: &'a Option, @@ -231,14 +233,14 @@ impl ItemTooltipable for W { fn with_item_tooltip<'a>( self, tooltip_manager: &'a mut ItemTooltipManager, - item: &'a dyn ItemDesc, + items: Vec<&'a dyn ItemDesc>, prices: &'a Option, tooltip: &'a ItemTooltip<'a>, ) -> ItemTooltipped<'a, W> { ItemTooltipped { inner: self, tooltip_manager, - item, + items, prices, img_id: None, image_dims: None, From 430c34b46234b6d175c5a803fde2b2db64c92dae Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 13 Oct 2021 22:54:59 -0400 Subject: [PATCH 12/18] Changed tooltips to take iterator. Tooltips also show original item as well as salvage output. --- voxygen/src/hud/bag.rs | 62 ++++++++++++++++---------- voxygen/src/hud/crafting.rs | 4 +- voxygen/src/hud/loot_scroller.rs | 4 +- voxygen/src/hud/mod.rs | 3 +- voxygen/src/hud/skillbar.rs | 11 +++-- voxygen/src/hud/trade.rs | 9 +++- voxygen/src/ui/widgets/item_tooltip.rs | 43 +++++++++++------- 7 files changed, 86 insertions(+), 50 deletions(-) diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 0cf96acc5a..9b52b62dca 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -21,7 +21,7 @@ use common::{ combat::{combat_rating, Damage}, comp::{ inventory::InventorySortOrder, - item::{Item, ItemDef, ItemDesc, MaterialStatManifest, Quality}, + item::{ItemDef, ItemDesc, MaterialStatManifest, Quality}, Body, Energy, Health, Inventory, Poise, SkillSet, Stats, }, }; @@ -34,7 +34,7 @@ use i18n::Localization; use crate::hud::slots::SlotKind; use specs::Entity as EcsEntity; -use std::sync::Arc; +use std::{borrow::Borrow, sync::Arc}; use vek::Vec2; widget_ids! { @@ -383,29 +383,40 @@ impl<'a> InventoryScroller<'a> { .as_ref() .and_then(|(_, _, prices)| prices.clone()); - let salvage_result: Vec = item - .salvage_output() - .map(|asset| Item::new_from_asset_expect(asset)) - .collect(); + if self.show_salvage && item.is_salvageable() { + let salvage_result: Vec<_> = item + .salvage_output() + .map(|asset| Arc::::load_expect_cloned(asset)) + .map(|item| item as Arc) + .collect(); - let item: Vec<&dyn ItemDesc> = if self.show_salvage { - salvage_result + // let items = core::iter::once(item as &dyn ItemDesc) + // .chain(salvage_result.iter().map(|item| item.borrow())); + let items = salvage_result .iter() - .map(|item| item as &dyn ItemDesc) - .collect() - } else { - vec![item] - }; + .map(|item| item.borrow()) + .chain(core::iter::once(item as &dyn ItemDesc)); - slot_widget - .filled_slot(quality_col_img) - .with_item_tooltip( - self.item_tooltip_manager, - item, - &prices_info, - self.item_tooltip, - ) - .set(state.ids.inv_slots[i], ui); + slot_widget + .filled_slot(quality_col_img) + .with_item_tooltip( + self.item_tooltip_manager, + items, + &prices_info, + self.item_tooltip, + ) + .set(state.ids.inv_slots[i], ui); + } else { + slot_widget + .filled_slot(quality_col_img) + .with_item_tooltip( + self.item_tooltip_manager, + core::iter::once(item as &dyn ItemDesc), + &prices_info, + self.item_tooltip, + ) + .set(state.ids.inv_slots[i], ui); + } } else { slot_widget.set(state.ids.inv_slots[i], ui); } @@ -865,7 +876,12 @@ impl<'a> Widget for Bag<'a> { if let Some(item) = inventory.equipped($slot) { let manager = &mut *self.item_tooltip_manager; $slot_maker - .with_item_tooltip(manager, vec![item], &None, &item_tooltip) + .with_item_tooltip( + manager, + core::iter::once(item as &dyn ItemDesc), + &None, + &item_tooltip, + ) .set($slot_id, ui) } else { let manager = &mut *self.tooltip_manager; diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index 0ae79ca579..962c8f0427 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -724,7 +724,7 @@ impl<'a> Widget for Crafting<'a> { .middle_of(state.ids.output_img_frame) .with_item_tooltip( self.item_tooltip_manager, - vec![&*recipe.output.0], + core::iter::once(&*recipe.output.0 as &dyn ItemDesc), &None, &item_tooltip, ) @@ -970,7 +970,7 @@ impl<'a> Widget for Crafting<'a> { .graphics_for(state.ids.ingredient_btn[i]) .with_item_tooltip( self.item_tooltip_manager, - vec![&*item_def], + core::iter::once(&*item_def as &dyn ItemDesc), &None, &item_tooltip, ) diff --git a/voxygen/src/hud/loot_scroller.rs b/voxygen/src/hud/loot_scroller.rs index 4654c56193..75eb63b9a3 100644 --- a/voxygen/src/hud/loot_scroller.rs +++ b/voxygen/src/hud/loot_scroller.rs @@ -6,7 +6,7 @@ use super::{ }; use crate::ui::{fonts::Fonts, ImageFrame, ItemTooltip, ItemTooltipManager, ItemTooltipable}; use client::Client; -use common::comp::inventory::item::{ItemDef, MaterialStatManifest, Quality}; +use common::comp::inventory::item::{ItemDef, ItemDesc, MaterialStatManifest, Quality}; use conrod_core::{ color, position::Dimension, @@ -335,7 +335,7 @@ impl<'a> Widget for LootScroller<'a> { .middle_of(state.ids.message_icon_bgs[i]) .with_item_tooltip( self.item_tooltip_manager, - vec![&**item], + core::iter::once(&**item as &dyn ItemDesc), &None, &item_tooltip, ) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 88370c2175..2d27a2457c 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -728,7 +728,8 @@ impl Show { self.selected_crafting_tab(tab); self.crafting(true); self.craft_sprite = self.craft_sprite.or(craft_sprite); - self.salvage = matches!(craft_sprite, Some((_, SpriteKind::SalvagingBench))); + self.salvage = matches!(self.craft_sprite, Some((_, SpriteKind::SalvagingBench))) + && matches!(tab, CraftingTab::Dismantle); } fn diary(&mut self, open: bool) { diff --git a/voxygen/src/hud/skillbar.rs b/voxygen/src/hud/skillbar.rs index 5183d036bf..93157d3aa6 100644 --- a/voxygen/src/hud/skillbar.rs +++ b/voxygen/src/hud/skillbar.rs @@ -24,7 +24,7 @@ use common::comp::{ inventory::slot::EquipSlot, item::{ tool::{Tool, ToolKind}, - Hands, Item, ItemKind, MaterialStatManifest, + Hands, Item, ItemDesc, ItemKind, MaterialStatManifest, }, Energy, Health, Inventory, SkillSet, }; @@ -645,8 +645,13 @@ impl<'a> Skillbar<'a> { .position(entry.position); // if there is an item attached, show item tooltip if let Some(item) = slot_content(entry.slot) { - slot.with_item_tooltip(self.item_tooltip_manager, vec![item], &None, &item_tooltip) - .set(entry.widget_id, ui); + slot.with_item_tooltip( + self.item_tooltip_manager, + core::iter::once(item as &dyn ItemDesc), + &None, + &item_tooltip, + ) + .set(entry.widget_id, ui); // if we can gather some text to display, show it } else if let Some((title, desc)) = tooltip_text(entry.slot) { slot.with_tooltip(self.tooltip_manager, title, desc, &tooltip, TEXT_COLOR) diff --git a/voxygen/src/hud/trade.rs b/voxygen/src/hud/trade.rs index e4b1f1b89a..30db6aa617 100644 --- a/voxygen/src/hud/trade.rs +++ b/voxygen/src/hud/trade.rs @@ -10,7 +10,7 @@ use vek::*; use client::Client; use common::{ comp::{ - inventory::item::{MaterialStatManifest, Quality}, + inventory::item::{ItemDesc, MaterialStatManifest, Quality}, Inventory, Stats, }, trade::{PendingTrade, SitePrices, TradeAction, TradePhase}, @@ -393,7 +393,12 @@ impl<'a> Trade<'a> { slot_widget .filled_slot(quality_col_img) - .with_item_tooltip(self.item_tooltip_manager, vec![item], prices, &item_tooltip) + .with_item_tooltip( + self.item_tooltip_manager, + core::iter::once(item as &dyn ItemDesc), + prices, + &item_tooltip, + ) .set(slot_id, ui); } else { slot_widget.set(slot_id, ui); diff --git a/voxygen/src/ui/widgets/item_tooltip.rs b/voxygen/src/ui/widgets/item_tooltip.rs index a6afc65f7d..b2e7890f9d 100644 --- a/voxygen/src/ui/widgets/item_tooltip.rs +++ b/voxygen/src/ui/widgets/item_tooltip.rs @@ -24,7 +24,10 @@ use conrod_core::{ }; use i18n::Localization; use lazy_static::lazy_static; -use std::time::{Duration, Instant}; +use std::{ + borrow::Borrow, + time::{Duration, Instant}, +}; #[derive(Copy, Clone)] struct Hover(widget::Id, [f64; 2]); @@ -105,16 +108,18 @@ impl ItemTooltipManager { } #[allow(clippy::too_many_arguments)] // TODO: Pending review in #587 - fn set_tooltip( + fn set_tooltip<'a, I>( &mut self, - tooltip: &ItemTooltip, - items: Vec<&dyn ItemDesc>, - prices: &Option, + tooltip: &'a ItemTooltip, + items: impl Iterator, + prices: &'a Option, img_id: Option, image_dims: Option<(f64, f64)>, src_id: widget::Id, ui: &mut UiCell, - ) { + ) where + I: Borrow, + { let mut y_offset = 0.0; let mp_h = MOUSE_PAD_Y / self.logical_scale_factor; for item in items { @@ -125,7 +130,7 @@ impl ItemTooltipManager { // spacing let tooltip = tooltip .clone() - .item(item) + .item(item.borrow()) .prices(prices) .image(img_id) .image_dims(image_dims); @@ -178,17 +183,18 @@ impl ItemTooltipManager { } } -pub struct ItemTooltipped<'a, W> { +pub struct ItemTooltipped<'a, W, I> { inner: W, tooltip_manager: &'a mut ItemTooltipManager, - items: Vec<&'a dyn ItemDesc>, + items: I, prices: &'a Option, img_id: Option, image_dims: Option<(f64, f64)>, tooltip: &'a ItemTooltip<'a>, } -impl<'a, W: Widget> ItemTooltipped<'a, W> { + +impl<'a, W: Widget, I: Iterator> ItemTooltipped<'a, W, I> { pub fn tooltip_image(mut self, img_id: image::Id) -> Self { self.img_id = Some(img_id); self @@ -199,7 +205,10 @@ impl<'a, W: Widget> ItemTooltipped<'a, W> { self } - pub fn set(self, id: widget::Id, ui: &mut UiCell) -> W::Event { + pub fn set(self, id: widget::Id, ui: &mut UiCell) -> W::Event + where + ::Item: Borrow, + { let event = self.inner.set(id, ui); self.tooltip_manager.set_tooltip( self.tooltip, @@ -216,27 +225,27 @@ impl<'a, W: Widget> ItemTooltipped<'a, W> { pub trait ItemTooltipable { // If `Tooltip` is expensive to construct accept a closure here instead. - fn with_item_tooltip<'a>( + fn with_item_tooltip<'a, I>( self, tooltip_manager: &'a mut ItemTooltipManager, - items: Vec<&'a dyn ItemDesc>, + items: I, prices: &'a Option, tooltip: &'a ItemTooltip<'a>, - ) -> ItemTooltipped<'a, Self> + ) -> ItemTooltipped<'a, Self, I> where Self: std::marker::Sized; } impl ItemTooltipable for W { - fn with_item_tooltip<'a>( + fn with_item_tooltip<'a, I>( self, tooltip_manager: &'a mut ItemTooltipManager, - items: Vec<&'a dyn ItemDesc>, + items: I, prices: &'a Option, tooltip: &'a ItemTooltip<'a>, - ) -> ItemTooltipped<'a, W> { + ) -> ItemTooltipped<'a, W, I> { ItemTooltipped { inner: self, tooltip_manager, From a8718d50c94fc024c893a6f592a205f71bb94b99 Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Mon, 18 Oct 2021 22:18:40 +0200 Subject: [PATCH 13/18] crafting station model, explanatory text part 1 --- assets/voxygen/item_image_manifest.ron | 2 +- .../salvaging_station/salvaging_station-0.vox | Bin 5168 -> 3864 bytes assets/voxygen/voxel/sprite_manifest.ron | 2 +- voxygen/src/hud/crafting.rs | 141 +++++++++++------- 4 files changed, 90 insertions(+), 55 deletions(-) diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 57c18023ac..eb92ff183c 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -37,7 +37,7 @@ ), Tool("SalvagingBench"): VoxTrans( "voxel.sprite.salvaging_station.salvaging_station-0", - (0.0, 0.0, 0.0), (-90.0, 20.0, 0.0), 1.0, + (0.0, 0.0, 0.0), (-50.0, 40.0, 30.0), 0.9, ), // Weapons // Diary Example Images diff --git a/assets/voxygen/voxel/sprite/salvaging_station/salvaging_station-0.vox b/assets/voxygen/voxel/sprite/salvaging_station/salvaging_station-0.vox index c2fa637b22d24a974e66513e57a6a3ec87262fb9..f572a73b750c798bb04bee56d1317ed09d9aa2d1 100644 GIT binary patch literal 3864 zcmchZTdZA08OLX>HTRjd&p}FQ3zk|ydQqShdr2#v_Vmz}TA)-bR6rzv)IuzQLOu)KZ2pYmg(l${Ou^~uE2qBdi6GI3Z!;23**h_r*{LR4!#Teh*$v^*D zbNS|*@4B~Kb?uyeN~w*j)?W!JJ)+d+^;;)$`QXdQT2_tod+)1&VtJL88v9EzoWMPg!87ez&q19P+32yvOm>0f4t8Aq-D;4Ci~-! zkBsfma)&Rh?7&;rVFz2#xG-7+!&qC}H3n$Q9@np!S1vrGVtA%$n6J^5J&`>|`@Ut5 zcHD16zsj+zTYs_vwGE?9K|(gDfJ)(DL~cY*4B=pCV;76Onz!_P7mU4JGp@Zq?wnoI zBsX-{uBi)qx27r_+%UjCxUPwA7<1^w#Jd?+ATf5{uF1)tY-8*i_Sc{)=UCU3@9Wyn zFjcV|>z;K`fmHim%emx3FK{;I)DJ0jUWYECt7$mf_!(LQ{83e*!+F>bJz_Xe!x{M% z?4#>qN`1$jruO}e?3(?7{jCoN8^#*=$PKD*9k-b<`Cwd)f5>l!(51-Gzo z+0(M8@gq&;1~#Ej3ae|zE%&;d`wD$h8xH1-U)kqkSRK6YA~tB7(6z)zsO%tMdso?Y zin&aTD(q>I?UAF(8;ZO(uTt1NbAJQ7L_Vb0CBCEfBW*cHTxds}dF;bo22_!_;_X!+ z&On3D8hq7YdmsEAF8Grb`qk(ei{059gFn$AD+PZl)OMZW9R}TeZPyxd(7`n_ytNYs zT|K(z7<$f_p*My&CGXm>TBD~XK6D$Nu_25bWNTtLqhG||8X20L2p&6O6OUaJZ^_#C zVjB+VoVpx%6Yq3w$t~hC=S~r47W-DjT3zf96t>jZQI{AdR&387H{^`Qj}}`+{OHl$ zk~fx|(Y#&9BHN$R*`Ltlq~#8cj<)qD4BwiV)d}6n1)UieKa*#+RfjBSs#UN~S<<{KSS?pyD%N2X4Nacj_tyfg_t8qNUQn4vLt!s=pU z@*dRO(~wu1TB6C#8sFN8J@BE8=&LyktmZ8Cw~f8r0NvQN6?SZ}X+>_<*w|p}y5u^x zx5ZcZ%m9lI4gNIv))s#QO$^k;LNgT?*oXTJ_EW@MgRG|1m#G?~`j$8~#H*#oRIFQM zX=1#Yy32PJ^}~=miu+Q{qN7d$hwnT-bokQaQ%^6*%(wK5mVOb+ z96ooYCKCgm7>_9FIk#9^9Zatp=^U2b>>u^O?ZhaGc?aW3Dy-(d?+d?(^R68i~c;Hh^3y9aXF zlOws#`nM zFTD(I3YR(1q-q#JlWMqz8@PcrtYHHi*ur)g%6}Q)eE@D?U^B&j;JqIh=LQ~F(+sU{ zh7NXxb;Y=14!};=eAj$~!c8@Bz-VBqfrmY8E%ODMx&oYm3oK(`7<*t?^T06Y%X|X^ z2W;Vy*tfuqBpBp&;0k(ql^dZJ!?y4UbHKN`Pc-%oY^J!(wFA?GfobWT!1Q2XN9c*b zwsDmMwoPzCrf1$$`}wZ`0y&|z;mH&YgBj{x)rz z96h>G%I}5shvmu*7t1$qSRs?$206TYy86=`!=CIWp&-g))Et za#0gT)b=Q9_$j&R@PjhCQOTKiDmiTe(@}kD?TH8m69Xi_uwx;-cs`S zUn@EOl9G>xO8$x+K72sQpT4K$y>BVmI;Lc>MaiC9lngs1chYnIEF1=D5QrDw@wYtNTMH(n$YD;LRCmoJyCSFe)o zH(e<^@7gMR9^5X6o_k1+z4o*mdg^*P`qOVqN=as%ewxggGe;K9pDRl){H%;Gzex5x zaJIbolezMTHy6lzZ!eUmxbx7nO5XaFl0W}W$~?ro1QT{9oRG_2(~`djD-J7yrlm7cX8cKU}(BE?P8{6}#`3nY(7n8wZrU`*kJH z&zmRn=g*hh&+X*P>s}GHYp0yC;|w|S1iqS3a?dPcXZCEl_x!zb*^0;ImPa3w88@CO zZ@+ZD9N9Wk9>-Rnw13%GWL>xUE!lCq$lXsoC%XliQX79AuU3vY?ol2?IOIKb&P$y4Q>e`iSR+Om*f5)Ky)Acv3S^3dagTGH&rF5&t z8uYCi)>e%xqsFvRW(<|~fVL{ERoE-BB^p>bcm(<*F%dHgI@*2Vc^J^v9nb98 zZ^ydi+UO09(W4#}+G;+B9%`q@tJ7oJ6Fo8LVGVj*N5&)LiFTqtYxb)rdQ@^`#x|qKA&?X$SI%M4ss@#E#e(o=uH54SQ)uEz!WjnP#I$AdieCWb%TJ{+@OvYTJxg zXxEHYXiwWWoH^}4j6~?vj5n#7=us2x%)Cr2&8R8O#XEqiG>Ln5?q$Ev3tXa{0!$C}tq^r+-I(GQ)8neozYY)U(7 zOFM2#%U)Xc(sG9FFqC#Ik|$y&7Gj6K@N8wG3>?gJ`H;@+&9Bs%+S*gv?F;!CNJp7`(k*XJlj~##d0o| zz1R)fTF%9?7b3K`V~w{HJu0~lmODm&WIWPN#6-;WXZnj}FP3*?c}JGLSoUH$7t3BO zcgwOD%emNLp|2zMg=a$>$6g%g;x<;IwvKagW7@f~#<__e)w!Yej(g+Ab#Uy3@koSD zMCeS+^cTl{ah!|eTpah@@jZ0x#qo|D_rdUh=h!S z4m~P#Lk(IOICum^BxDqH=ux3tKhdCtfrW!dKtw`DL5Ci-rPg@PjAt5ZVd3Br5Rs5k z(4l93rA}KvY%I@(frW!dKtw`DL5CjIdcMP+cS0=;EF3%nA`&tRI`pX2Y0q;#wJ@-7 z@Cb-V$SCO0qk3uswSig~SU7kDL?mPsbm&n7wUIqXYGGjE;1Lj!kWtW~M~$Al<@rsb z76uj$9sv;v83i4B)WmZ$wV7HNSU7kDL?mPsbm&ntwT1UvJl`kJ_sR1+Ls6OJYm4rLP#7j%YtRQd+gE6W--9BOPBv@kY|TR324n@Zr$SCO0(_e`L>Xl~=&py!l zaKsQToDYXR?cl@FNIN0ZF7$Ww_2iYl0re`dMqrJ=K8OZ3grhF726-Sx#u723prgM> zrGG%ZimVa&ERlW0aMZ+b*uv50X$NAYosh{3u_N}V7*MYgYou_vK??($!Vw2g9unt~ zI1gkL`aAl2VkHi!SD7_3`#_udEU<92Juzg?gFGRV7h*^38LPwr^{TK&2}c{Wg)=Rz zLGFkip>Q5ZjAhz|*r8`m#bBzw3lj}m7+5%X1Vkic6m;lOp;a6;Xknmq99eh-L?mPs zbm&o`8fu$(ux;X`C3mP$E&XkrY}5sWE4~=6Zzebd!1n%$;3U`#NEZj^%Vog zm5tne_6BR?Zb$SsE)R(0$x?%2t&6)G7Y8kji+in$dmOxr%K{?f ziFPIyV#mB5m3%AjE}o5oR1fK1Vkj}Wcmv_=JlwaHKp95Zky(T25y&Is zi9DlZ)?i+bNoicmzZwWR${ZVP22Q+`&|R7rFD)!;o8|gGWF_ zLPkM{9(Ag&=f1VyDTQ za*qIA=r8ockn4_iM;nIRxx(|x$on!1aDhCO4FQqdMcR=z;#8iPhifjqcq#w4|MYL+ z!iBPV^Je*AyOPVEeqBzRc2xd0ZJNCL>S~$#dw%79xnkA1a_dctWbCt8PTr>EOD`!2 zLnYl7CCAb}{y8P*ug-G$-2++k;IZ=PfzQkG%}TD`q2#s~l-&0=wO7xOQ`XLs(>KqR z3-&FMlh#d>S&z?FU|C^N#am^S2hr&byY$t3UjwzGokicV2s1_C0l@y!wkV z$vMl3#~vdyXU>#)b7si}XMa(?dfpt__VCH_!p~>PAAdJj-h1mTd5UN5dq&Bd2bKKg z_ewUcoh?spnJ=$Dzf3;<)3vhhv4K4P%W3kfx2MZ{a_ax(^I!GlGe7q9bq%XE2Tw~}|iqvW~Svt`blIda!&Bl*T%}wVz?$i@owNGv`A^N8TI+^u-;{NC ziQM8&;epYpcJJtWdZ5PSIcP{yK L{Im6+X{)~jn&Xc{ diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index c3807ec7ba..80531c078d 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -3221,7 +3221,7 @@ SalvagingBench: Some(( variations: [ ( model: "voxygen.voxel.sprite.salvaging_station.salvaging_station-0", - offset: (-8.5, -7.5, 0.0), + offset: (-7.0, -8.0, 0.0), lod_axes: (0.0, 0.0, 0.0), ), ], diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index 962c8f0427..a3ecd7e18d 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -142,12 +142,12 @@ pub enum CraftingTab { Armor, Weapon, ProcessedMaterial, - Dismantle, Food, Potion, Bag, Utility, Glider, + Dismantle, // Needs to be the last one or widget alignment will be messed up } impl CraftingTab { @@ -155,7 +155,6 @@ impl CraftingTab { match self { CraftingTab::All => "hud.crafting.tabs.all", CraftingTab::Armor => "hud.crafting.tabs.armor", - CraftingTab::Dismantle => "hud.crafting.tabs.dismantle", CraftingTab::Food => "hud.crafting.tabs.food", CraftingTab::Glider => "hud.crafting.tabs.glider", CraftingTab::Potion => "hud.crafting.tabs.potion", @@ -164,6 +163,7 @@ impl CraftingTab { CraftingTab::Weapon => "hud.crafting.tabs.weapon", CraftingTab::Bag => "hud.crafting.tabs.bag", CraftingTab::ProcessedMaterial => "hud.crafting.tabs.processed_material", + CraftingTab::Dismantle => "hud.crafting.tabs.dismantle", } } @@ -171,7 +171,6 @@ impl CraftingTab { match self { CraftingTab::All => imgs.icon_globe, CraftingTab::Armor => imgs.icon_armor, - CraftingTab::Dismantle => imgs.icon_dismantle, CraftingTab::Food => imgs.icon_food, CraftingTab::Glider => imgs.icon_glider, CraftingTab::Potion => imgs.icon_potion, @@ -180,13 +179,14 @@ impl CraftingTab { CraftingTab::Weapon => imgs.icon_weapon, CraftingTab::Bag => imgs.icon_bag, CraftingTab::ProcessedMaterial => imgs.icon_processed_material, + CraftingTab::Dismantle => imgs.icon_dismantle, } } fn satisfies(self, recipe: &Recipe) -> bool { let (item, _count) = &recipe.output; match self { - CraftingTab::All => true, + CraftingTab::All | CraftingTab::Dismantle => true, CraftingTab::Food => item.tags().contains(&ItemTag::Food), CraftingTab::Armor => match item.kind() { ItemKind::Armor(_) => !item.tags().contains(&ItemTag::Bag), @@ -207,8 +207,6 @@ impl CraftingTab { ItemKind::Tool(_) => !item.tags().contains(&ItemTag::CraftingTool), _ => false, }, - // Only has salavging UI which doesn't use recipes - CraftingTab::Dismantle => false, } } } @@ -374,53 +372,55 @@ impl<'a> Widget for Crafting<'a> { }; let sel_crafting_tab = &self.show.crafting_tab; for (i, crafting_tab) in CraftingTab::iter().enumerate() { - let tab_img = crafting_tab.img_id(self.imgs); - // Button Background - let mut bg = Image::new(self.imgs.pixel) - .w_h(40.0, 30.0) - .color(Some(UI_MAIN)); - if i == 0 { - bg = bg.top_left_with_margins_on(state.ids.window_frame, 50.0, -40.0) - } else { - bg = bg.down_from(state.ids.category_bgs[i - 1], 0.0) - }; - bg.set(state.ids.category_bgs[i], ui); - // Category Button - if Button::image(if crafting_tab == *sel_crafting_tab { - self.imgs.wpn_icon_border_pressed - } else { - self.imgs.wpn_icon_border - }) - .wh_of(state.ids.category_bgs[i]) - .middle_of(state.ids.category_bgs[i]) - .hover_image(if crafting_tab == *sel_crafting_tab { - self.imgs.wpn_icon_border_pressed - } else { - self.imgs.wpn_icon_border_mo - }) - .press_image(if crafting_tab == *sel_crafting_tab { - self.imgs.wpn_icon_border_pressed - } else { - self.imgs.wpn_icon_border_press - }) - .with_tooltip( - self.tooltip_manager, - self.localized_strings.get(crafting_tab.name_key()), - "", - &tabs_tooltip, - TEXT_COLOR, - ) - .set(state.ids.category_tabs[i], ui) - .was_clicked() - { - events.push(Event::ChangeCraftingTab(crafting_tab)) - }; - // Tab images - Image::new(tab_img) - .middle_of(state.ids.category_tabs[i]) - .w_h(20.0, 20.0) - .graphics_for(state.ids.category_tabs[i]) - .set(state.ids.category_imgs[i], ui); + if crafting_tab != CraftingTab::Dismantle { + let tab_img = crafting_tab.img_id(self.imgs); + // Button Background + let mut bg = Image::new(self.imgs.pixel) + .w_h(40.0, 30.0) + .color(Some(UI_MAIN)); + if i == 0 { + bg = bg.top_left_with_margins_on(state.ids.window_frame, 50.0, -40.0) + } else { + bg = bg.down_from(state.ids.category_bgs[i - 1], 0.0) + }; + bg.set(state.ids.category_bgs[i], ui); + // Category Button + if Button::image(if crafting_tab == *sel_crafting_tab { + self.imgs.wpn_icon_border_pressed + } else { + self.imgs.wpn_icon_border + }) + .wh_of(state.ids.category_bgs[i]) + .middle_of(state.ids.category_bgs[i]) + .hover_image(if crafting_tab == *sel_crafting_tab { + self.imgs.wpn_icon_border_pressed + } else { + self.imgs.wpn_icon_border_mo + }) + .press_image(if crafting_tab == *sel_crafting_tab { + self.imgs.wpn_icon_border_pressed + } else { + self.imgs.wpn_icon_border_press + }) + .with_tooltip( + self.tooltip_manager, + self.localized_strings.get(crafting_tab.name_key()), + "", + &tabs_tooltip, + TEXT_COLOR, + ) + .set(state.ids.category_tabs[i], ui) + .was_clicked() + { + events.push(Event::ChangeCraftingTab(crafting_tab)) + }; + // Tab images + Image::new(tab_img) + .middle_of(state.ids.category_tabs[i]) + .w_h(20.0, 20.0) + .graphics_for(state.ids.category_tabs[i]) + .set(state.ids.category_imgs[i], ui); + } } // TODO: Consider UX for filtering searches, maybe a checkbox or a dropdown if @@ -1021,6 +1021,41 @@ impl<'a> Widget for Crafting<'a> { .set(state.ids.ingredients[i], ui); } } + } else if *sel_crafting_tab == CraftingTab::Dismantle { + // Title + + Text::new("Dismantling") + .mid_top_with_margin_on(state.ids.align_ing, -40.0) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(24)) + .color(TEXT_COLOR) + .parent(state.ids.window) + .set(state.ids.title_ing, ui); + + // Bench Icon + + Image::new(animate_by_pulse( + &self + .item_imgs + .img_ids_or_not_found_img(Tool("SalvagingBench".to_string())), + self.pulse, + )) + .w_h(120.0, 120.0) + .mid_top_with_margin_on(state.ids.align_ing, 40.0) + .parent(state.ids.align_ing) + .set(state.ids.output_img_frame, ui); + + // Explanation + + Text::new("Explanation goes here") + .mid_bottom_with_margin_on(state.ids.output_img_frame, -40.0) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(14)) + .color(TEXT_COLOR) + .parent(state.ids.window) + .set(state.ids.ingredients_txt, ui); + + // Colored Overlays } // Search / Title Recipes From d089a5d23945c6c866b0da7732421c62ec88d745 Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Tue, 19 Oct 2021 16:15:35 +0200 Subject: [PATCH 14/18] text and alignment WIP --- assets/voxygen/i18n/en/hud/crafting.ron | 2 + assets/voxygen/item_image_manifest.ron | 2 +- assets/voxygen/voxel/sprite_manifest.ron | 4 +- common/src/terrain/block.rs | 2 +- common/src/terrain/sprite.rs | 6 +-- server/src/events/inventory_manip.rs | 2 +- voxygen/src/hud/crafting.rs | 53 +++++++++++-------- voxygen/src/hud/mod.rs | 4 +- voxygen/src/scene/terrain/watcher.rs | 2 +- .../settlement/building/archetype/house.rs | 2 +- 10 files changed, 45 insertions(+), 34 deletions(-) diff --git a/assets/voxygen/i18n/en/hud/crafting.ron b/assets/voxygen/i18n/en/hud/crafting.ron index 5db166ea1f..ef9e943b09 100644 --- a/assets/voxygen/i18n/en/hud/crafting.ron +++ b/assets/voxygen/i18n/en/hud/crafting.ron @@ -31,6 +31,8 @@ "hud.crafting.tabs.weapon": "Weapons", "hud.crafting.tabs.bag": "Bags", "hud.crafting.tabs.processed_material": "Materials", + "hud.crafting.dismantle_title": "Dismantling", + "hud.crafting.dismantle_explanation" : "Hover items in your bag to see what\nyou can salvage.\n\nDouble-Click them to start dismantling.", }, diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index eb92ff183c..afbf8f05e7 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -35,7 +35,7 @@ "voxel.object.tanning_rack", (0.0, 0.0, 0.0), (-90.0, 20.0, 0.0), 1.0, ), - Tool("SalvagingBench"): VoxTrans( + Tool("DismantlingBench"): VoxTrans( "voxel.sprite.salvaging_station.salvaging_station-0", (0.0, 0.0, 0.0), (-50.0, 40.0, 30.0), 0.9, ), diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index 80531c078d..68ba9e835b 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -3216,8 +3216,8 @@ Loom: Some(( ], wind_sway: 0.0, )), -// SalvagingBench -SalvagingBench: Some(( +// DismantlingBench +DismantlingBench: Some(( variations: [ ( model: "voxygen.voxel.sprite.salvaging_station.salvaging_station-0", diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index 302a24b815..86bab3ec99 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -261,7 +261,7 @@ impl Block { | SpriteKind::Forge | SpriteKind::Loom | SpriteKind::SpinningWheel - | SpriteKind::SalvagingBench + | SpriteKind::DismantlingBench | SpriteKind::TanningRack => None, SpriteKind::EnsnaringVines => Some(0.1), _ => Some(0.25), diff --git a/common/src/terrain/sprite.rs b/common/src/terrain/sprite.rs index bff6f3274a..a8acf2c2a5 100644 --- a/common/src/terrain/sprite.rs +++ b/common/src/terrain/sprite.rs @@ -182,7 +182,7 @@ make_case_elim!( CavernGrassBlueLong = 0x9B, CavernLillypadBlue = 0x9C, CavernMycelBlue = 0x9D, - SalvagingBench = 0x9E, + DismantlingBench = 0x9E, } ); @@ -239,7 +239,7 @@ impl SpriteKind { SpriteKind::Loom => 1.27, SpriteKind::Anvil => 1.1, SpriteKind::CookingPot => 1.36, - SpriteKind::SalvagingBench => 1.18, + SpriteKind::DismantlingBench => 1.18, // TODO: Find suitable heights. SpriteKind::BarrelCactus | SpriteKind::RoundCactus @@ -442,7 +442,7 @@ impl SpriteKind { | SpriteKind::SpinningWheel | SpriteKind::TanningRack | SpriteKind::Loom - | SpriteKind::SalvagingBench + | SpriteKind::DismantlingBench ) } } diff --git a/server/src/events/inventory_manip.rs b/server/src/events/inventory_manip.rs index 19cb1ba87c..34896df0d9 100644 --- a/server/src/events/inventory_manip.rs +++ b/server/src/events/inventory_manip.rs @@ -636,7 +636,7 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv }) .and_then(|pos| state.terrain().get(pos).ok().copied()) .and_then(|block| block.get_sprite()); - if matches!(sprite, Some(SpriteKind::SalvagingBench)) { + if matches!(sprite, Some(SpriteKind::DismantlingBench)) { recipe::try_salvage(&mut inventory, slot, ability_map, &msm).ok() } else { None diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index a3ecd7e18d..c83b14d9a5 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -73,6 +73,10 @@ widget_ids! { category_bgs[], category_tabs[], category_imgs[], + dismantle_title, + dismantle_img, + dismantle_txt, + dismantle_highlight_txt, } } @@ -617,7 +621,7 @@ impl<'a> Widget for Crafting<'a> { Some(SpriteKind::Loom) => Some("Loom"), Some(SpriteKind::SpinningWheel) => Some("SpinningWheel"), Some(SpriteKind::TanningRack) => Some("TanningRack"), - Some(SpriteKind::SalvagingBench) => Some("SalvagingBench"), + Some(SpriteKind::DismantlingBench) => Some("DismantlingBench"), _ => None, }; @@ -793,7 +797,7 @@ impl<'a> Widget for Crafting<'a> { Some(SpriteKind::Loom) => "Loom", Some(SpriteKind::SpinningWheel) => "SpinningWheel", Some(SpriteKind::TanningRack) => "TanningRack", - Some(SpriteKind::SalvagingBench) => "SalvagingBench", + Some(SpriteKind::DismantlingBench) => "DismantlingBench", None => "CraftsmanHammer", _ => "CraftsmanHammer", }; @@ -817,7 +821,7 @@ impl<'a> Widget for Crafting<'a> { Some(SpriteKind::Loom) => "hud.crafting.loom", Some(SpriteKind::SpinningWheel) => "hud.crafting.spinning_wheel", Some(SpriteKind::TanningRack) => "hud.crafting.tanning_rack", - Some(SpriteKind::SalvagingBench) => "hud.crafting.salvaging_station", + Some(SpriteKind::DismantlingBench) => "hud.crafting.salvaging_station", _ => "", }; Text::new(self.localized_strings.get(station_name)) @@ -953,7 +957,12 @@ impl<'a> Widget for Crafting<'a> { .w_h(22.0, 22.0) .middle_of(state.ids.ingredient_frame[i]) .hover_image(self.imgs.wpn_icon_border_mo) - .with_item_tooltip(self.item_tooltip_manager, vec![&*item_def], &None, &item_tooltip) + .with_item_tooltip( + self.item_tooltip_manager, + vec![&*item_def], + &None, + &item_tooltip, + ) .set(state.ids.ingredient_btn[i], ui) .was_clicked() { @@ -1023,39 +1032,39 @@ impl<'a> Widget for Crafting<'a> { } } else if *sel_crafting_tab == CraftingTab::Dismantle { // Title - - Text::new("Dismantling") - .mid_top_with_margin_on(state.ids.align_ing, -40.0) + Text::new(self.localized_strings.get("hud.crafting.dismantle_title")) + .mid_top_with_margin_on(state.ids.align_ing, 0.0) .font_id(self.fonts.cyri.conrod_id) .font_size(self.fonts.cyri.scale(24)) .color(TEXT_COLOR) .parent(state.ids.window) - .set(state.ids.title_ing, ui); + .set(state.ids.dismantle_title, ui); // Bench Icon - + let size = 140.0; Image::new(animate_by_pulse( &self .item_imgs - .img_ids_or_not_found_img(Tool("SalvagingBench".to_string())), + .img_ids_or_not_found_img(Tool("DismantlingBench".to_string())), self.pulse, )) - .w_h(120.0, 120.0) - .mid_top_with_margin_on(state.ids.align_ing, 40.0) + .wh([size; 2]) + .mid_top_with_margin_on(state.ids.align_ing, 50.0) .parent(state.ids.align_ing) - .set(state.ids.output_img_frame, ui); + .set(state.ids.dismantle_img, ui); // Explanation - Text::new("Explanation goes here") - .mid_bottom_with_margin_on(state.ids.output_img_frame, -40.0) - .font_id(self.fonts.cyri.conrod_id) - .font_size(self.fonts.cyri.scale(14)) - .color(TEXT_COLOR) - .parent(state.ids.window) - .set(state.ids.ingredients_txt, ui); - - // Colored Overlays + Text::new( + self.localized_strings + .get("hud.crafting.dismantle_explanation"), + ) + .mid_bottom_with_margin_on(state.ids.dismantle_img, -60.0) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(14)) + .color(TEXT_COLOR) + .parent(state.ids.window) + .set(state.ids.dismantle_txt, ui); } // Search / Title Recipes diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 2d27a2457c..9c1cab4923 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -728,7 +728,7 @@ impl Show { self.selected_crafting_tab(tab); self.crafting(true); self.craft_sprite = self.craft_sprite.or(craft_sprite); - self.salvage = matches!(self.craft_sprite, Some((_, SpriteKind::SalvagingBench))) + self.salvage = matches!(self.craft_sprite, Some((_, SpriteKind::DismantlingBench))) && matches!(tab, CraftingTab::Dismantle); } @@ -4083,7 +4083,7 @@ pub fn get_sprite_desc(sprite: SpriteKind, localized_strings: &Localization) -> SpriteKind::Loom => "hud.crafting.loom", SpriteKind::SpinningWheel => "hud.crafting.spinning_wheel", SpriteKind::TanningRack => "hud.crafting.tanning_rack", - SpriteKind::SalvagingBench => "hud.crafting.salvaging_station", + SpriteKind::DismantlingBench => "hud.crafting.salvaging_station", sprite => return Some(Cow::Owned(format!("{:?}", sprite))), }; Some(Cow::Borrowed(localized_strings.get(i18n_key))) diff --git a/voxygen/src/scene/terrain/watcher.rs b/voxygen/src/scene/terrain/watcher.rs index e801d0feff..8077d69462 100644 --- a/voxygen/src/scene/terrain/watcher.rs +++ b/voxygen/src/scene/terrain/watcher.rs @@ -135,7 +135,7 @@ impl BlocksOfInterest { fires.push(pos); interactables.push((pos, Interaction::Craft(CraftingTab::Food))) }, - Some(SpriteKind::SalvagingBench) => { + Some(SpriteKind::DismantlingBench) => { fires.push(pos); interactables.push((pos, Interaction::Craft(CraftingTab::Dismantle))) }, diff --git a/world/src/site/settlement/building/archetype/house.rs b/world/src/site/settlement/building/archetype/house.rs index c9437113c7..5cf7220b9b 100644 --- a/world/src/site/settlement/building/archetype/house.rs +++ b/world/src/site/settlement/building/archetype/house.rs @@ -539,7 +539,7 @@ impl Archetype for House { 9 => SpriteKind::Loom, 10 => SpriteKind::SpinningWheel, 11 => SpriteKind::TanningRack, - 12 => SpriteKind::SalvagingBench, + 12 => SpriteKind::DismantlingBench, _ => unreachable!(), }; From e70230819de04955c868e6ac9d8be5dbe317e9f5 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 23 Oct 2021 20:40:40 -0400 Subject: [PATCH 15/18] Fixed opening salvaging station not showing salvage text. --- common/src/comp/inventory/item/mod.rs | 4 ++-- voxygen/src/hud/crafting.rs | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 19a38f3a00..7919bb4852 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -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", diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index c83b14d9a5..e548c60a00 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -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, ) From 3f92f0ea8b1ed3b77008b6e30cfdb5347947de87 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 25 Oct 2021 15:34:39 -0400 Subject: [PATCH 16/18] Changed crafting to only consume items after checking that the crafting would be successful instead of consuming items first and reinserting on failure. --- client/src/lib.rs | 5 +- common/src/comp/controller.rs | 2 +- common/src/comp/inventory/item/mod.rs | 64 +++++-------- common/src/recipe.rs | 125 +++++++++++++++----------- 4 files changed, 100 insertions(+), 96 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 5baf84d9f7..f490e302c2 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -998,7 +998,7 @@ impl Client { pub fn craft_recipe( &mut self, recipe: &str, - slots: Vec, + slots: Vec<(u32, InvSlotId)>, craft_sprite: Option<(Vec3, SpriteKind)>, ) -> bool { let (can_craft, required_sprite) = self.can_craft_recipe(recipe); @@ -1019,6 +1019,7 @@ impl Client { } } + /// Checks if the item in the given slot can be salvaged. pub fn can_salvage_item(&self, slot: InvSlotId) -> bool { self.inventories() .get(self.entity()) @@ -1026,6 +1027,8 @@ impl Client { .map_or(false, |item| item.is_salvageable()) } + /// Salvage the item in the given inventory slot. `salvage_pos` should be + /// the location of a relevant crafting station within range of the player. pub fn salvage_item(&mut self, slot: InvSlotId, salvage_pos: Vec3) -> bool { let is_salvageable = self.can_salvage_item(slot); if is_salvageable { diff --git a/common/src/comp/controller.rs b/common/src/comp/controller.rs index a12fa2b404..97e190d0ac 100644 --- a/common/src/comp/controller.rs +++ b/common/src/comp/controller.rs @@ -94,7 +94,7 @@ impl From for InventoryManip { pub enum CraftEvent { Simple { recipe: String, - slots: Vec, + slots: Vec<(u32, InvSlotId)>, }, Salvage(InvSlotId), } diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 7919bb4852..a951c6565c 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -171,38 +171,38 @@ impl Material { } } - pub fn asset_identifier(&self) -> &'static str { + pub fn asset_identifier(&self) -> Option<&'static str> { match self { - Material::Bronze => "common.items.mineral.ingot.bronze", - Material::Iron => "common.items.mineral.ingot.iron", - Material::Steel => "common.items.mineral.ingot.steel", - Material::Cobalt => "common.items.mineral.ingot.cobalt", - Material::Bloodsteel => "common.items.mineral.ingot.bloodsteel", - Material::Orichalcum => "common.items.mineral.ingot.orichalcum", + Material::Bronze => Some("common.items.mineral.ingot.bronze"), + Material::Iron => Some("common.items.mineral.ingot.iron"), + Material::Steel => Some("common.items.mineral.ingot.steel"), + Material::Cobalt => Some("common.items.mineral.ingot.cobalt"), + Material::Bloodsteel => Some("common.items.mineral.ingot.bloodsteel"), + Material::Orichalcum => Some("common.items.mineral.ingot.orichalcum"), Material::Wood | Material::Bamboo | Material::Hardwood | Material::Ironwood | Material::Frostwood - | Material::Eldwood => unimplemented!(), + | Material::Eldwood => None, Material::Rock | Material::Granite | Material::Bone | Material::Basalt | Material::Obsidian - | 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", - Material::Lifecloth => "common.items.crafting_ing.cloth.lifecloth", - Material::Moonweave => "common.items.crafting_ing.cloth.moonweave", - Material::Sunsilk => "common.items.crafting_ing.cloth.sunsilk", - Material::Rawhide => "common.items.crafting_ing.leather.simple_leather", - Material::Leather => "common.items.crafting_ing.leather.thick_leather", - Material::Scale => "common.items.crafting_ing.hide.scales", - Material::Carapace => "common.items.crafting_ing.hide.carapace", - Material::Plate => "common.items.crafting_ing.hide.plate", - Material::Dragonscale => "common.items.crafting_ing.hide.dragon_scale", + | Material::Velorite => None, + Material::Linen => Some("common.items.crafting_ing.cloth.linen"), + Material::Wool => Some("common.items.crafting_ing.cloth.wool"), + Material::Silk => Some("common.items.crafting_ing.cloth.silk"), + Material::Lifecloth => Some("common.items.crafting_ing.cloth.lifecloth"), + Material::Moonweave => Some("common.items.crafting_ing.cloth.moonweave"), + Material::Sunsilk => Some("common.items.crafting_ing.cloth.sunsilk"), + Material::Rawhide => Some("common.items.crafting_ing.leather.simple_leather"), + Material::Leather => Some("common.items.crafting_ing.leather.thick_leather"), + Material::Scale => Some("common.items.crafting_ing.hide.scales"), + Material::Carapace => Some("common.items.crafting_ing.hide.carapace"), + Material::Plate => Some("common.items.crafting_ing.hide.plate"), + Material::Dragonscale => Some("common.items.crafting_ing.hide.dragon_scale"), } } } @@ -815,27 +815,7 @@ impl Item { None } }) - .map(|material| material.asset_identifier()) - } - - // Attempts to salvage an item by consuming it, returns the salvaged items if - // salvageable, else the original item - pub fn try_salvage(self) -> Result, Item> { - if !self.is_salvageable() { - return Err(self); - } - - // Creates one item for every salvage tag in the target item - let salvaged_items: Vec<_> = self - .salvage_output() - .map(|asset| Item::new_from_asset_expect(asset)) - .collect(); - - if salvaged_items.is_empty() { - Err(self) - } else { - Ok(salvaged_items) - } + .filter_map(|material| material.asset_identifier()) } pub fn name(&self) -> &str { &self.item_def.name } diff --git a/common/src/recipe.rs b/common/src/recipe.rs index a5398ff034..23309e37f2 100644 --- a/common/src/recipe.rs +++ b/common/src/recipe.rs @@ -30,50 +30,65 @@ impl Recipe { pub fn craft_simple( &self, inv: &mut Inventory, - slots: Vec, + // Vec tying an input to a slot + slots: Vec<(u32, InvSlotId)>, ability_map: &AbilityMap, msm: &MaterialStatManifest, ) -> Result, Vec<(&RecipeInput, u32)>> { - let mut recipe_inputs = Vec::new(); + let mut slot_claims = HashMap::new(); let mut unsatisfied_requirements = Vec::new(); - // Checks each input against a slot in the inventory. If the slot contains an - // item that fulfills the need of the input, takes from the inventory up to the - // quantity needed for the crafting input. If the item either cannot be used, or - // there is insufficient quantity, adds input and number of materials needed to - // unsatisfied requirements. + // Checks each input against slots in the inventory. If the slots contain an + // item that fulfills the need of the input, marks some of the item as claimed + // up to quantity needed for the crafting input. If the item either + // cannot be used, or there is insufficient quantity, adds input and + // number of materials needed to unsatisfied requirements. self.inputs .iter() .enumerate() - .for_each(|(i, (input, amount))| { - let valid_input = if let Some(item) = slots.get(i).and_then(|slot| inv.get(*slot)) { - item.matches_recipe_input(input) - } else { - false - }; - - if let Some(slot) = slots.get(i) { - if !valid_input { - unsatisfied_requirements.push((input, *amount)); - } else { - for taken in 0..*amount { - if let Some(item) = inv.take(*slot, ability_map, msm) { - recipe_inputs.push(item); - } else { - unsatisfied_requirements.push((input, *amount - taken)); - break; - } - } + .for_each(|(i, (input, mut required))| { + // Check used for recipes that have an input that is not consumed, e.g. + // craftsman hammer + let mut contains_any = false; + // Gets all slots provided for this input by the frontend + let input_slots = slots + .iter() + .filter_map(|(j, slot)| if i as u32 == *j { Some(slot) } else { None }); + // Goes through each slot and marks some amount from each slot as claimed + for slot in input_slots { + // Checks that the item in the slot can be used for the input + if let Some(item) = inv + .get(*slot) + .filter(|item| item.matches_recipe_input(input)) + { + // Gets the number of items claimed from the slot, or sets to 0 if slot has + // not been claimed by another input yet + let claimed = slot_claims.entry(*slot).or_insert(0); + let available = item.amount().saturating_sub(*claimed); + let provided = available.min(required); + required -= provided; + *claimed += provided; + contains_any = true; } - } else { - unsatisfied_requirements.push((input, *amount)); + } + // If there were not sufficient items to cover requirement between all provided + // slots, or if non-consumed item was not present, mark input as not satisfied + if required > 0 || !contains_any { + unsatisfied_requirements.push((input, required)); } }); // If there are no unsatisfied requirements, create the items produced by the - // recipe in the necessary quantity, else insert the ingredients back into the - // inventory + // recipe in the necessary quantity and remove the items that the recipe + // consumes if unsatisfied_requirements.is_empty() { + for (slot, to_remove) in slot_claims.iter() { + for _ in 0..*to_remove { + let _ = inv + .take(*slot, ability_map, msm) + .expect("Expected item to exist in the inventory"); + } + } let (item_def, quantity) = &self.output; let crafted_item = Item::new_from_item_def(Arc::clone(item_def), &[], ability_map, msm); let mut crafted_items = Vec::with_capacity(*quantity as usize); @@ -82,10 +97,6 @@ impl Recipe { } Ok(crafted_items) } else { - for item in recipe_inputs { - inv.push(item) - .expect("Item was in inventory before craft attempt"); - } Err(unsatisfied_requirements) } } @@ -104,26 +115,28 @@ impl Recipe { pub fn inventory_contains_ingredients<'a>( &self, inv: &'a Inventory, - ) -> Result, Vec<(&RecipeInput, u32)>> { + ) -> Result, Vec<(&RecipeInput, u32)>> { + // Hashmap tracking the quantity that needs to be removed from each slot (so + // that it doesn't think a slot can provide more items than it contains) let mut slot_claims = HashMap::::new(); // Important to be a vec and to remain separate from slot_claims as it must // remain ordered, unlike the hashmap - let mut slots = Vec::::new(); + let mut slots = Vec::<(u32, InvSlotId)>::new(); + // The inputs to a recipe that have missing items, and the amount missing let mut missing = Vec::<(&RecipeInput, u32)>::new(); - for (input, mut needed) in self.inputs() { + for (i, (input, mut needed)) in self.inputs().enumerate() { let mut contains_any = false; - + // Checks through every slot, filtering to only those that contain items that + // can satisfy the input for (inv_slot_id, slot) in inv.slots_with_id() { if let Some(item) = slot .as_ref() .filter(|item| item.matches_recipe_input(&*input)) { let claim = slot_claims.entry(inv_slot_id).or_insert(0); - slots.push(inv_slot_id); - // FIXME: Fishy, looks like it can underflow before min which can trigger an - // overflow check. - let can_claim = (item.amount() - *claim).min(needed); + slots.push((i as u32, inv_slot_id)); + let can_claim = (item.amount().saturating_sub(*claim)).min(needed); *claim += can_claim; needed -= can_claim; contains_any = true; @@ -154,16 +167,24 @@ pub fn try_salvage( msm: &MaterialStatManifest, ) -> Result, SalvageError> { if inv.get(slot).map_or(false, |item| item.is_salvageable()) { - let salvage_item = inv - .take(slot, ability_map, msm) - .expect("Expected item to exist in inventory"); - match salvage_item.try_salvage() { - Ok(items) => Ok(items), - Err(item) => { - inv.push(item) - .expect("Item taken from inventory just before"); - Err(SalvageError::NotSalvageable) - }, + let salvage_item = inv.get(slot).expect("Expected item to exist in inventory"); + let salvage_output: Vec<_> = salvage_item + .salvage_output() + .map(|asset| Item::new_from_asset_expect(asset)) + .collect(); + if salvage_output.is_empty() { + // If no output items, assume salvaging was a failure + // TODO: If we ever change salvaging to have a percent chance, remove the check + // of outputs being empty (requires assets to exist for rock and wood materials + // so that salvaging doesn't silently fail) + Err(SalvageError::NotSalvageable) + } else { + // Remove item that is being salvaged + let _ = inv + .take(slot, ability_map, msm) + .expect("Expected item to exist in inventory"); + // Return the salvaging output + Ok(salvage_output) } } else { Err(SalvageError::NotSalvageable) From 7238c54a95d818995265b2aaa4ad60af8b2bb454 Mon Sep 17 00:00:00 2001 From: Snowram Date: Wed, 27 Oct 2021 22:58:13 +0200 Subject: [PATCH 17/18] Uses a list for item tooltips --- voxygen/src/ui/widgets/item_tooltip.rs | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/voxygen/src/ui/widgets/item_tooltip.rs b/voxygen/src/ui/widgets/item_tooltip.rs index b2e7890f9d..fc58b0ee54 100644 --- a/voxygen/src/ui/widgets/item_tooltip.rs +++ b/voxygen/src/ui/widgets/item_tooltip.rs @@ -120,12 +120,13 @@ impl ItemTooltipManager { ) where I: Borrow, { - let mut y_offset = 0.0; let mp_h = MOUSE_PAD_Y / self.logical_scale_factor; - for item in items { - let tooltip_id = ui.widget_id_generator().next(); + let mut tooltip_id = widget::id::List::new(); - let mut tooltip = |transparency, mouse_pos: [f64; 2], ui: &mut UiCell| { + for (i, item) in items.enumerate() { + tooltip_id.resize(i + 1, &mut ui.widget_id_generator()); + + let tooltip = |transparency, mouse_pos: [f64; 2], ui: &mut UiCell| { // Fill in text and the potential image beforehand to get an accurate size for // spacing let tooltip = tooltip @@ -151,14 +152,20 @@ impl ItemTooltipManager { } else { m_y - mp_h - t_h / 2.0 }; - tooltip - .floating(true) - .transparency(transparency) - .x_y(x, y + y_offset) - .set(tooltip_id, ui); - // Increase the offset to stack the next tooltip on top of the previous one - y_offset += t_h + 5.0; + if i == 0 { + tooltip + .floating(true) + .transparency(transparency) + .x_y(x, y) + .set(tooltip_id[i], ui); + } else { + tooltip + .floating(true) + .transparency(transparency) + .up_from(tooltip_id[i - 1], 5.0) + .set(tooltip_id[i], ui); + } }; match self.state { From 9b07ebe4586be81e50ee584dfea7675fb29c0fb7 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 27 Oct 2021 17:02:20 -0400 Subject: [PATCH 18/18] Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0302ab3aa4..0492fd47d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added catalan (Catalonia) language translation - Sneaking with weapons drawn - Stealth stat values on (some) armors +- All new dismantling interface found at your nearest dismantling staion ### Changed