Files
CalamityModPublic/Tiles/Abyss/AbyssalPots.cs
T

48 lines
1023 B
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
namespace CalamityMod.Tiles.Abyss
{
public class AbyssalPots : ModTile
{
public override void SetDefaults()
{
Main.tileFrameImportant[Type] = true;
Main.tileLavaDeath[Type] = true;
Main.tileWaterDeath[Type] = false;
Main.tileValue[Type] = (short)100;
Main.tileSpelunker[Type] = true;
Main.tileCut[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
TileObjectData.addTile(Type);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Pot");
AddMapEntry(new Color(47, 79, 79), name); //dark slate gray
dustType = 29;
soundType = SoundID.Shatter;
}
public override bool CreateDust(int i, int j, ref int type)
{
if (Main.rand.NextBool(2))
{
type = 29;
}
else
{
type = 186;
}
return true;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
}
}