52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
|
|
using CalamityMod.World;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.SunkenSea
|
|
{
|
|
public class Navystone : ModTile
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeWithDesert(Type);
|
|
|
|
TileID.Sets.ChecksForMerge[Type] = true;
|
|
dustType = 96;
|
|
drop = ModContent.ItemType<Items.Placeables.Navystone>();
|
|
ModTranslation name = CreateMapEntryName();
|
|
name.SetDefault("Navystone");
|
|
AddMapEntry(new Color(0, 90, 90), name);
|
|
mineResist = 2f;
|
|
soundType = SoundID.Tink;
|
|
}
|
|
|
|
public override bool CanKillTile(int i, int j, ref bool blockDamaged)
|
|
{
|
|
return CalamityWorld.downedDesertScourge;
|
|
}
|
|
|
|
public override bool CanExplode(int i, int j)
|
|
{
|
|
return CalamityWorld.downedDesertScourge;
|
|
}
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num)
|
|
{
|
|
num = fail ? 1 : 3;
|
|
}
|
|
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<EutrophicSand>());
|
|
return false;
|
|
}
|
|
}
|
|
}
|