Vastly increased readability of all tile code, reorganized functions into different classes and made all functions either internal or guaranteed stable when called independently.
56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
|
|
using CalamityMod.Tiles.Astral;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.AstralSnow
|
|
{
|
|
public class AstralIce : ModTile
|
|
{
|
|
public override void SetDefaults()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
Main.tileBrick[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeWithSnow(Type);
|
|
CalamityUtils.MergeAstralTiles(Type);
|
|
|
|
dustType = 173;
|
|
drop = ModContent.ItemType<Items.Placeables.AstralIce>();
|
|
|
|
soundType = 2;
|
|
soundStyle = 50;
|
|
|
|
AddMapEntry(new Color(153, 143, 168));
|
|
|
|
TileID.Sets.Ices[Type] = true;
|
|
TileID.Sets.IcesSlush[Type] = true;
|
|
TileID.Sets.IcesSnow[Type] = true;
|
|
TileID.Sets.ChecksForMerge[Type] = true;
|
|
TileID.Sets.Conversion.Ice[Type] = true;
|
|
TileID.Sets.CanBeClearedDuringOreRunner[Type] = true;
|
|
}
|
|
|
|
public override void NumDust(int i, int j, bool fail, ref int num)
|
|
{
|
|
num = fail ? 1 : 3;
|
|
}
|
|
|
|
public override void FloorVisuals(Player player)
|
|
{
|
|
player.slippy = true;
|
|
base.FloorVisuals(player);
|
|
}
|
|
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType<AstralSnow>(), false, false, false, false, resetFrame);
|
|
return false;
|
|
}
|
|
}
|
|
}
|