59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
|
|
using CalamityMod.Items.Placeables.Ores;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.Localization;
|
|
using Terraria.ModLoader;
|
|
using Terraria.ID;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
|
|
namespace CalamityMod.Tiles.Ores
|
|
{
|
|
public class ExodiumOre : ModTile
|
|
{
|
|
public byte[,] tileAdjacency;
|
|
public byte[,] secondTileAdjacency;
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeWithSet(Type, TileID.LunarOre);
|
|
|
|
TileID.Sets.Ore[Type] = true;
|
|
TileID.Sets.OreMergesWithMud[Type] = true;
|
|
|
|
AddMapEntry(new Color(51, 48, 68), CreateMapEntryName());
|
|
MineResist = 3f;
|
|
MinPick = 225;
|
|
HitSound = SoundID.Tink;
|
|
Main.tileOreFinderPriority[Type] = 760;
|
|
Main.tileSpelunker[Type] = true;
|
|
base.SetStaticDefaults();
|
|
|
|
TileID.Sets.ChecksForMerge[Type] = true;
|
|
|
|
|
|
TileFraming.SetUpUniversalMerge(Type, TileID.Dirt, out tileAdjacency);
|
|
TileFraming.SetUpUniversalMerge(Type, TileID.LunarOre, out secondTileAdjacency);
|
|
}
|
|
|
|
public override void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
|
{
|
|
TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/LuminiteMerge");
|
|
TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/DirtMerge");
|
|
}
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
TileFraming.GetAdjacencyData(i, j, TileID.Dirt, out tileAdjacency[i, j]);
|
|
TileFraming.GetAdjacencyData(i, j, TileID.LunarOre, out secondTileAdjacency[i, j]);
|
|
return true;
|
|
}
|
|
|
|
public override bool CanExplode(int i, int j) => false;
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 2 : 4;
|
|
}
|
|
}
|