2 - Re-enable universal tile merging system. 3 - Move all tile framing into a ModSystem for consistent unloading. 4 - Move all recipe management into a ModSystem. 5 - Moved some framing stuff from CalamityGlobalTile into the sealed GlobalTile. 6 - CalamityRecipes and TileFraming no longer exist (they are now RecipeSystem and TileFramingSystem).
63 lines
2.1 KiB
C#
63 lines
2.1 KiB
C#
using CalamityMod.Systems;
|
|
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Tiles.SunkenSea
|
|
{
|
|
public class Basalt : ModTile
|
|
{
|
|
private int sheetWidth = 234;
|
|
private int sheetHeight = 90;
|
|
|
|
public byte[,] tileAdjacency;
|
|
public byte[,] secondTileAdjacency;
|
|
public byte[,] thirdTileAdjacency;
|
|
public byte[,] fourthTileAdjacency;
|
|
|
|
public override void SetStaticDefaults()
|
|
{
|
|
TileID.Sets.GeneralPlacementTiles[Type] = false;
|
|
|
|
Main.tileSolid[Type] = true;
|
|
Main.tileBlockLight[Type] = true;
|
|
Main.tileShine2[Type] = true;
|
|
|
|
CalamityUtils.MergeWithGeneral(Type);
|
|
CalamityUtils.MergeWithDesert(Type);
|
|
|
|
DustType = 36;
|
|
HitSound = SoundID.Tink;
|
|
|
|
AddMapEntry(new Color(58, 55, 70));
|
|
|
|
MinPick = 100;
|
|
|
|
// 02JUN2024: Ozzatron: RuneSand has no merge
|
|
// TileFraming.SetUpUniversalMerge(Type, ModContent.TileType<RuneSand>(), out tileAdjacency);
|
|
this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge");
|
|
this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge");
|
|
this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge");
|
|
}
|
|
|
|
public override bool CreateDust(int i, int j, ref int type)
|
|
{
|
|
Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, 1, 0f, 0f, 1, new Color(100, 100, 100), 1f);
|
|
return false;
|
|
}
|
|
|
|
public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
|
|
{
|
|
frameXOffset = i % 4 * sheetWidth;
|
|
frameYOffset = j % 4 * sheetHeight;
|
|
}
|
|
|
|
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
|
|
{
|
|
// 02JUN2024: Ozzatron: unclear if this is the correct framing strategy for Basalt
|
|
return TileFramingSystem.BetterGemsparkFraming(i, j, resetFrame);
|
|
}
|
|
}
|
|
}
|