53 lines
1.7 KiB
C#
53 lines
1.7 KiB
C#
|
|
using CalamityMod.Dusts.Furniture;
|
|
using CalamityMod.Systems;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.FurnitureProfaned
|
|
{
|
|
public class RunicProfanedBrick : GlowMaskTile
|
|
{
|
|
public const int AnimationFrameWidth = 234;
|
|
|
|
public override string GlowMaskAsset => "CalamityMod/Tiles/FurnitureProfaned/RunicProfanedBrickGlow";
|
|
|
|
public override void SetupStatic()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeDecorativeTiles(Type);
|
|
CalamityUtils.MergeSmoothTiles(Type);
|
|
|
|
HitSound = SoundID.Tink;
|
|
MineResist = 2f;
|
|
AddMapEntry(new Color(122, 66, 59));
|
|
AnimationFrameHeight = 90;
|
|
}
|
|
|
|
public override bool CreateDust(int i, int j, ref int type)
|
|
{
|
|
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.GoldCoin, 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
|
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType<ProfanedTileRock>(), 0f, 0f, 1, new Color(255, 255, 255), 1f);
|
|
return false;
|
|
}
|
|
|
|
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
|
|
{
|
|
frameXOffset = i % 2 * AnimationFrameWidth;
|
|
frameYOffset = j % 2 * AnimationFrameHeight;
|
|
}
|
|
|
|
public override Color GetGlowMaskColor(int i, int j, TileDrawInfo drawData)
|
|
{
|
|
return Color.White * 0.5f;
|
|
}
|
|
}
|
|
}
|