diff --git a/Items/Placeables/AerialiteBrick.png b/Items/Placeables/AerialiteBrick.png index 2ba281c6b7..0e837db271 100644 Binary files a/Items/Placeables/AerialiteBrick.png and b/Items/Placeables/AerialiteBrick.png differ diff --git a/Items/Placeables/AstralClay.cs b/Items/Placeables/AstralClay.cs new file mode 100644 index 0000000000..a802ccdbd8 --- /dev/null +++ b/Items/Placeables/AstralClay.cs @@ -0,0 +1,46 @@ +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables +{ + public class AstralClay : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Astral Clay"); + } + + 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 = 16; + item.height = 16; + item.maxStack = 999; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddIngredient(this, 2); + recipe.AddTile(TileID.Furnaces); + recipe.SetResult(ItemID.Bowl); + recipe.AddRecipe(); + recipe = new ModRecipe(mod); + recipe.AddIngredient(this, 2); + recipe.AddTile(TileID.Furnaces); + recipe.SetResult(ItemID.ClayPot); + recipe.AddRecipe(); + recipe = new ModRecipe(mod); + recipe.AddIngredient(this, 2); + recipe.AddTile(TileID.Furnaces); + recipe.SetResult(ItemID.PinkVase); + recipe.AddRecipe(); + } + } +} diff --git a/Items/Placeables/AstralClay.png b/Items/Placeables/AstralClay.png new file mode 100644 index 0000000000..02e2cd2040 Binary files /dev/null and b/Items/Placeables/AstralClay.png differ diff --git a/Items/Placeables/AstralDirt.png b/Items/Placeables/AstralDirt.png index e52e90eb26..871c6e66e7 100644 Binary files a/Items/Placeables/AstralDirt.png and b/Items/Placeables/AstralDirt.png differ diff --git a/Items/Placeables/AstralFossil.cs b/Items/Placeables/AstralFossil.cs new file mode 100644 index 0000000000..d295db98c9 --- /dev/null +++ b/Items/Placeables/AstralFossil.cs @@ -0,0 +1,161 @@ +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria; +using Terraria.ModLoader; +using CalamityMod.World; + +namespace CalamityMod.Items.Placeables +{ + public class AstralFossil : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Celestial Remains"); + } + + public override void SetDefaults() + { + ItemID.Sets.ExtractinatorMode[item.type] = item.type; + item.createTile = ModContent.TileType(); + 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(), 4); + recipe.SetResult(this, 1); + recipe.AddRecipe(); + base.AddRecipes(); + } + + public override void ExtractinatorUse(ref int resultType, ref int resultStack) + { + /* + Celestial remains will give stardust, fallen stars, ancient bone dust, gems and HM ores always by default + When Astrum Deus has been defeated, it will give Astral Ore + */ + + float val = Main.rand.NextFloat(100); + if (val < 20f) + { + resultType = ItemID.CopperCoin; + resultStack = Main.rand.Next(1, 100); + } + else if (val < 27f) + { + resultType = ItemID.SilverCoin; + resultStack = Main.rand.Next(1, 100); + } + else if (val < 28f) + { + resultType = ItemID.GoldCoin; + resultStack = Main.rand.Next(1, 100); + } + else if (val < 28.03f) + { + resultType = ItemID.PlatinumCoin; + resultStack = Main.rand.Next(1, 11); + } + else if (val < 48.03f) + { + resultType = ModContent.ItemType(); + resultStack = Main.rand.Next(1, 11); + } + else if (val < 58.03f && !Main.dayTime) + { + resultType = ItemID.FallenStar; + resultStack = Main.rand.Next(1, 11); + } + else if (val < 58.03f && !Main.dayTime) + { + resultType = ItemID.FallenStar; + resultStack = Main.rand.Next(1, 11); + } + else if (val < 68.03f) + { + resultType = ModContent.ItemType(); + resultStack = Main.rand.Next(1, 11); + } + else if (val < 69.03f) + { + resultType = ItemID.Diamond; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 70.03f) + { + resultType = ItemID.Ruby; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 71.03f) + { + resultType = ItemID.Topaz; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 72.03f) + { + resultType = ItemID.Emerald; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 73.03f) + { + resultType = ItemID.Sapphire; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 74.03f) + { + resultType = ItemID.Amethyst; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 79.03f) + { + resultType = ItemID.Amber; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 81.78f) + { + resultType = ItemID.PalladiumOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 83.03f) + { + resultType = ItemID.CobaltOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 85.03f) + { + resultType = ItemID.MythrilOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 87.03f) + { + resultType = ItemID.OrichalcumOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 88.78f) + { + resultType = ItemID.AdamantiteOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 89.53f) + { + resultType = ItemID.TitaniumOre; + resultStack = Main.rand.Next(1, 17); + } + else if (CalamityWorld.downedStarGod) + { + resultType = ModContent.ItemType(); + resultStack = Main.rand.Next(1, 2); + } + } + } +} diff --git a/Items/Placeables/AstralFossil.png b/Items/Placeables/AstralFossil.png new file mode 100644 index 0000000000..085b793c70 Binary files /dev/null and b/Items/Placeables/AstralFossil.png differ diff --git a/Items/Placeables/AstralSand.png b/Items/Placeables/AstralSand.png index aae699ed14..675b86a8a1 100644 Binary files a/Items/Placeables/AstralSand.png and b/Items/Placeables/AstralSand.png differ diff --git a/Items/Placeables/AstralSandstone.png b/Items/Placeables/AstralSandstone.png index 210ac0d1f6..17b64a28b9 100644 Binary files a/Items/Placeables/AstralSandstone.png and b/Items/Placeables/AstralSandstone.png differ diff --git a/Items/Placeables/AstralSilt.cs b/Items/Placeables/AstralSilt.cs new file mode 100644 index 0000000000..81d0b2f9f6 --- /dev/null +++ b/Items/Placeables/AstralSilt.cs @@ -0,0 +1,140 @@ + +using Terraria.ID; +using Terraria; +using Terraria.ModLoader; +using CalamityMod.World; + +namespace CalamityMod.Items.Placeables +{ + public class AstralSilt : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Novae Slag"); + } + + public override void SetDefaults() + { + ItemID.Sets.ExtractinatorMode[item.type] = item.type; + item.createTile = ModContent.TileType(); + 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 ExtractinatorUse(ref int resultType, ref int resultStack) + { + /* + Novae slag will give stardust, fallen stars, gems and HM ores always by default + When Astrum Deus has been defeated, it will give Astral Ore + */ + + float val = Main.rand.NextFloat(100); + if (val < 30f) + { + resultType = ItemID.CopperCoin; + resultStack = Main.rand.Next(1, 100); + } + else if (val < 37f) + { + resultType = ItemID.SilverCoin; + resultStack = Main.rand.Next(1, 100); + } + else if (val < 38f) + { + resultType = ItemID.GoldCoin; + resultStack = Main.rand.Next(1, 100); + } + else if (val < 38.03f) + { + resultType = ItemID.PlatinumCoin; + resultStack = Main.rand.Next(1, 11); + } + else if (val < 48.03f && !Main.dayTime) + { + resultType = ItemID.FallenStar; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 58.03f) + { + resultType = ModContent.ItemType(); + resultStack = Main.rand.Next(1, 21); + } + else if (val < 61.03f) + { + resultType = ItemID.Diamond; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 64.03f) + { + resultType = ItemID.Ruby; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 67.03f) + { + resultType = ItemID.Topaz; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 70.03f) + { + resultType = ItemID.Emerald; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 73.03f) + { + resultType = ItemID.Sapphire; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 76.03f) + { + resultType = ItemID.Amethyst; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 76.53f) + { + resultType = ItemID.Amber; + resultStack = Main.rand.Next(1, 21); + } + else if (val < 78.78f) + { + resultType = ItemID.PalladiumOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 81.03f) + { + resultType = ItemID.CobaltOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 83.03f) + { + resultType = ItemID.MythrilOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 85.03f) + { + resultType = ItemID.OrichalcumOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 87.78f) + { + resultType = ItemID.AdamantiteOre; + resultStack = Main.rand.Next(1, 17); + } + else if (val < 89.53f) + { + resultType = ItemID.TitaniumOre; + resultStack = Main.rand.Next(1, 17); + } + else if (CalamityWorld.downedStarGod) + { + resultType = ModContent.ItemType(); + resultStack = Main.rand.Next(1, 2); + } + } + } +} diff --git a/Items/Placeables/AstralSilt.png b/Items/Placeables/AstralSilt.png new file mode 100644 index 0000000000..c81c42c2e0 Binary files /dev/null and b/Items/Placeables/AstralSilt.png differ diff --git a/Items/Placeables/AstralSnow.cs b/Items/Placeables/AstralSnow.cs new file mode 100644 index 0000000000..cf166004ae --- /dev/null +++ b/Items/Placeables/AstralSnow.cs @@ -0,0 +1,36 @@ +using CalamityMod.Items.Placeables.Walls; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables +{ + public class AstralSnow : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Astral Snow"); + } + + 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 = 16; + item.height = 16; + item.maxStack = 999; + } + + public override void AddRecipes() + { + ModRecipe recipe = new ModRecipe(mod); + recipe.AddTile(18); + recipe.AddIngredient(ModContent.ItemType(), 4); + recipe.SetResult(this, 1); + recipe.AddRecipe(); + base.AddRecipes(); + } + } +} diff --git a/Items/Placeables/AstralSnow.png b/Items/Placeables/AstralSnow.png new file mode 100644 index 0000000000..40c49987e8 Binary files /dev/null and b/Items/Placeables/AstralSnow.png differ diff --git a/Items/Placeables/HardenedAstralSand.png b/Items/Placeables/HardenedAstralSand.png index 2cc6f1b60b..027b930beb 100644 Binary files a/Items/Placeables/HardenedAstralSand.png and b/Items/Placeables/HardenedAstralSand.png differ diff --git a/Items/Placeables/Walls/AerialiteBrickWall.png b/Items/Placeables/Walls/AerialiteBrickWall.png index 4a823c9232..a973f73e33 100644 Binary files a/Items/Placeables/Walls/AerialiteBrickWall.png and b/Items/Placeables/Walls/AerialiteBrickWall.png differ diff --git a/Items/Placeables/Walls/AstralFossilWall.cs b/Items/Placeables/Walls/AstralFossilWall.cs new file mode 100644 index 0000000000..bb14713258 --- /dev/null +++ b/Items/Placeables/Walls/AstralFossilWall.cs @@ -0,0 +1,36 @@ +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +namespace CalamityMod.Items.Placeables.Walls +{ + public class AstralFossilWall : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Celestial Remains 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/AstralFossilWall.png b/Items/Placeables/Walls/AstralFossilWall.png new file mode 100644 index 0000000000..95f916b644 Binary files /dev/null and b/Items/Placeables/Walls/AstralFossilWall.png differ diff --git a/Items/Placeables/Walls/AstralSnowWall.cs b/Items/Placeables/Walls/AstralSnowWall.cs new file mode 100644 index 0000000000..a6db11bd6b --- /dev/null +++ b/Items/Placeables/Walls/AstralSnowWall.cs @@ -0,0 +1,36 @@ +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +namespace CalamityMod.Items.Placeables.Walls +{ + public class AstralSnowWall : ModItem + { + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Astral Snow 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/AstralSnowWall.png b/Items/Placeables/Walls/AstralSnowWall.png new file mode 100644 index 0000000000..fc075dafe7 Binary files /dev/null and b/Items/Placeables/Walls/AstralSnowWall.png differ diff --git a/Tiles/Abyss/AbyssGravel.cs b/Tiles/Abyss/AbyssGravel.cs index 456ee59dcc..5116120202 100644 --- a/Tiles/Abyss/AbyssGravel.cs +++ b/Tiles/Abyss/AbyssGravel.cs @@ -1,7 +1,9 @@ using Microsoft.Xna.Framework; using Terraria; +using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Tiles.Abyss { public class AbyssGravel : ModTile @@ -32,5 +34,11 @@ namespace CalamityMod.Tiles.Abyss { num = fail ? 1 : 3; } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Dirt); + return false; + } } } diff --git a/Tiles/AerialiteBrick.cs b/Tiles/AerialiteBrick.cs index 6e50b429de..e91c36d415 100644 --- a/Tiles/AerialiteBrick.cs +++ b/Tiles/AerialiteBrick.cs @@ -16,6 +16,11 @@ namespace CalamityMod.Tiles AddMapEntry(new Color(68, 58, 145)); } + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + return CustomTileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + 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(119, 102, 255), 1f); diff --git a/Tiles/AerialiteBrick.png b/Tiles/AerialiteBrick.png index 401509d654..1690f4250f 100644 Binary files a/Tiles/AerialiteBrick.png and b/Tiles/AerialiteBrick.png differ diff --git a/Tiles/Astral/AstralClay.cs b/Tiles/Astral/AstralClay.cs new file mode 100644 index 0000000000..ffa55478b2 --- /dev/null +++ b/Tiles/Astral/AstralClay.cs @@ -0,0 +1,41 @@ + +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Astral +{ + public class AstralClay : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + TileMerge.MergeGeneralTiles(Type); + TileMerge.MergeAstralTiles(Type); + TileMerge.MergeOreTiles(Type); + + dustType = ModContent.DustType(); + drop = ModContent.ItemType(); + + AddMapEntry(new Color(133, 69, 115)); + + TileID.Sets.ChecksForMerge[Type] = true; + TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/Astral/AstralClay.png b/Tiles/Astral/AstralClay.png new file mode 100644 index 0000000000..836ee276f6 Binary files /dev/null and b/Tiles/Astral/AstralClay.png differ diff --git a/Tiles/Astral/AstralDirt.cs b/Tiles/Astral/AstralDirt.cs index 43dc9017ff..879e9ea2f0 100644 --- a/Tiles/Astral/AstralDirt.cs +++ b/Tiles/Astral/AstralDirt.cs @@ -17,6 +17,10 @@ namespace CalamityMod.Tiles.Astral TileMerge.MergeGeneralTiles(Type); TileMerge.MergeAstralTiles(Type); TileMerge.MergeOreTiles(Type); + TileMerge.MergeTile(Type, TileID.Grass); + TileMerge.MergeTile(Type, TileID.CorruptGrass); + TileMerge.MergeTile(Type, TileID.HallowedGrass); + TileMerge.MergeTile(Type, TileID.FleshGrass); dustType = ModContent.DustType(); drop = ModContent.ItemType(); @@ -29,7 +33,7 @@ namespace CalamityMod.Tiles.Astral public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type); + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Dirt); return false; } diff --git a/Tiles/Astral/AstralGrass.cs b/Tiles/Astral/AstralGrass.cs index 5323dc4391..3e541ccdb9 100644 --- a/Tiles/Astral/AstralGrass.cs +++ b/Tiles/Astral/AstralGrass.cs @@ -1,4 +1,5 @@ +using CalamityMod.Tiles.Astral; using CalamityMod.Dusts; using Microsoft.Xna.Framework; using Terraria; @@ -15,9 +16,11 @@ namespace CalamityMod.Tiles.Astral Main.tileBlockLight[Type] = true; Main.tileBrick[Type] = true; - TileMerge.MergeGeneralTiles(Type); - TileMerge.MergeAstralTiles(Type); - TileMerge.MergeOreTiles(Type); + TileMerge.MergeTile(Type, ModContent.TileType()); + TileMerge.MergeTile(Type, TileID.Grass); + TileMerge.MergeTile(Type, TileID.CorruptGrass); + TileMerge.MergeTile(Type, TileID.HallowedGrass); + TileMerge.MergeTile(Type, TileID.FleshGrass); dustType = ModContent.DustType(); drop = ModContent.ItemType(); diff --git a/Tiles/Astral/AstralSilt.cs b/Tiles/Astral/AstralSilt.cs new file mode 100644 index 0000000000..b319bda69b --- /dev/null +++ b/Tiles/Astral/AstralSilt.cs @@ -0,0 +1,50 @@ + +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Astral +{ + public class AstralSilt : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + TileMerge.MergeGeneralTiles(Type); + TileMerge.MergeAstralTiles(Type); + TileMerge.MergeOreTiles(Type); + + dustType = ModContent.DustType(); + drop = ModContent.ItemType(); + + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Novae Slag"); + AddMapEntry(new Color(133, 69, 115)); + + TileID.Sets.ChecksForMerge[Type] = true; + TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType(), 0f, 0f, 1, new Color(255, 255, 255), 1f); + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, ModContent.DustType(), 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/Astral/AstralSilt.png b/Tiles/Astral/AstralSilt.png new file mode 100644 index 0000000000..858f680409 Binary files /dev/null and b/Tiles/Astral/AstralSilt.png differ diff --git a/Tiles/Astral/AstralStone.png b/Tiles/Astral/AstralStone.png index ba1fb51b84..cbdcd6750a 100644 Binary files a/Tiles/Astral/AstralStone.png and b/Tiles/Astral/AstralStone.png differ diff --git a/Tiles/AstralDesert/AstralFossil.cs b/Tiles/AstralDesert/AstralFossil.cs new file mode 100644 index 0000000000..3d0f5626d0 --- /dev/null +++ b/Tiles/AstralDesert/AstralFossil.cs @@ -0,0 +1,42 @@ + +using CalamityMod.Dusts; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.AstralDesert +{ + public class AstralFossil : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + TileMerge.MergeGeneralTiles(Type); + TileMerge.MergeDesertTiles(Type); + TileMerge.MergeAstralTiles(Type); + + dustType = ModContent.DustType(); + drop = ModContent.ItemType(); + + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Celestial Remains"); + AddMapEntry(new Color(59, 50, 77)); + + TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/AstralDesert/AstralFossil.png b/Tiles/AstralDesert/AstralFossil.png new file mode 100644 index 0000000000..fb18fa05b1 Binary files /dev/null and b/Tiles/AstralDesert/AstralFossil.png differ diff --git a/Tiles/AstralDesert/AstralSand.cs b/Tiles/AstralDesert/AstralSand.cs index d98baee3fd..404ac1dc1c 100644 --- a/Tiles/AstralDesert/AstralSand.cs +++ b/Tiles/AstralDesert/AstralSand.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Tiles.AstralDesert dustType = 108; drop = ModContent.ItemType(); - AddMapEntry(new Color(149, 156, 155)); + AddMapEntry(new Color(187, 220, 237)); TileID.Sets.TouchDamageSands[Type] = 15; TileID.Sets.Conversion.Sand[Type] = true; @@ -51,7 +51,8 @@ namespace CalamityMod.Tiles.AstralDesert WorldGen.SquareTileFrame(i, j); return false; } - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); + // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType()); + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/AstralDesert/AstralSandstone.cs b/Tiles/AstralDesert/AstralSandstone.cs index 10456910ac..f975a3e14c 100644 --- a/Tiles/AstralDesert/AstralSandstone.cs +++ b/Tiles/AstralDesert/AstralSandstone.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.AstralDesert dustType = ModContent.DustType(); drop = ModContent.ItemType(); - AddMapEntry(new Color(79, 61, 97)); + AddMapEntry(new Color(93, 78, 107)); TileID.Sets.Conversion.Sandstone[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; @@ -29,7 +29,8 @@ namespace CalamityMod.Tiles.AstralDesert public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/AstralDesert/HardenedAstralSand.cs b/Tiles/AstralDesert/HardenedAstralSand.cs index c551df7f5b..285fde36bc 100644 --- a/Tiles/AstralDesert/HardenedAstralSand.cs +++ b/Tiles/AstralDesert/HardenedAstralSand.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Tiles.AstralDesert dustType = 108; drop = ModContent.ItemType(); - AddMapEntry(new Color(45, 36, 63)); + AddMapEntry(new Color(128, 128, 158)); TileID.Sets.Conversion.HardenedSand[Type] = true; TileID.Sets.ForAdvancedCollision.ForSandshark[Type] = true; @@ -29,7 +29,8 @@ namespace CalamityMod.Tiles.AstralDesert public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); return false; } diff --git a/Tiles/AstralSnow/AstralIce.cs b/Tiles/AstralSnow/AstralIce.cs index 6128c16b22..e1a335e13c 100644 --- a/Tiles/AstralSnow/AstralIce.cs +++ b/Tiles/AstralSnow/AstralIce.cs @@ -48,7 +48,7 @@ namespace CalamityMod.Tiles.AstralSnow public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); return false; } } diff --git a/Tiles/AstralSnow/AstralIce.png b/Tiles/AstralSnow/AstralIce.png index 4cd467e205..2af638e1df 100644 Binary files a/Tiles/AstralSnow/AstralIce.png and b/Tiles/AstralSnow/AstralIce.png differ diff --git a/Tiles/AstralSnow/AstralSnow.cs b/Tiles/AstralSnow/AstralSnow.cs new file mode 100644 index 0000000000..ec950b5379 --- /dev/null +++ b/Tiles/AstralSnow/AstralSnow.cs @@ -0,0 +1,55 @@ + +using CalamityMod.Tiles.Astral; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.AstralSnow +{ + public class AstralSnow : ModTile + { + public override void SetDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileBrick[Type] = true; + + TileMerge.MergeGeneralTiles(Type); + TileMerge.MergeSnowTiles(Type); + TileMerge.MergeAstralTiles(Type); + + dustType = 173; + drop = ModContent.ItemType(); + + soundType = 2; + soundStyle = 48; + + AddMapEntry(new Color(189, 211, 221)); + + TileID.Sets.Snow[Type] = true; + TileID.Sets.ChecksForMerge[Type] = true; + TileID.Sets.CanBeClearedDuringOreRunner[Type] = true; + + SetModTree(new AstralSnowTree()); + } + + 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) + { + // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); + return false; + } + + public override int SaplingGrowthType(ref int style) + { + style = 0; + return ModContent.TileType(); + } + } +} diff --git a/Tiles/AstralSnow/AstralSnow.png b/Tiles/AstralSnow/AstralSnow.png new file mode 100644 index 0000000000..323a795cb8 Binary files /dev/null and b/Tiles/AstralSnow/AstralSnow.png differ diff --git a/Tiles/AstralSnow/AstralSnowTree.cs b/Tiles/AstralSnow/AstralSnowTree.cs new file mode 100644 index 0000000000..0a3fa157ed --- /dev/null +++ b/Tiles/AstralSnow/AstralSnowTree.cs @@ -0,0 +1,39 @@ +using Terraria.ModLoader; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles +{ + public class AstralSnowTree : ModTree + { + public override Texture2D GetTopTextures(int i, int j, ref int frame, ref int frameWidth, ref int frameHeight, ref int xOffsetLeft, ref int yOffset) + { + frame = (i + j * j) % 6; + return ModContent.GetTexture("CalamityMod/Tiles/AstralSnow/AstralSnowTree_Tops"); + } + + public override Texture2D GetBranchTextures(int i, int j, int trunkOffset, ref int frame) + { + return ModContent.GetTexture("CalamityMod/Tiles/AstralSnow/AstralSnowTree_Branches"); + } + + public override Texture2D GetTexture() + { + return ModContent.GetTexture("CalamityMod/Tiles/AstralSnow/AstralSnowTree"); + } + + public override int DropWood() + { + return ModContent.ItemType(); + } + + public override int CreateDust() + { + return ModContent.DustType(); + } + + public override int GrowthFXGore() + { + return -1; + } + } +} diff --git a/Tiles/AstralSnow/AstralSnowTree.png b/Tiles/AstralSnow/AstralSnowTree.png new file mode 100644 index 0000000000..477ef55e48 Binary files /dev/null and b/Tiles/AstralSnow/AstralSnowTree.png differ diff --git a/Tiles/AstralSnow/AstralSnowTreeSapling.cs b/Tiles/AstralSnow/AstralSnowTreeSapling.cs new file mode 100644 index 0000000000..8b51531c58 --- /dev/null +++ b/Tiles/AstralSnow/AstralSnowTreeSapling.cs @@ -0,0 +1,71 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.AstralSnow +{ + public class AstralSnowTreeSapling : ModTile + { + //All of this code is taken directly from Example Mod. + //Cheers Blushie + + public override void SetDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileLavaDeath[Type] = true; + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile, TileObjectData.newTile.Width, 0); + TileObjectData.newTile.UsesCustomCanPlace = true; + TileObjectData.newTile.CoordinateHeights = new[] { 16, 18 }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorValidTiles = new[] { mod.TileType("AstralSnow") }; + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.DrawFlipHorizontal = true; + TileObjectData.newTile.WaterPlacement = LiquidPlacement.NotAllowed; + TileObjectData.newTile.LavaDeath = true; + TileObjectData.newTile.RandomStyleRange = 3; + TileObjectData.addTile(Type); + sapling = true; + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Sapling"); + AddMapEntry(new Color(200, 200, 200), name); + dustType = mod.DustType("AstralBasic"); + adjTiles = new int[] { TileID.Saplings }; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + + public override void RandomUpdate(int i, int j) + { + if (WorldGen.genRand.Next(20) == 0) + { + bool isPlayerNear = WorldGen.PlayerLOS(i, j); + bool success = WorldGen.GrowTree(i, j); + if (success && isPlayerNear) + { + WorldGen.TreeGrowFXCheck(i, j); + } + } + } + + public override void SetSpriteEffects(int i, int j, ref SpriteEffects effects) + { + if (i % 2 == 1) + { + effects = SpriteEffects.FlipHorizontally; + } + } + } +} diff --git a/Tiles/AstralSnow/AstralSnowTreeSapling.png b/Tiles/AstralSnow/AstralSnowTreeSapling.png new file mode 100644 index 0000000000..27df5e09b1 Binary files /dev/null and b/Tiles/AstralSnow/AstralSnowTreeSapling.png differ diff --git a/Tiles/AstralSnow/AstralSnowTree_Branches.png b/Tiles/AstralSnow/AstralSnowTree_Branches.png new file mode 100644 index 0000000000..587facf6c8 Binary files /dev/null and b/Tiles/AstralSnow/AstralSnowTree_Branches.png differ diff --git a/Tiles/AstralSnow/AstralSnowTree_Tops.png b/Tiles/AstralSnow/AstralSnowTree_Tops.png new file mode 100644 index 0000000000..a4fb5b660d Binary files /dev/null and b/Tiles/AstralSnow/AstralSnowTree_Tops.png differ diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index 5a07ad4307..5799b54228 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -43,7 +43,8 @@ namespace CalamityMod.Tiles.SunkenSea public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, TileID.Sandstone, false, false, false, false, resetFrame); + // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, TileID.Sandstone, false, false, false, false, resetFrame); + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, TileID.Sandstone); return false; } } diff --git a/Tiles/SunkenSea/Navystone.cs b/Tiles/SunkenSea/Navystone.cs index 6c6fcac88b..295edd9f00 100644 --- a/Tiles/SunkenSea/Navystone.cs +++ b/Tiles/SunkenSea/Navystone.cs @@ -102,7 +102,8 @@ namespace CalamityMod.Tiles.SunkenSea public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { - CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + // CustomTileFraming.FrameTileForCustomMerge(i, j, Type, ModContent.TileType(), false, false, false, false, resetFrame); + CustomTileFraming.FrameTileForCustomMergeFrom(i, j, Type, ModContent.TileType()); return false; } } diff --git a/Utilities/CustomTileFraming.cs b/Utilities/CustomTileFraming.cs index c8f98805bd..cd4e6164d7 100644 --- a/Utilities/CustomTileFraming.cs +++ b/Utilities/CustomTileFraming.cs @@ -58,9 +58,13 @@ 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; + 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; @@ -72,7 +76,7 @@ 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; } @@ -1479,7 +1483,7 @@ namespace CalamityMod return; } - public static void FrameTileForCustomMergeFrom(int x, int y, int myType) + public static void FrameTileForCustomMergeFrom(int x, int y, int myType, int mergeType) { bool forceSameUp = false; bool forceSameDown = false; @@ -1495,6 +1499,9 @@ namespace CalamityMod if (up.active() && tileMergeTypes[myType][up.type]) { + TileMerge.MergeTile(myType, up.type, false); + TileID.Sets.ChecksForMerge[myType] = true; + bool mergedDown; FrameTileForCustomMerge(x, y - 1, up.type, myType, out tmp, out tmp, out tmp, out mergedDown, false, false, false, false, false); if (mergedDown) @@ -1504,6 +1511,9 @@ namespace CalamityMod } if (left.active() && tileMergeTypes[myType][left.type]) { + TileMerge.MergeTile(myType, left.type, false); + TileID.Sets.ChecksForMerge[myType] = true; + bool mergedRight; FrameTileForCustomMerge(x - 1, y, left.type, myType, out tmp, out tmp, out mergedRight, out tmp, false, false, false, false, false); if (mergedRight) @@ -1513,6 +1523,9 @@ namespace CalamityMod } if (right.active() && tileMergeTypes[myType][right.type]) { + TileMerge.MergeTile(myType, right.type, false); + TileID.Sets.ChecksForMerge[myType] = true; + bool mergedLeft; FrameTileForCustomMerge(x + 1, y, right.type, myType, out tmp, out mergedLeft, out tmp, out tmp, false, false, false, false, false); if (mergedLeft) @@ -1522,6 +1535,9 @@ namespace CalamityMod } if (down.active() && tileMergeTypes[myType][down.type]) { + TileMerge.MergeTile(myType, down.type, false); + TileID.Sets.ChecksForMerge[myType] = true; + bool mergedUp; FrameTileForCustomMerge(x, y + 1, down.type, myType, out mergedUp, out tmp, out tmp, out tmp, false, false, false, false, false); if (mergedUp) @@ -1530,7 +1546,7 @@ namespace CalamityMod } } - FrameTileForCustomMerge(x, y, myType, TileID.Dirt, forceSameDown, forceSameUp, forceSameLeft, forceSameRight); + FrameTileForCustomMerge(x, y, myType, mergeType, forceSameDown, forceSameUp, forceSameLeft, forceSameRight); } private static void SetFrameAt(int x, int y, int frameX, int frameY) diff --git a/Utilities/TileMerge.cs b/Utilities/TileMerge.cs index 0d02d78dc7..632c157a14 100644 --- a/Utilities/TileMerge.cs +++ b/Utilities/TileMerge.cs @@ -144,6 +144,7 @@ namespace CalamityMod MergeTile(type, TileID.HallowedIce); //Calam snow tiles MergeTile(type, ModContent.TileType()); + MergeTile(type, ModContent.TileType()); } /// @@ -197,6 +198,7 @@ namespace CalamityMod MergeTile(type, ModContent.TileType()); //Astral Snow MergeTile(type, ModContent.TileType()); + MergeTile(type, ModContent.TileType()); } /// diff --git a/Walls/AerialiteBrickWall.png b/Walls/AerialiteBrickWall.png index 835535ef71..de93e192fa 100644 Binary files a/Walls/AerialiteBrickWall.png and b/Walls/AerialiteBrickWall.png differ diff --git a/Walls/AstralFossilWall.cs b/Walls/AstralFossilWall.cs new file mode 100644 index 0000000000..e3cd022f03 --- /dev/null +++ b/Walls/AstralFossilWall.cs @@ -0,0 +1,24 @@ +using Terraria; +using Microsoft.Xna.Framework; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Walls +{ + public class AstralFossilWall : ModWall + { + + public override void SetDefaults() + { + dustType = ModContent.DustType(); + drop = ModContent.ItemType(); + Main.wallHouse[Type] = true; + + AddMapEntry(new Color(29, 38, 49)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/AstralFossilWall.png b/Walls/AstralFossilWall.png new file mode 100644 index 0000000000..898c927911 Binary files /dev/null and b/Walls/AstralFossilWall.png differ diff --git a/Walls/AstralSnowWall.cs b/Walls/AstralSnowWall.cs new file mode 100644 index 0000000000..85f1a29158 --- /dev/null +++ b/Walls/AstralSnowWall.cs @@ -0,0 +1,21 @@ + +using Microsoft.Xna.Framework; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Walls +{ + public class AstralSnowWall : ModWall + { + public override void SetDefaults() + { + dustType = ModContent.DustType(); + + AddMapEntry(new Color(135, 145, 149)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/AstralSnowWall.png b/Walls/AstralSnowWall.png new file mode 100644 index 0000000000..0f07f2758a Binary files /dev/null and b/Walls/AstralSnowWall.png differ diff --git a/Walls/AstralSnowWallSafe.cs b/Walls/AstralSnowWallSafe.cs new file mode 100644 index 0000000000..cb250532ce --- /dev/null +++ b/Walls/AstralSnowWallSafe.cs @@ -0,0 +1,24 @@ +using Terraria; +using Microsoft.Xna.Framework; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Walls +{ + public class AstralSnowWallSafe : ModWall + { + + public override void SetDefaults() + { + dustType = ModContent.DustType(); + drop = ModContent.ItemType(); + Main.wallHouse[Type] = true; + + AddMapEntry(new Color(135, 145, 149)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Walls/AstralSnowWallSafe.png b/Walls/AstralSnowWallSafe.png new file mode 100644 index 0000000000..0f07f2758a Binary files /dev/null and b/Walls/AstralSnowWallSafe.png differ diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index c3875f4d05..6f5a23a294 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -630,13 +630,13 @@ namespace CalamityMod.World sulphurTiles = tileCounts[ModContent.TileType()]; #region Astral Stuff - int astralDesertTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; - int astralSnowTiles = tileCounts[ModContent.TileType()]; + int astralDesertTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; + int astralSnowTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; Main.sandTiles += astralDesertTiles; Main.snowTiles += astralSnowTiles; - astralTiles = astralDesertTiles + astralSnowTiles + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; + astralTiles = astralDesertTiles + astralSnowTiles + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; #endregion } #endregion diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index bf445ab287..6abc32d137 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -1716,6 +1716,12 @@ namespace CalamityMod.World case WallID.Dirt: Main.tile[x, y].wall = (ushort)ModContent.WallType(); break; + case WallID.SnowWallUnsafe: + Main.tile[x, y].wall = (ushort)ModContent.WallType(); + break; + case WallID.DesertFossil: + Main.tile[x, y].wall = (ushort)ModContent.WallType(); + break; case WallID.IceUnsafe: Main.tile[x, y].wall = (ushort)ModContent.WallType(); break; @@ -1753,6 +1759,18 @@ namespace CalamityMod.World case TileID.Dirt: Main.tile[x, y].type = (ushort)ModContent.TileType(); break; + case TileID.SnowBlock: + Main.tile[x, y].type = (ushort)ModContent.TileType(); + break; + case TileID.Silt: + Main.tile[x, y].type = (ushort)ModContent.TileType(); + break; + case TileID.DesertFossil: + Main.tile[x, y].type = (ushort)ModContent.TileType(); + break; + case TileID.ClayBlock: + Main.tile[x, y].type = (ushort)ModContent.TileType(); + break; case TileID.Vines: Main.tile[x, y].type = (ushort)ModContent.TileType(); break; @@ -1934,6 +1952,14 @@ namespace CalamityMod.World { Main.tile[x, y].wall = WallID.DirtUnsafe; } + else if (wallType == ModContent.WallType() || wallType == ModContent.WallType()) + { + Main.tile[x, y].wall = WallID.SnowWallUnsafe; + } + else if (wallType == ModContent.WallType()) + { + Main.tile[x, y].wall = WallID.DesertFossil; + } else if (wallType == ModContent.WallType()) { switch (convert) @@ -1984,6 +2010,22 @@ namespace CalamityMod.World { tile.type = TileID.Dirt; } + else if (type == ModContent.TileType()) + { + tile.type = TileID.SnowBlock; + } + else if (type == ModContent.TileType()) + { + tile.type = TileID.Silt; + } + else if (type == ModContent.TileType()) + { + tile.type = TileID.DesertFossil; + } + else if (type == ModContent.TileType()) + { + tile.type = TileID.ClayBlock; + } else if (type == ModContent.TileType()) { SetTileFromConvert(x, y, convert, TileID.CorruptGrass, TileID.FleshGrass, TileID.HallowedGrass, TileID.Grass);