From 2323ef6c08f6e6c0bdc67024cbcd11ec1645b475 Mon Sep 17 00:00:00 2001 From: Niko Date: Mon, 10 Nov 2025 11:20:37 +0000 Subject: [PATCH] Add crafting to RGBAlloy, Bass, Visor Shard and Shattered Prism --- Content/Items/Materials/RGBAlloy.cs | 1 + Content/Items/Materials/RGBass.cs | 1 + Content/Items/Materials/VisorShard.cs | 1 + Content/Items/Weapons/Magic/ShatteredPrism.cs | 19 ++++++++++++++++--- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Content/Items/Materials/RGBAlloy.cs b/Content/Items/Materials/RGBAlloy.cs index f5f175e..cc47ba1 100644 --- a/Content/Items/Materials/RGBAlloy.cs +++ b/Content/Items/Materials/RGBAlloy.cs @@ -12,6 +12,7 @@ namespace ForgottenWawiTech.Content.Items.Materials Item.height = 20; Item.maxStack = 9999; Item.rare = ItemRarityID.White; + Item.value = Item.buyPrice(gold: 50); } public override void AddRecipes() diff --git a/Content/Items/Materials/RGBass.cs b/Content/Items/Materials/RGBass.cs index 9c87f49..fa6fe6d 100644 --- a/Content/Items/Materials/RGBass.cs +++ b/Content/Items/Materials/RGBass.cs @@ -12,6 +12,7 @@ namespace ForgottenWawiTech.Content.Items.Materials Item.height = 20; Item.maxStack = 9999; Item.rare = ItemRarityID.White; + Item.value = Item.buyPrice(gold: 10); } } } \ No newline at end of file diff --git a/Content/Items/Materials/VisorShard.cs b/Content/Items/Materials/VisorShard.cs index 985845c..af1f4d8 100644 --- a/Content/Items/Materials/VisorShard.cs +++ b/Content/Items/Materials/VisorShard.cs @@ -12,6 +12,7 @@ namespace ForgottenWawiTech.Content.Items.Materials Item.height = 20; Item.maxStack = 9999; Item.rare = ItemRarityID.White; + Item.value = Item.buyPrice(gold: 1); } } } \ No newline at end of file diff --git a/Content/Items/Weapons/Magic/ShatteredPrism.cs b/Content/Items/Weapons/Magic/ShatteredPrism.cs index 01ef6b5..c49d67a 100644 --- a/Content/Items/Weapons/Magic/ShatteredPrism.cs +++ b/Content/Items/Weapons/Magic/ShatteredPrism.cs @@ -22,11 +22,24 @@ namespace ForgottenWawiTech.Content.Items.Weapons.Magic Item.color = OverrideColor; } - - // Because this weapon fires a holdout projectile, it needs to block usage if its projectile already exists. - public override bool CanUseItem(Player player) { + public override bool CanUseItem(Player player) + { return player.ownedProjectileCounts[ModContent.ProjectileType()] <= 0; } + + public override void AddRecipes() + { + Recipe recipe = CreateRecipe(); + // Only add recipe if Calamity Mod is loaded + if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod)) + { + recipe.AddIngredient(ItemID.LastPrism, 1); + recipe.AddIngredient(calamityMod.Find("ShatteredCommunity").Type, 1); + recipe.AddIngredient(10); + recipe.AddTile(); + recipe.Register(); + } + } } } \ No newline at end of file