48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using CalamityMod.CalPlayer;
|
|
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Items.Placeables.Furniture.Trophies;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.LoreItems
|
|
{
|
|
public class KnowledgeOcean : LoreItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("The Ocean");
|
|
Tooltip.SetDefault("Take care to not disturb the deep waters of this world.\n" +
|
|
"You may awaken something more terrifying than death itself.\n" +
|
|
"Favorite this item to prevent the mysterious water elemental from spawning.");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
item.width = 20;
|
|
item.height = 20;
|
|
item.rare = 7;
|
|
item.consumable = false;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player) => false;
|
|
|
|
public override void UpdateInventory(Player player)
|
|
{
|
|
CalamityPlayer modPlayer = player.Calamity();
|
|
if (item.favorited)
|
|
modPlayer.oceanLore = true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
ModRecipe r = new ModRecipe(mod);
|
|
r.SetResult(this);
|
|
r.AddTile(TileID.Bookcases);
|
|
r.AddIngredient(ModContent.ItemType<LeviathanTrophy>());
|
|
r.AddIngredient(ModContent.ItemType<VictoryShard>(), 10);
|
|
r.AddRecipe();
|
|
}
|
|
}
|
|
}
|