58 lines
1.6 KiB
C#
58 lines
1.6 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.Abyss
|
|
{
|
|
public class Tenebris : ModTile
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileMergeDirt[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeWithAbyss(Type);
|
|
|
|
dustType = 44;
|
|
drop = ModContent.ItemType<Items.Placeables.Tenebris>();
|
|
ModTranslation name = CreateMapEntryName();
|
|
name.SetDefault("Tenebris");
|
|
AddMapEntry(new Color(0, 100, 100), name);
|
|
mineResist = 3f;
|
|
minPick = 200;
|
|
soundType = SoundID.Tink;
|
|
}
|
|
|
|
public override bool CanExplode(int i, int j)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num)
|
|
{
|
|
num = fail ? 1 : 3;
|
|
}
|
|
|
|
public override void NearbyEffects(int i, int j, bool closer)
|
|
{
|
|
if (!closer && j < Main.maxTilesY - 205)
|
|
{
|
|
if (Main.tile[i, j].liquid <= 0)
|
|
{
|
|
Main.tile[i, j].liquid = 255;
|
|
Main.tile[i, j].lava(false);
|
|
}
|
|
}
|
|
}
|
|
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AbyssGravel>(), false, false, false, false, resetFrame);
|
|
return false;
|
|
}
|
|
}
|
|
}
|