Files
CalamityModPublic/Tiles/SunkenSea/EutrophicSand.cs
T
Ozzatron 88c6fd68ec Refactored all tile code, mostly null safety
Vastly increased readability of all tile code, reorganized functions into different classes and made all functions either internal or guaranteed stable when called independently.
2019-11-30 13:57:32 -05:00

52 lines
1.5 KiB
C#

using CalamityMod.World;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Tiles.SunkenSea
{
public class EutrophicSand : 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 = 108;
drop = ModContent.ItemType<Items.Placeables.EutrophicSand>();
ModTranslation name = CreateMapEntryName();
name.SetDefault("Eutrophic Sand");
AddMapEntry(new Color(100, 100, 150), name);
mineResist = 2f;
}
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)
{
// CustomTileFraming.CustomMergeFrame(i, j, Type, TileID.Sandstone, false, false, false, false, resetFrame);
TileFraming.CustomMergeFrame(i, j, Type, TileID.Sandstone);
return false;
}
}
}