diff --git a/assets/common/items/armor/agile/back.ron b/assets/common/items/armor/agile/back.ron index 398a212094..dc32fda209 100644 --- a/assets/common/items/armor/agile/back.ron +++ b/assets/common/items/armor/agile/back.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Common, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/agile/belt.ron b/assets/common/items/armor/agile/belt.ron index 01fe69e95a..60924fa1c3 100644 --- a/assets/common/items/armor/agile/belt.ron +++ b/assets/common/items/armor/agile/belt.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Moderate, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/agile/chest.ron b/assets/common/items/armor/agile/chest.ron index 57510e6896..cc53636533 100644 --- a/assets/common/items/armor/agile/chest.ron +++ b/assets/common/items/armor/agile/chest.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Moderate, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/agile/foot.ron b/assets/common/items/armor/agile/foot.ron index 1eb2e32154..1c8d6f7318 100644 --- a/assets/common/items/armor/agile/foot.ron +++ b/assets/common/items/armor/agile/foot.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Moderate, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/agile/hand.ron b/assets/common/items/armor/agile/hand.ron index 3b4c6f2391..304609dcf2 100644 --- a/assets/common/items/armor/agile/hand.ron +++ b/assets/common/items/armor/agile/hand.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Moderate, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/agile/pants.ron b/assets/common/items/armor/agile/pants.ron index e51159afb5..563da5f983 100644 --- a/assets/common/items/armor/agile/pants.ron +++ b/assets/common/items/armor/agile/pants.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Moderate, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/agile/shoulder.ron b/assets/common/items/armor/agile/shoulder.ron index 005e3495fb..9e09202fe5 100644 --- a/assets/common/items/armor/agile/shoulder.ron +++ b/assets/common/items/armor/agile/shoulder.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Moderate, - tags: [], + tags: [LeatherItem], ) \ 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 4a1a30fc49..261550bbc6 100644 --- a/assets/common/items/armor/rugged/chest.ron +++ b/assets/common/items/armor/rugged/chest.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Low, - tags: [], + tags: [ClothItem], ) \ 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 ffa158a07a..c2b4cfc71f 100644 --- a/assets/common/items/armor/rugged/pants.ron +++ b/assets/common/items/armor/rugged/pants.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Low, - tags: [], + tags: [ClothItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/swift/belt.ron b/assets/common/items/armor/swift/belt.ron index b37f56cd56..26dc51c308 100644 --- a/assets/common/items/armor/swift/belt.ron +++ b/assets/common/items/armor/swift/belt.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Common, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/swift/chest.ron b/assets/common/items/armor/swift/chest.ron index ae94cb41e3..1d72079492 100644 --- a/assets/common/items/armor/swift/chest.ron +++ b/assets/common/items/armor/swift/chest.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Moderate, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/swift/foot.ron b/assets/common/items/armor/swift/foot.ron index c1007df921..9a66903375 100644 --- a/assets/common/items/armor/swift/foot.ron +++ b/assets/common/items/armor/swift/foot.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Common, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/swift/hand.ron b/assets/common/items/armor/swift/hand.ron index 92d348fc6f..b4c93f4f5a 100644 --- a/assets/common/items/armor/swift/hand.ron +++ b/assets/common/items/armor/swift/hand.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Common, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/swift/head.ron b/assets/common/items/armor/swift/head.ron index 6d76d2f0ff..61ddec127f 100644 --- a/assets/common/items/armor/swift/head.ron +++ b/assets/common/items/armor/swift/head.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Common, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/swift/pants.ron b/assets/common/items/armor/swift/pants.ron index 4464e8607e..0520fcf154 100644 --- a/assets/common/items/armor/swift/pants.ron +++ b/assets/common/items/armor/swift/pants.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Common, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/armor/swift/shoulder.ron b/assets/common/items/armor/swift/shoulder.ron index f227b7bb4c..af5ed206fb 100644 --- a/assets/common/items/armor/swift/shoulder.ron +++ b/assets/common/items/armor/swift/shoulder.ron @@ -9,5 +9,5 @@ ItemDef( ), )), quality: Common, - tags: [], + tags: [LeatherItem], ) \ No newline at end of file diff --git a/assets/common/items/tag_examples/cloth_item.ron b/assets/common/items/tag_examples/cloth_item.ron index c1580a7cda..976992bd76 100644 --- a/assets/common/items/tag_examples/cloth_item.ron +++ b/assets/common/items/tag_examples/cloth_item.ron @@ -3,6 +3,8 @@ ItemDef( description: "Various colored fabric armors.", kind: TagExamples( item_ids: [ + "common.items.armor.rugged.chest", + "common.items.armor.rugged.pants", "common.items.armor.cloth_blue.foot", "common.items.armor.cloth_blue.hand", "common.items.armor.cloth_blue.pants", diff --git a/assets/common/items/tag_examples/leather_item.ron b/assets/common/items/tag_examples/leather_item.ron new file mode 100644 index 0000000000..4bbd0e217c --- /dev/null +++ b/assets/common/items/tag_examples/leather_item.ron @@ -0,0 +1,23 @@ +ItemDef( + name: "Any leather item", + description: "Various leather armors.", + kind: TagExamples( + item_ids: [ + "common.items.armor.agile.back", + "common.items.armor.agile.belt", + "common.items.armor.agile.chest", + "common.items.armor.agile.foot", + "common.items.armor.agile.hand", + "common.items.armor.agile.pants", + "common.items.armor.agile.shoulder", + "common.items.armor.swift.belt", + "common.items.armor.swift.chest", + "common.items.armor.swift.foot", + "common.items.armor.swift.hand", + "common.items.armor.swift.pants", + + ], + ), + quality: Common, + tags: [], +) diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index c26132d301..ef20666454 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -391,6 +391,13 @@ (Item("common.items.crafting_tools.sewing_set"), 0), ], ), + "leather_scraps": ( + ("common.items.crafting_ing.leather_scraps", 1), + [ + (Tag(LeatherItem), 1), + (Item("common.items.crafting_tools.sewing_set"), 0), + ], + ), //"metal_blade": ( // ("common.items.crafting_ing.modular.damage.sword.metal_blade", 1), // [ diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 137941447f..015b8e020f 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -93,6 +93,7 @@ pub trait TagExampleInfo { #[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)] pub enum ItemTag { ClothItem, + LeatherItem, ModularComponent(ModularComponentTag), MetalIngot, Cultist, @@ -102,6 +103,7 @@ impl TagExampleInfo for ItemTag { fn name(&self) -> &'static str { match self { ItemTag::ClothItem => "cloth item", + ItemTag::LeatherItem => "leather item", ItemTag::ModularComponent(kind) => kind.name(), ItemTag::MetalIngot => "metal ingot", ItemTag::Cultist => "cultist", @@ -111,6 +113,7 @@ impl TagExampleInfo for ItemTag { fn exemplar_identifier(&self) -> &'static str { match self { ItemTag::ClothItem => "common.items.tag_examples.cloth_item", + ItemTag::LeatherItem => "common.items.tag_examples.leather_item", ItemTag::ModularComponent(tag) => tag.exemplar_identifier(), ItemTag::MetalIngot => "common.items.tag_examples.metal_ingot", ItemTag::Cultist => "common.items.tag_examples.cultist",