37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
using CalamityMod.Rarities;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Materials
|
|
{
|
|
public class DarkPlasma : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Materials";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Item.ResearchUnlockCount = 5;
|
|
Main.RegisterItemAnimation(Item.type, new DrawAnimationVertical(7, 4));
|
|
ItemID.Sets.AnimatesAsSoul[Type] = true;
|
|
ItemID.Sets.ItemNoGravity[Item.type] = true;
|
|
ItemID.Sets.SortingPriorityMaterials[Type] = 108;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 15;
|
|
Item.height = 12;
|
|
Item.maxStack = 9999;
|
|
Item.value = Item.buyPrice(0, 7, 0, 0);
|
|
Item.rare = ModContent.RarityType<Turquoise>();
|
|
}
|
|
public override void Update(ref float gravity, ref float maxFallSpeed)
|
|
{
|
|
float num = (float)Main.rand.Next(90, 111) * 0.01f;
|
|
num *= Main.essScale;
|
|
Lighting.AddLight((int)((Item.position.X + (float)(Item.width / 2)) / 16f), (int)((Item.position.Y + (float)(Item.height / 2)) / 16f), 0f * num, 0.45f * num, 0.7f * num);
|
|
}
|
|
}
|
|
}
|