Add crafting to RGBAlloy, Bass, Visor Shard and Shattered Prism

This commit is contained in:
2025-11-10 11:20:37 +00:00
parent 00d44a09e2
commit 2323ef6c08
4 changed files with 19 additions and 3 deletions
+16 -3
View File
@@ -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<ShatteredPrismHoldout>()] <= 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<ModItem>("ShatteredCommunity").Type, 1);
recipe.AddIngredient<Content.Items.Materials.RGBAlloy>(10);
recipe.AddTile<Content.Tiles.CraftingStations.HighTechMarvel>();
recipe.Register();
}
}
}
}