55 lines
1.7 KiB
C#
55 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 ProfanedRock : GlowMaskTile
|
|
{
|
|
public const int AnimationFrameWidth = 288;
|
|
|
|
public override string GlowMaskAsset => "CalamityMod/Tiles/FurnitureProfaned/ProfanedRockGlow";
|
|
|
|
public override void SetupStatic()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileMergeDirt[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeDecorativeTiles(Type);
|
|
CalamityUtils.MergeSmoothTiles(Type);
|
|
|
|
HitSound = SoundID.Tink;
|
|
MineResist = 4f;
|
|
MinPick = 225;
|
|
AddMapEntry(new Color(84, 38, 33));
|
|
}
|
|
|
|
|
|
|
|
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 = AnimationFrameWidth * TileFramingSystem.GetVariation4x4_012_Low0(i, j);
|
|
}
|
|
|
|
public override Color GetGlowMaskColor(int i, int j, TileDrawInfo drawData)
|
|
{
|
|
return Color.White * 0.098f;
|
|
}
|
|
}
|
|
}
|