2 - Added Miracle Matter 3 - Changed all Exo Weapon recipes to require 1 Miracle Matter 4 - Improved the tooltips of most late game crafting materials 5 - Changed some late game crafting recipes around
66 lines
2.6 KiB
C#
66 lines
2.6 KiB
C#
using CalamityMod.Tiles;
|
|
using CalamityMod.Tiles.Furniture.CraftingStations;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Materials
|
|
{
|
|
public class ShadowspecBar : ModItem
|
|
{
|
|
public int frameCounter = 0;
|
|
public int frame = 0;
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Shadowspec Bar");
|
|
Tooltip.SetDefault("A vile, black metal, so horrendous and powerful as to defy explanation");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.createTile = ModContent.TileType<ShadowspecBarTile>();
|
|
item.width = 38;
|
|
item.height = 40;
|
|
item.maxStack = 999;
|
|
item.useStyle = ItemUseStyleID.SwingThrow;
|
|
item.useTurn = true;
|
|
item.useAnimation = 15;
|
|
item.useTime = 10;
|
|
item.autoReuse = true;
|
|
item.consumable = true;
|
|
|
|
item.value = Item.sellPrice(platinum: 1, gold: 92);
|
|
item.Calamity().customRarity = CalamityRarity.HotPink;
|
|
item.Calamity().devItem = true;
|
|
}
|
|
|
|
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frameI, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
|
{
|
|
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/ShadowspecBar_Animated");
|
|
spriteBatch.Draw(texture, position, item.GetCurrentFrame(ref frame, ref frameCounter, 8, 8), Color.White, 0f, origin, scale, SpriteEffects.None, 0);
|
|
return false;
|
|
}
|
|
|
|
public override bool PreDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, ref float rotation, ref float scale, int whoAmI)
|
|
{
|
|
Texture2D texture = ModContent.GetTexture("CalamityMod/Items/Materials/ShadowspecBar_Animated");
|
|
spriteBatch.Draw(texture, item.position - Main.screenPosition, item.GetCurrentFrame(ref frame, ref frameCounter, 8, 8), lightColor, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0);
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe recipe = new ModRecipe(mod);
|
|
recipe.AddIngredient(ModContent.ItemType<AuricBar>());
|
|
recipe.AddIngredient(ModContent.ItemType<ExoPrism>());
|
|
recipe.AddIngredient(ModContent.ItemType<CalamitousEssence>());
|
|
recipe.AddTile(ModContent.TileType<DraedonsForge>());
|
|
recipe.SetResult(this);
|
|
recipe.AddRecipe();
|
|
}
|
|
}
|
|
}
|