Files
CalamityModPublic/Tiles/Astral/NovaeSlag.cs
T

52 lines
1.7 KiB
C#

using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Tiles.Astral
{
[LegacyName("AstralSilt")]
public class NovaeSlag : ModTile
{
public override void SetStaticDefaults()
{
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
CalamityUtils.MergeWithGeneral(Type);
CalamityUtils.MergeAstralTiles(Type);
CalamityUtils.MergeWithOres(Type);
DustType = ModContent.DustType<AstralBasic>();
ItemDrop = ModContent.ItemType<Items.Placeables.NovaeSlag>();
ModTranslation name = CreateMapEntryName();
name.SetDefault("Novae Slag");
AddMapEntry(new Color(133, 69, 115));
TileID.Sets.ChecksForMerge[Type] = true;
TileID.Sets.CanBeClearedDuringOreRunner[Type] = true;
TileID.Sets.CanBeDugByShovel[Type] = true;
}
public override bool CreateDust(int i, int j, ref int type)
{
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<AstralBlue>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<AstralOrange>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
return false;
}
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
{
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AstralDirt>(), false, false, false);
return false;
}
public override void NumDust(int i, int j, bool fail, ref int num)
{
num = fail ? 1 : 3;
}
}
}