Vastly increased readability of all tile code, reorganized functions into different classes and made all functions either internal or guaranteed stable when called independently.
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
|
|
using CalamityMod.Dusts;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.Astral
|
|
{
|
|
public class AstralStone : ModTile
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
Main.tileBrick[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeAstralTiles(Type);
|
|
CalamityUtils.MergeWithOres(Type);
|
|
|
|
dustType = ModContent.DustType<AstralBasic>();
|
|
drop = ModContent.ItemType<Items.Placeables.AstralStone>();
|
|
|
|
soundType = 21;
|
|
|
|
AddMapEntry(new Color(45, 36, 63));
|
|
|
|
TileID.Sets.Stone[Type] = true;
|
|
TileID.Sets.Conversion.Stone[Type] = true;
|
|
TileID.Sets.CanBeClearedDuringOreRunner[Type] = true;
|
|
}
|
|
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AstralDirt>());
|
|
return false;
|
|
}
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num)
|
|
{
|
|
num = fail ? 1 : 3;
|
|
}
|
|
}
|
|
}
|