- Consistent cage map colors to vanilla - Consistent map entry with Thank You painting - Removed map entry names from vines - Removed map entry names from some common decorative blocks - Cleaned up the other furnitures and item drops
68 lines
2.4 KiB
C#
68 lines
2.4 KiB
C#
using CalamityMod.Tiles.Astral;
|
|
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using Terraria;
|
|
using Terraria.GameContent.Metadata;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.AstralSnow
|
|
{
|
|
public class AstralIce : ModTile
|
|
{
|
|
public byte[,] tileAdjacency;
|
|
public byte[,] secondTileAdjacency;
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
Main.tileBrick[Type] = true;
|
|
TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Ice"]);
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeWithSnow(Type);
|
|
CalamityUtils.MergeAstralTiles(Type);
|
|
|
|
DustType = 173;
|
|
|
|
HitSound = SoundID.Item50;
|
|
|
|
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;
|
|
|
|
TileFraming.SetUpUniversalMerge(Type, ModContent.TileType<AstralSnow>(), out tileAdjacency);
|
|
TileFraming.SetUpUniversalMerge(Type, ModContent.TileType<AstralDirt>(), out secondTileAdjacency);
|
|
}
|
|
|
|
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 void PostDraw(int i, int j, SpriteBatch spriteBatch)
|
|
{
|
|
TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/AstralDirtMerge");
|
|
TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/AstralSnowMerge");
|
|
}
|
|
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
TileFraming.GetAdjacencyData(i, j, ModContent.TileType<AstralSnow>(), out tileAdjacency[i, j]);
|
|
TileFraming.GetAdjacencyData(i, j, ModContent.TileType<AstralDirt>(), out secondTileAdjacency[i, j]);
|
|
return true;
|
|
}
|
|
}
|
|
}
|