53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using CalamityMod.Items.Fishing.SulphurCatches;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
using Terraria.ObjectData;
|
|
|
|
namespace CalamityMod.Tiles.Abyss
|
|
{
|
|
public class AbyssalCrateTile : ModTile
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Main.tileSolidTop[Type] = true;
|
|
Main.tileLighted[Type] = true;
|
|
Main.tileFrameImportant[Type] = true;
|
|
Main.tileNoAttach[Type] = true;
|
|
Main.tileTable[Type] = true;
|
|
Main.tileLavaDeath[Type] = true;
|
|
Main.tileWaterDeath[Type] = false;
|
|
|
|
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2);
|
|
TileObjectData.addTile(Type);
|
|
ModTranslation name = CreateMapEntryName();
|
|
name.SetDefault("Abyssal Crate");
|
|
AddMapEntry(new Color(47, 79, 79), name); //dark slate gray
|
|
dustType = 33;
|
|
}
|
|
|
|
public override bool CreateDust(int i, int j, ref int type)
|
|
{
|
|
if (Main.rand.NextBool(2))
|
|
{
|
|
type = 44;
|
|
}
|
|
else
|
|
{
|
|
type = 33;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num)
|
|
{
|
|
num = fail ? 1 : 3;
|
|
}
|
|
|
|
public override void KillMultiTile(int i, int j, int frameX, int frameY)
|
|
{
|
|
Item.NewItem(i * 16, j * 16, 16, 32, ModContent.ItemType<AbyssalCrate>());
|
|
}
|
|
}
|
|
}
|