diff --git a/Items/Placeables/SulphurousSand.cs b/Items/Placeables/SulphurousSand.cs index e9550ae575..4603a35257 100644 --- a/Items/Placeables/SulphurousSand.cs +++ b/Items/Placeables/SulphurousSand.cs @@ -21,5 +21,15 @@ namespace CalamityMod.Items.Placeables item.height = 10; item.maxStack = 999; } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(18); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.SetResult(this); + recipe.AddRecipe(); + base.AddRecipes(); + } } } diff --git a/Items/Placeables/SulphurousSandstone.cs b/Items/Placeables/SulphurousSandstone.cs new file mode 100644 index 0000000000..854db54095 --- /dev/null +++ b/Items/Placeables/SulphurousSandstone.cs @@ -0,0 +1,35 @@ +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables +{ + public class SulphurousSandstone : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sulphurous Sandstone"); + } + + public override void SetDefaults() + { + item.createTile = ModContent.TileType(); + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.width = 13; + item.height = 10; + item.maxStack = 999; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(18); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.SetResult(this); + recipe.AddRecipe(); + base.AddRecipes(); + } + } +} diff --git a/Items/Placeables/SulphurousSandstone.png b/Items/Placeables/SulphurousSandstone.png new file mode 100644 index 0000000000..26581b34dc Binary files /dev/null and b/Items/Placeables/SulphurousSandstone.png differ diff --git a/Items/Placeables/Walls/SulphurousSandWall.cs b/Items/Placeables/Walls/SulphurousSandWall.cs new file mode 100644 index 0000000000..0a29b7bfd0 --- /dev/null +++ b/Items/Placeables/Walls/SulphurousSandWall.cs @@ -0,0 +1,36 @@ +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +namespace CalamityMod.Items.Placeables.Walls +{ + public class SulphurousSandWall : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sulphurous Sand Wall"); + } + + public override void SetDefaults() + { + item.createWall = ModContent.WallType(); + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.width = 16; + item.height = 16; + item.maxStack = 999; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(18); + recipe.AddIngredient(ModContent.ItemType()); + recipe.SetResult(this, 4); + recipe.AddRecipe(); + base.AddRecipes(); + } + } +} diff --git a/Items/Placeables/Walls/SulphurousSandWall.png b/Items/Placeables/Walls/SulphurousSandWall.png new file mode 100644 index 0000000000..b601fb2d9b Binary files /dev/null and b/Items/Placeables/Walls/SulphurousSandWall.png differ diff --git a/Items/Placeables/Walls/SulphurousSandstoneWall.cs b/Items/Placeables/Walls/SulphurousSandstoneWall.cs new file mode 100644 index 0000000000..a124416ed5 --- /dev/null +++ b/Items/Placeables/Walls/SulphurousSandstoneWall.cs @@ -0,0 +1,36 @@ +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +namespace CalamityMod.Items.Placeables.Walls +{ + public class SulphurousSandstoneWall : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Sulphurous Sandstone Wall"); + } + + public override void SetDefaults() + { + item.createWall = ModContent.WallType(); + item.useStyle = 1; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.width = 16; + item.height = 16; + item.maxStack = 999; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(18); + recipe.AddIngredient(ModContent.ItemType()); + recipe.SetResult(this, 4); + recipe.AddRecipe(); + base.AddRecipes(); + } + } +} diff --git a/Items/Placeables/Walls/SulphurousSandstoneWall.png b/Items/Placeables/Walls/SulphurousSandstoneWall.png new file mode 100644 index 0000000000..0f48c79853 Binary files /dev/null and b/Items/Placeables/Walls/SulphurousSandstoneWall.png differ diff --git a/Tiles/Abyss/SulphurousSand.cs b/Tiles/Abyss/SulphurousSand.cs index bf21084144..b0ecd7fbe4 100644 --- a/Tiles/Abyss/SulphurousSand.cs +++ b/Tiles/Abyss/SulphurousSand.cs @@ -12,7 +12,6 @@ namespace CalamityMod.Tiles.Abyss public override void SetDefaults() { Main.tileSolid[Type] = true; - Main.tileMergeDirt[Type] = true; Main.tileBlockLight[Type] = true; CalamityUtils.MergeWithGeneral(Type); @@ -20,9 +19,7 @@ namespace CalamityMod.Tiles.Abyss dustType = 32; drop = ModContent.ItemType(); - ModTranslation name = CreateMapEntryName(); - name.SetDefault("Sulphurous Sand"); - AddMapEntry(new Color(150, 100, 50), name); + AddMapEntry(new Color(150, 100, 50)); mineResist = 1f; minPick = 55; soundType = 0; @@ -189,7 +186,7 @@ namespace CalamityMod.Tiles.Abyss public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/Abyss/SulphurousSand.png b/Tiles/Abyss/SulphurousSand.png index adef70cc82..180882767c 100644 Binary files a/Tiles/Abyss/SulphurousSand.png and b/Tiles/Abyss/SulphurousSand.png differ diff --git a/Tiles/Abyss/SulphurousSandstone.cs b/Tiles/Abyss/SulphurousSandstone.cs new file mode 100644 index 0000000000..9c5856c996 --- /dev/null +++ b/Tiles/Abyss/SulphurousSandstone.cs @@ -0,0 +1,37 @@ + +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Abyss +{ + public class SulphurousSandstone : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeWithAbyss(Type); + + dustType = 32; + drop = ModContent.ItemType(); + AddMapEntry(new Color(113, 90, 71)); + mineResist = 1f; + minPick = 55; + soundType = 0; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.CustomMergeFrame(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + return false; + } + } +} diff --git a/Tiles/Abyss/SulphurousSandstone.png b/Tiles/Abyss/SulphurousSandstone.png new file mode 100644 index 0000000000..65eb36a150 Binary files /dev/null and b/Tiles/Abyss/SulphurousSandstone.png differ diff --git a/Tiles/FurnitureOccult/OccultStone.cs b/Tiles/FurnitureOccult/OccultStone.cs index 920adf1bd6..e25dbcad83 100644 --- a/Tiles/FurnitureOccult/OccultStone.cs +++ b/Tiles/FurnitureOccult/OccultStone.cs @@ -36,8 +36,9 @@ namespace CalamityMod.Tiles.FurnitureOccult public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - if (Main.tile[i - 1, j - 1].type != Type || Main.tile[i, j - 1].type != Type || Main.tile[i + 1, j - 1].type != Type || - Main.tile[i - 1, j - 2].type != Type || Main.tile[i, j - 2].type != Type || Main.tile[i + 1, j - 2].type != Type) + if ((Main.tile[i - 1, j - 1].type != Type || Main.tile[i, j - 1].type != Type || Main.tile[i + 1, j - 1].type != Type || + Main.tile[i - 1, j - 2].type != Type || Main.tile[i, j - 2].type != Type || Main.tile[i + 1, j - 2].type != Type) && + nextSpecialDrawIndex < Main.specX.Length) { Main.specX[nextSpecialDrawIndex] = i; Main.specY[nextSpecialDrawIndex] = j; diff --git a/Tiles/UelibloomBrick.cs b/Tiles/UelibloomBrick.cs index 8143c2eb61..7a672a1688 100644 --- a/Tiles/UelibloomBrick.cs +++ b/Tiles/UelibloomBrick.cs @@ -35,8 +35,9 @@ namespace CalamityMod.Tiles public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - if (Main.tile[i - 1, j - 1].type != Type || Main.tile[i, j - 1].type != Type || Main.tile[i + 1, j - 1].type != Type || - Main.tile[i - 1, j - 2].type != Type || Main.tile[i, j - 2].type != Type || Main.tile[i + 1, j - 2].type != Type) + if ((Main.tile[i - 1, j - 1].type != Type || Main.tile[i, j - 1].type != Type || Main.tile[i + 1, j - 1].type != Type || + Main.tile[i - 1, j - 2].type != Type || Main.tile[i, j - 2].type != Type || Main.tile[i + 1, j - 2].type != Type) && + nextSpecialDrawIndex < Main.specX.Length) { Main.specX[nextSpecialDrawIndex] = i; Main.specY[nextSpecialDrawIndex] = j; diff --git a/Utilities/CalamityUtils.cs b/Utilities/CalamityUtils.cs index a9943658ca..1caae24bfc 100644 --- a/Utilities/CalamityUtils.cs +++ b/Utilities/CalamityUtils.cs @@ -775,6 +775,7 @@ namespace CalamityMod public static void MergeWithAbyss(int type) => MergeWithSet(type, new int[] { // Sulphurous Sea ModContent.TileType(), + ModContent.TileType(), // Abyss ModContent.TileType(), ModContent.TileType(), diff --git a/Utilities/TileFraming.cs b/Utilities/TileFraming.cs index 0e25329b94..1ccf5a7cc1 100644 --- a/Utilities/TileFraming.cs +++ b/Utilities/TileFraming.cs @@ -90,8 +90,9 @@ namespace CalamityMod tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; - tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; + tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; + tileMergeTypes[ModContent.TileType()][ModContent.TileType()] = true; } internal static void Unload() diff --git a/Walls/SulphurousSandWall.cs b/Walls/SulphurousSandWall.cs new file mode 100644 index 0000000000..446180d572 --- /dev/null +++ b/Walls/SulphurousSandWall.cs @@ -0,0 +1,29 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class SulphurousSandWall : ModWall + { + public override void SetDefaults() + { + dustType = 32; + AddMapEntry(new Color(84, 71, 46)); + } + + public override void RandomUpdate(int i, int j) + { + if (Main.tile[i, j].liquid <= 0) + { + Main.tile[i, j].liquid = 255; + Main.tile[i, j].lava(false); + } + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/SulphurousSandWall.png b/Walls/SulphurousSandWall.png new file mode 100644 index 0000000000..026db27ffb Binary files /dev/null and b/Walls/SulphurousSandWall.png differ diff --git a/Walls/SulphurousSandWallSafe.cs b/Walls/SulphurousSandWallSafe.cs new file mode 100644 index 0000000000..dfaf18edd4 --- /dev/null +++ b/Walls/SulphurousSandWallSafe.cs @@ -0,0 +1,22 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class SulphurousSandWallSafe : ModWall + { + public override void SetDefaults() + { + Main.wallHouse[Type] = true; + dustType = 32; + drop = ModContent.ItemType(); + AddMapEntry(new Color(84, 71, 46)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/SulphurousSandWallSafe.png b/Walls/SulphurousSandWallSafe.png new file mode 100644 index 0000000000..026db27ffb Binary files /dev/null and b/Walls/SulphurousSandWallSafe.png differ diff --git a/Walls/SulphurousSandstoneWall.cs b/Walls/SulphurousSandstoneWall.cs new file mode 100644 index 0000000000..52b06e4162 --- /dev/null +++ b/Walls/SulphurousSandstoneWall.cs @@ -0,0 +1,29 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class SulphurousSandstoneWall : ModWall + { + public override void SetDefaults() + { + dustType = 32; + AddMapEntry(new Color(57, 45, 38)); + } + + public override void RandomUpdate(int i, int j) + { + if (Main.tile[i, j].liquid <= 0) + { + Main.tile[i, j].liquid = 255; + Main.tile[i, j].lava(false); + } + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/SulphurousSandstoneWall.png b/Walls/SulphurousSandstoneWall.png new file mode 100644 index 0000000000..aab99881fb Binary files /dev/null and b/Walls/SulphurousSandstoneWall.png differ diff --git a/Walls/SulphurousSandstoneWallSafe.cs b/Walls/SulphurousSandstoneWallSafe.cs new file mode 100644 index 0000000000..48e6de9509 --- /dev/null +++ b/Walls/SulphurousSandstoneWallSafe.cs @@ -0,0 +1,22 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class SulphurousSandstoneWallSafe : ModWall + { + public override void SetDefaults() + { + Main.wallHouse[Type] = true; + dustType = 32; + drop = ModContent.ItemType(); + AddMapEntry(new Color(57, 45, 38)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/SulphurousSandstoneWallSafe.png b/Walls/SulphurousSandstoneWallSafe.png new file mode 100644 index 0000000000..aab99881fb Binary files /dev/null and b/Walls/SulphurousSandstoneWallSafe.png differ