61 lines
1.9 KiB
C#
61 lines
1.9 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.Localization;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.SunkenSea
|
|
{
|
|
public class SeaPrism : ModTile
|
|
{
|
|
public byte[,] tileAdjacency;
|
|
|
|
private const short subsheetWidth = 450;
|
|
private const short subsheetHeight = 198;
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeWithDesert(Type);
|
|
|
|
Main.tileShine[Type] = 3500;
|
|
Main.tileShine2[Type] = true;
|
|
|
|
TileID.Sets.ChecksForMerge[Type] = true;
|
|
DustType = 33;
|
|
AddMapEntry(new Color(0, 150, 200));
|
|
HitSound = SoundID.Tink;
|
|
Main.tileSpelunker[Type] = true;
|
|
MinPick = 55;
|
|
|
|
TileFraming.SetUpUniversalMerge(Type, ModContent.TileType<Navystone>(), out tileAdjacency);
|
|
}
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num)
|
|
{
|
|
num = fail ? 1 : 3;
|
|
}
|
|
|
|
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
|
|
{
|
|
frameXOffset = i % 2 * subsheetWidth;
|
|
frameYOffset = j % 2 * subsheetHeight;
|
|
}
|
|
|
|
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
|
{
|
|
TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/NavystoneMerge");
|
|
}
|
|
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
TileFraming.GetAdjacencyData(i, j, ModContent.TileType<Navystone>(), out tileAdjacency[i, j]);
|
|
return TileFraming.BrimstoneFraming(i, j, resetFrame);
|
|
}
|
|
}
|
|
}
|