67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using CalamityMod.Rarities;
|
|
using CalamityMod.Tiles;
|
|
using CalamityMod.Tiles.Furniture.CraftingStations;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.GameContent;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Materials
|
|
{
|
|
public class ShadowspecBar : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Materials";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Item.ResearchUnlockCount = 25;
|
|
|
|
|
|
ItemID.Sets.SortingPriorityMaterials[Type] = 124;
|
|
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
|
|
|
Main.RegisterItemAnimation(
|
|
Type,
|
|
new DrawAnimationVertical(8, 8) /* 8 ticks per frame, has 8 frames total */
|
|
);
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.DefaultToPlaceableTile(ModContent.TileType<ShadowspecBarTile>());
|
|
Item.value = Item.sellPrice(platinum: 1, gold: 92);
|
|
Item.rare = ModContent.RarityType<HotPink>();
|
|
Item.Calamity().devItem = true;
|
|
}
|
|
|
|
public override bool PreDrawInInventory(SpriteBatch spriteBatch, Vector2 position, Rectangle frame, Color drawColor, Color itemColor, Vector2 origin, float scale)
|
|
{
|
|
CalamityUtils.DrawInventoryCustomScale(
|
|
spriteBatch,
|
|
TextureAssets.Item[Type].Value,
|
|
position,
|
|
frame,
|
|
drawColor,
|
|
itemColor,
|
|
origin,
|
|
scale,
|
|
wantedScale: 1f,
|
|
drawOffset: new(0f, -6f)
|
|
);
|
|
return false;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
.AddIngredient<AuricBar>()
|
|
.AddIngredient<ExoPrism>()
|
|
.AddIngredient<AshesofAnnihilation>()
|
|
.AddTile<DraedonsForge>()
|
|
.Register();
|
|
}
|
|
}
|
|
}
|