From 10c19cc817180d9a75497494c3d1f552f99dbb07 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sat, 18 Jan 2020 13:55:32 -0500 Subject: [PATCH] living trees convert to astral and fixed some tiles from being detected when spawning another biome --- World/WorldGenerationMethods.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 87bd9b010d..dc23123741 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -1268,7 +1268,9 @@ namespace CalamityMod.World (Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType() || - Main.tile[x, y].type == ModContent.TileType())) + Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType() || + Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType() || + Main.tile[x, y].type == ModContent.TileType() || Main.tile[x, y].type == ModContent.TileType())) { astralTileCount++; if (astralTileCount > astralTilesAllowed) @@ -1686,6 +1688,9 @@ namespace CalamityMod.World case WallID.IceUnsafe: Main.tile[x, y].wall = (ushort)ModContent.WallType(); break; + case WallID.LivingWood: + Main.tile[x, y].wall = (ushort)ModContent.WallType(); + break; } } if (TileID.Sets.Conversion.Grass[type] && !TileID.Sets.GrassSpecial[type]) @@ -1736,6 +1741,16 @@ namespace CalamityMod.World case TileID.Vines: Main.tile[x, y].type = (ushort)ModContent.TileType(); break; + case TileID.LivingWood: + Main.tile[x, y].type = (ushort)ModContent.TileType(); + break; + case TileID.LeafBlock: + WorldGen.KillTile(x, y); + if (Main.netMode == 1) + { + NetMessage.SendData(17, -1, -1, null, 0, x, y); + } + break; case TileID.LargePiles: if (tile.frameX <= 1170) { @@ -1944,6 +1959,10 @@ namespace CalamityMod.World { Main.tile[x, y].wall = WallID.IceUnsafe; } + else if (wallType == ModContent.WallType()) + { + Main.tile[x, y].wall = WallID.LivingWood; + } else if (wallType == ModContent.WallType()) { switch (convert) @@ -1996,6 +2015,10 @@ namespace CalamityMod.World { SetTileFromConvert(x, y, convert, TileID.Ebonstone, TileID.Crimstone, TileID.Pearlstone, TileID.Stone); } + else if (type == ModContent.TileType()) + { + tile.type = TileID.LivingWood; + } else if (type == ModContent.TileType()) { SetTileFromConvert(x, y, convert, TileID.Ebonsand, TileID.Crimsand, TileID.Pearlsand, TileID.Sand);