Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.LoreItems
|
|
{
|
|
public class KnowledgeCorruption : LoreItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("The Corruption");
|
|
Tooltip.SetDefault("The rotten and forever-deteriorating landscape of infected life, brought upon by a deadly microbe long ago.\n" +
|
|
"It is rumored that the microbe was created through experimentation by a long-dead race, predating the Terrarians.\n" +
|
|
"Place in your inventory to prevent hive cysts from spawning.");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 20;
|
|
item.height = 20;
|
|
item.rare = 2;
|
|
item.consumable = false;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public override void UpdateInventory(Player player)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
modPlayer.corruptionLore = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe r = new ModRecipe(mod);
|
|
r.SetResult(this);
|
|
r.AddTile(TileID.Bookcases);
|
|
r.AddIngredient(ItemID.EaterofWorldsTrophy);
|
|
r.AddIngredient(ModContent.ItemType<VictoryShard>(), 10);
|
|
r.AddRecipe();
|
|
}
|
|
}
|
|
}
|