diff --git a/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs b/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs index b48bebaf5e..e22c63e89d 100644 --- a/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs +++ b/Items/Fishing/SunkenSeaCatches/SunkenCrate.cs @@ -51,6 +51,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches // Materials itemLoot.Add(ModContent.ItemType(), 1, 10, 30); itemLoot.Add(ModContent.ItemType(), 1, 10, 30); + itemLoot.Add(ModContent.ItemType(), 1, 30, 60); postDesertScourge.Add(ModContent.ItemType(), 1, 5, 10); postDesertScourge.Add(ModContent.ItemType(), 5, 2, 5); postHardmodeClam.Add(ModContent.ItemType(), new Fraction(12, 100), 2, 5); diff --git a/Items/Placeables/Basalt.cs b/Items/Placeables/Basalt.cs new file mode 100644 index 0000000000..487fd1f7ac --- /dev/null +++ b/Items/Placeables/Basalt.cs @@ -0,0 +1,28 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class Basalt : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + } +} diff --git a/Items/Placeables/Basalt.png b/Items/Placeables/Basalt.png new file mode 100644 index 0000000000..3f4786a23a Binary files /dev/null and b/Items/Placeables/Basalt.png differ diff --git a/Items/Placeables/BlackPearlPile.cs b/Items/Placeables/BlackPearlPile.cs new file mode 100644 index 0000000000..2f44d3cd68 --- /dev/null +++ b/Items/Placeables/BlackPearlPile.cs @@ -0,0 +1,37 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class BlackPearlPile : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.rare = ItemRarityID.Blue; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(4). + AddIngredient(ItemID.BlackPearl). + AddTile(TileID.HeavyWorkBench). + Register(); + } + } +} diff --git a/Items/Placeables/BlackPearlPile.png b/Items/Placeables/BlackPearlPile.png new file mode 100644 index 0000000000..c35a65ebbc Binary files /dev/null and b/Items/Placeables/BlackPearlPile.png differ diff --git a/Items/Placeables/Driftwood.cs b/Items/Placeables/Driftwood.cs new file mode 100644 index 0000000000..42236e7ea9 --- /dev/null +++ b/Items/Placeables/Driftwood.cs @@ -0,0 +1,34 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class Driftwood : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.Wood; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup) + { + itemGroup = ContentSamples.CreativeHelper.ItemGroup.Wood; + } + } +} diff --git a/Items/Placeables/Driftwood.png b/Items/Placeables/Driftwood.png new file mode 100644 index 0000000000..25ff08f299 Binary files /dev/null and b/Items/Placeables/Driftwood.png differ diff --git a/Items/Placeables/PinkPearlPile.cs b/Items/Placeables/PinkPearlPile.cs new file mode 100644 index 0000000000..2307018521 --- /dev/null +++ b/Items/Placeables/PinkPearlPile.cs @@ -0,0 +1,37 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class PinkPearlPile : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.rare = ItemRarityID.Blue; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(4). + AddIngredient(ItemID.PinkPearl). + AddTile(TileID.HeavyWorkBench). + Register(); + } + } +} diff --git a/Items/Placeables/PinkPearlPile.png b/Items/Placeables/PinkPearlPile.png new file mode 100644 index 0000000000..1b346005d3 Binary files /dev/null and b/Items/Placeables/PinkPearlPile.png differ diff --git a/Items/Placeables/PolishedNavystoneBrick.cs b/Items/Placeables/PolishedNavystoneBrick.cs new file mode 100644 index 0000000000..d8866493c8 --- /dev/null +++ b/Items/Placeables/PolishedNavystoneBrick.cs @@ -0,0 +1,36 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class PolishedNavystoneBrick : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(2). + AddTile(TileID.Furnaces). + Register(); + } + } +} diff --git a/Items/Placeables/PolishedNavystoneBrick.png b/Items/Placeables/PolishedNavystoneBrick.png new file mode 100644 index 0000000000..7bb337525e Binary files /dev/null and b/Items/Placeables/PolishedNavystoneBrick.png differ diff --git a/Items/Placeables/Shellstone.cs b/Items/Placeables/Shellstone.cs new file mode 100644 index 0000000000..c3d3cce026 --- /dev/null +++ b/Items/Placeables/Shellstone.cs @@ -0,0 +1,29 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class Shellstone : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + } +} diff --git a/Items/Placeables/Shellstone.png b/Items/Placeables/Shellstone.png new file mode 100644 index 0000000000..12c46ba411 Binary files /dev/null and b/Items/Placeables/Shellstone.png differ diff --git a/Items/Placeables/ShellstoneSlab.cs b/Items/Placeables/ShellstoneSlab.cs new file mode 100644 index 0000000000..4ddac14904 --- /dev/null +++ b/Items/Placeables/ShellstoneSlab.cs @@ -0,0 +1,41 @@ +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class ShellstoneSlab : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(). + AddTile(TileID.HeavyWorkBench). + Register(); + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/ShellstoneSlab.png b/Items/Placeables/ShellstoneSlab.png new file mode 100644 index 0000000000..de0ea708a5 Binary files /dev/null and b/Items/Placeables/ShellstoneSlab.png differ diff --git a/Items/Placeables/TimelessSand.cs b/Items/Placeables/TimelessSand.cs new file mode 100644 index 0000000000..ec2fb7c1e7 --- /dev/null +++ b/Items/Placeables/TimelessSand.cs @@ -0,0 +1,29 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class TimelessSand : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + } +} diff --git a/Items/Placeables/TimelessSand.png b/Items/Placeables/TimelessSand.png new file mode 100644 index 0000000000..60335c3ac5 Binary files /dev/null and b/Items/Placeables/TimelessSand.png differ diff --git a/Items/Placeables/Walls/ShellstoneSlabWall.cs b/Items/Placeables/Walls/ShellstoneSlabWall.cs new file mode 100644 index 0000000000..2cfe2a0d1c --- /dev/null +++ b/Items/Placeables/Walls/ShellstoneSlabWall.cs @@ -0,0 +1,37 @@ +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +using Terraria.ID; + +namespace CalamityMod.Items.Placeables.Walls +{ + public class ShellstoneSlabWall : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 400; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 7; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createWall = ModContent.WallType(); + } + + public override void AddRecipes() + { + CreateRecipe(4). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/Walls/ShellstoneSlabWall.png b/Items/Placeables/Walls/ShellstoneSlabWall.png new file mode 100644 index 0000000000..ceb19599d8 Binary files /dev/null and b/Items/Placeables/Walls/ShellstoneSlabWall.png differ diff --git a/Items/Placeables/WhitePearlPile.cs b/Items/Placeables/WhitePearlPile.cs new file mode 100644 index 0000000000..2c771bf04d --- /dev/null +++ b/Items/Placeables/WhitePearlPile.cs @@ -0,0 +1,37 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables +{ + public class WhitePearlPile : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.rare = ItemRarityID.Blue; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(4). + AddIngredient(ItemID.WhitePearl). + AddTile(TileID.HeavyWorkBench). + Register(); + } + } +} diff --git a/Items/Placeables/WhitePearlPile.png b/Items/Placeables/WhitePearlPile.png new file mode 100644 index 0000000000..3a896ab3da Binary files /dev/null and b/Items/Placeables/WhitePearlPile.png differ diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index 894da34193..17849fe9b1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -3453,3 +3453,53 @@ WaterTurret: { Cannot attack while a boss is alive ''' } + +ShellstoneSlabWall: { + Tooltip: "" + DisplayName: Shellstone Slab Wall +} + +ShellstoneSlab: { + Tooltip: "" + DisplayName: Shellstone Slab +} + +Shellstone: { + DisplayName: Shellstone + Tooltip: "" +} + +TimelessSand: { + DisplayName: Timeless Sand + Tooltip: "" +} + +Basalt: { + DisplayName: Basalt + Tooltip: "" +} + +PolishedNavystoneBrick: { + DisplayName: Polished Navystone Brick + Tooltip: "" +} + +Driftwood: { + DisplayName: Driftwood + Tooltip: "" +} + +BlackPearlPile: { + DisplayName: Black Pearl Pile + Tooltip: "" +} + +PinkPearlPile: { + DisplayName: Pink Pearl Pile + Tooltip: "" +} + +WhitePearlPile: { + DisplayName: White Pearl Pile + Tooltip: "" +} diff --git a/Tiles/SunkenSea/Basalt.cs b/Tiles/SunkenSea/Basalt.cs new file mode 100644 index 0000000000..cba7751fba --- /dev/null +++ b/Tiles/SunkenSea/Basalt.cs @@ -0,0 +1,67 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; + +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() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); + + DustType = 36; + HitSound = SoundID.Tink; + + AddMapEntry(new Color(58, 55, 70)); + + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out fourthTileAdjacency); + } + + 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 void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/TimelessSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out thirdTileAdjacency[i, j]); + return true; + } + } +} diff --git a/Tiles/SunkenSea/Basalt.png b/Tiles/SunkenSea/Basalt.png new file mode 100644 index 0000000000..05a9bf9830 Binary files /dev/null and b/Tiles/SunkenSea/Basalt.png differ diff --git a/Tiles/SunkenSea/BlackPearlPile.cs b/Tiles/SunkenSea/BlackPearlPile.cs new file mode 100644 index 0000000000..30e325be89 --- /dev/null +++ b/Tiles/SunkenSea/BlackPearlPile.cs @@ -0,0 +1,53 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class BlackPearlPile : ModTile + { + public byte[,] tileAdjacency; + public byte[,] secondTileAdjacency; + public byte[,] thirdTileAdjacency; + public byte[,] fourthTileAdjacency; + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + + TileID.Sets.ChecksForMerge[Type] = true; + HitSound = SoundID.Shatter; + DustType = 82; + AddMapEntry(new Color(29, 33, 38)); + + TileID.Sets.CanBeDugByShovel[Type] = true; + + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out fourthTileAdjacency); + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/TimelessSandMerge"); + //TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/ShellstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/NavystoneMerge"); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out fourthTileAdjacency[i, j]); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/BlackPearlPile.png b/Tiles/SunkenSea/BlackPearlPile.png new file mode 100644 index 0000000000..9e0e102c2c Binary files /dev/null and b/Tiles/SunkenSea/BlackPearlPile.png differ diff --git a/Tiles/SunkenSea/Driftwood.cs b/Tiles/SunkenSea/Driftwood.cs new file mode 100644 index 0000000000..fa6ae4901c --- /dev/null +++ b/Tiles/SunkenSea/Driftwood.cs @@ -0,0 +1,60 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.Metadata; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class Driftwood : ModTile + { + public byte[,] tileAdjacency; + public byte[,] secondTileAdjacency; + public byte[,] thirdTileAdjacency; + public byte[,] fourthTileAdjacency; + public byte[,] fifthTileAdjacency; + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = false; + Main.tileBlockLight[Type] = true; + TileMaterials.SetForTileId(Type, TileMaterials._materialsByName["Wood"]); + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithDesert(Type); + + TileID.Sets.ChecksForMerge[Type] = true; + HitSound = SoundID.Dig; + DustType = 121; + AddMapEntry(new Color(136, 129, 154)); + + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out fourthTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out fifthTileAdjacency); + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/TimelessSandMerge"); + //TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/ShellstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fifthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, out fourthTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out fifthTileAdjacency[i, j]); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/Driftwood.png b/Tiles/SunkenSea/Driftwood.png new file mode 100644 index 0000000000..d128a364a4 Binary files /dev/null and b/Tiles/SunkenSea/Driftwood.png differ diff --git a/Tiles/SunkenSea/PinkPearlPile.cs b/Tiles/SunkenSea/PinkPearlPile.cs new file mode 100644 index 0000000000..bac12200c6 --- /dev/null +++ b/Tiles/SunkenSea/PinkPearlPile.cs @@ -0,0 +1,53 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class PinkPearlPile : ModTile + { + public byte[,] tileAdjacency; + public byte[,] secondTileAdjacency; + public byte[,] thirdTileAdjacency; + public byte[,] fourthTileAdjacency; + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + + TileID.Sets.ChecksForMerge[Type] = true; + HitSound = SoundID.Shatter; + DustType = 119; + AddMapEntry(new Color(204, 143, 174)); + + TileID.Sets.CanBeDugByShovel[Type] = true; + + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out fourthTileAdjacency); + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/TimelessSandMerge"); + //TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/ShellstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/NavystoneMerge"); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out fourthTileAdjacency[i, j]); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/PinkPearlPile.png b/Tiles/SunkenSea/PinkPearlPile.png new file mode 100644 index 0000000000..6fac3acc57 Binary files /dev/null and b/Tiles/SunkenSea/PinkPearlPile.png differ diff --git a/Tiles/SunkenSea/PolishedNavystoneBrick.cs b/Tiles/SunkenSea/PolishedNavystoneBrick.cs new file mode 100644 index 0000000000..3e8057fc3c --- /dev/null +++ b/Tiles/SunkenSea/PolishedNavystoneBrick.cs @@ -0,0 +1,27 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class PolishedNavystoneBrick : ModTile + { + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + + HitSound = SoundID.Tink; + DustType = 96; + AddMapEntry(new Color(53, 99, 117)); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/PolishedNavystoneBrick.png b/Tiles/SunkenSea/PolishedNavystoneBrick.png new file mode 100644 index 0000000000..6707f33131 Binary files /dev/null and b/Tiles/SunkenSea/PolishedNavystoneBrick.png differ diff --git a/Tiles/SunkenSea/Shellstone.cs b/Tiles/SunkenSea/Shellstone.cs new file mode 100644 index 0000000000..8aa9f24683 --- /dev/null +++ b/Tiles/SunkenSea/Shellstone.cs @@ -0,0 +1,52 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class Shellstone : ModTile + { + public byte[,] tileAdjacency; + public byte[,] secondTileAdjacency; + public byte[,] thirdTileAdjacency; + public byte[,] fourthTileAdjacency; + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); + + TileID.Sets.ChecksForMerge[Type] = true; + HitSound = SoundID.Tink; + DustType = 17; + AddMapEntry(new Color(136, 129, 154)); + + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out fourthTileAdjacency); + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/TimelessSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out fourthTileAdjacency[i, j]); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/Shellstone.png b/Tiles/SunkenSea/Shellstone.png new file mode 100644 index 0000000000..95d8bdd2d2 Binary files /dev/null and b/Tiles/SunkenSea/Shellstone.png differ diff --git a/Tiles/SunkenSea/ShellstoneSlab.cs b/Tiles/SunkenSea/ShellstoneSlab.cs new file mode 100644 index 0000000000..0a12ea9466 --- /dev/null +++ b/Tiles/SunkenSea/ShellstoneSlab.cs @@ -0,0 +1,27 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class ShellstoneSlab : ModTile + { + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + + HitSound = SoundID.Tink; + DustType = 17; + AddMapEntry(new Color(156, 191, 199)); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/ShellstoneSlab.png b/Tiles/SunkenSea/ShellstoneSlab.png new file mode 100644 index 0000000000..8266d74f7e Binary files /dev/null and b/Tiles/SunkenSea/ShellstoneSlab.png differ diff --git a/Tiles/SunkenSea/TimelessSand.cs b/Tiles/SunkenSea/TimelessSand.cs new file mode 100644 index 0000000000..4ede772d45 --- /dev/null +++ b/Tiles/SunkenSea/TimelessSand.cs @@ -0,0 +1,54 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class TimelessSand : ModTile + { + public byte[,] tileAdjacency; + public byte[,] secondTileAdjacency; + public byte[,] thirdTileAdjacency; + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithDesert(Type); + + TileID.Sets.ChecksForMerge[Type] = true; + TileID.Sets.CanBeDugByShovel[Type] = true; + + DustType = 147; + AddMapEntry(new Color(210, 124, 45)); + + TileFraming.SetUpUniversalMerge(Type, TileID.Sandstone, out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.Sand, out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, TileID.HardenedSand, out thirdTileAdjacency); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/SandstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/SandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, TileID.Sandstone, out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.Sand, out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, TileID.HardenedSand, out thirdTileAdjacency[i, j]); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/TimelessSand.png b/Tiles/SunkenSea/TimelessSand.png new file mode 100644 index 0000000000..f1124ccd62 Binary files /dev/null and b/Tiles/SunkenSea/TimelessSand.png differ diff --git a/Tiles/SunkenSea/WhitePearlPile.cs b/Tiles/SunkenSea/WhitePearlPile.cs new file mode 100644 index 0000000000..08c59f0db1 --- /dev/null +++ b/Tiles/SunkenSea/WhitePearlPile.cs @@ -0,0 +1,53 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class WhitePearlPile : ModTile + { + public byte[,] tileAdjacency; + public byte[,] secondTileAdjacency; + public byte[,] thirdTileAdjacency; + public byte[,] fourthTileAdjacency; + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + + TileID.Sets.ChecksForMerge[Type] = true; + HitSound = SoundID.Shatter; + DustType = 149; + AddMapEntry(new Color(217, 209, 213)); + + TileID.Sets.CanBeDugByShovel[Type] = true; + + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out thirdTileAdjacency); + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out fourthTileAdjacency); + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + //TileFraming.DrawUniversalMergeFrames(i, j, tileAdjacency, "CalamityMod/Tiles/Merges/TimelessSandMerge"); + //TileFraming.DrawUniversalMergeFrames(i, j, secondTileAdjacency, "CalamityMod/Tiles/Merges/ShellstoneMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, thirdTileAdjacency, "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + TileFraming.DrawUniversalMergeFrames(i, j, fourthTileAdjacency, "CalamityMod/Tiles/Merges/NavystoneMerge"); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out secondTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out thirdTileAdjacency[i, j]); + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out fourthTileAdjacency[i, j]); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/WhitePearlPile.png b/Tiles/SunkenSea/WhitePearlPile.png new file mode 100644 index 0000000000..f138f2ab3a Binary files /dev/null and b/Tiles/SunkenSea/WhitePearlPile.png differ diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 787f5ee4fc..f368c83b48 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -45,6 +45,7 @@ namespace CalamityMod // Acidwood is Wood RecipeGroup wood = RecipeGroup.recipeGroups[RecipeGroupID.Wood]; wood.ValidItems.Add(ModContent.ItemType()); + wood.ValidItems.Add(ModContent.ItemType()); // Astral Monolith is decidedly not wood-like enough to be used as generic wood. } diff --git a/Walls/ShellstoneSlabWall.cs b/Walls/ShellstoneSlabWall.cs new file mode 100644 index 0000000000..22eb20eebb --- /dev/null +++ b/Walls/ShellstoneSlabWall.cs @@ -0,0 +1,19 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class ShellstoneSlabWall : ModWall + { + public override void SetStaticDefaults() + { + Main.wallHouse[Type] = true; + DustType = 24; + + AddMapEntry(new Color(100, 127, 137)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + } +} diff --git a/Walls/ShellstoneSlabWall.png b/Walls/ShellstoneSlabWall.png new file mode 100644 index 0000000000..3d6e1f138f Binary files /dev/null and b/Walls/ShellstoneSlabWall.png differ