72 lines
2.5 KiB
C#
72 lines
2.5 KiB
C#
// See Content/NPCs/CorruptedSwarm/CorruptedSwarm.cs for details.
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.Audio;
|
|
using Terraria.Chat;
|
|
using Terraria.ID;
|
|
using Terraria.Localization;
|
|
using Terraria.ModLoader;
|
|
using ForgottenWawiTech.Content.Rarities;
|
|
using ForgottenWawiTech.Content.Items.Materials;
|
|
using ForgottenWawiTech.Content.Tiles.CraftingStations;
|
|
|
|
namespace ForgottenWawiTech.Content.Items.SummonItems
|
|
{
|
|
public class CorruptedBeacon : ModItem
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 20;
|
|
Item.height = 20;
|
|
Item.maxStack = 20;
|
|
Item.value = Item.sellPrice(silver: 50);
|
|
Item.rare = ModContent.RarityType<CorruptedItem>();
|
|
Item.useStyle = ItemUseStyleID.HoldUp;
|
|
Item.useTime = 20;
|
|
Item.useAnimation = 20;
|
|
Item.consumable = false;
|
|
Item.noMelee = true;
|
|
Item.UseSound = SoundID.Item44;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player)
|
|
{
|
|
//return !NPC.AnyNPCs(ModContent.NPCType<NPCs.CorruptedSwarm.CorruptedSwarm>());
|
|
return true; // Allow the message to be shown
|
|
}
|
|
|
|
public override bool? UseItem(Player player)
|
|
{
|
|
// Placeholder feedback until the encounter is implemented.
|
|
string text = "Not yet implemented. You're saved - for now.";
|
|
Color color = new Color(255, 50, 50);
|
|
SoundStyle sound = SoundID.Roar;
|
|
|
|
if (Main.netMode == NetmodeID.Server)
|
|
{
|
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(text), color);
|
|
}
|
|
else
|
|
{
|
|
Main.NewText(text, color);
|
|
}
|
|
|
|
SoundEngine.PlaySound(sound, player.Center);
|
|
return true;
|
|
}
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe()
|
|
// Developer materials
|
|
.AddIngredient(ModContent.ItemType<FallenAngelFeather>(), 1)
|
|
.AddIngredient(ModContent.ItemType<VisorShard>(), 1)
|
|
.AddIngredient(ModContent.ItemType<HalfEatenFish>(), 1)
|
|
.AddIngredient(ModContent.ItemType<LyykaBossDrop>(), 1)
|
|
.AddIngredient(ModContent.ItemType<EnergyCore>(), 5)
|
|
.AddIngredient(ModContent.ItemType<SingularityAlloy>(), 3)
|
|
.AddTile(ModContent.TileType<HighTechMarvel>())
|
|
.Register();
|
|
}
|
|
}
|
|
} |