Vastly increased readability of all tile code, reorganized functions into different classes and made all functions either internal or guaranteed stable when called independently.
52 lines
1.5 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|