From 9f7ed202dd54b12ff1ba1557d13b4718ee63c3b8 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Fri, 1 Jul 2022 13:11:05 -0400 Subject: [PATCH 1/2] the problem was atalya scrap piles sulphur vines are innocent, they just cause floating chests to reframe which instantly destroys the universe --- Tiles/Abyss/SulphurousVines.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/Tiles/Abyss/SulphurousVines.cs b/Tiles/Abyss/SulphurousVines.cs index 1080cb8706..8a8efab045 100644 --- a/Tiles/Abyss/SulphurousVines.cs +++ b/Tiles/Abyss/SulphurousVines.cs @@ -50,12 +50,10 @@ namespace CalamityMod.Tiles.Abyss } } - // Ozzatron 01JUL2022: infinite tile framing recursion in rusty chests caused by sulphurous vines - // heavily refactored this code to not suck. also, sulphurous vines won't grow in honey anymore. + // Ozzatron 01JUL2022: heavily refactored this code to not suck. also, sulphurous vines won't grow in honey anymore. private const int MaxVineHeight = 10; public override void RandomUpdate(int i, int j) { - int rustyChest = ModContent.TileType(); Tile below = Main.tile[i, j + 1]; if (!below.HasTile && below.LiquidType == LiquidID.Water && below.LiquidAmount >= 128) { @@ -90,16 +88,13 @@ namespace CalamityMod.Tiles.Abyss Main.tile[x, y].TileFrameY = 4 * 18; Main.tile[x, y].Get().HasTile = true; // .HasTile = true; refuses to work - // Reframe the current vine + // Pick a new sprite for the current vine Main.tile[i, j].TileFrameX = (short)(WorldGen.genRand.Next(12) * 18); Main.tile[i, j].TileFrameY = (short)(WorldGen.genRand.Next(4) * 18); - // Reframe both vines UNLESS ONE OF THEM IS A CHEST FOR SOME REASON YEAH THAT WOULD BE BAD - if (Main.tile[x, y].TileType != rustyChest && Main.tile[i, j].TileType != rustyChest) - { - WorldGen.SquareTileFrame(x, y, true); - WorldGen.SquareTileFrame(i, j, true); - } + // Reframe both vines the correct vanilla way + WorldGen.SquareTileFrame(x, y, true); + WorldGen.SquareTileFrame(i, j, true); // Send update packets as needed if (Main.netMode == NetmodeID.Server) From a20f8583c71b6881c004889856e7b3c16a6cfe66 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 1 Jul 2022 12:27:43 -0500 Subject: [PATCH 2/2] Changed Rusty Chest worldgen placement order --- World/SulphurousSea.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/World/SulphurousSea.cs b/World/SulphurousSea.cs index fcf2a57ce1..bfc27b0afe 100644 --- a/World/SulphurousSea.cs +++ b/World/SulphurousSea.cs @@ -91,9 +91,9 @@ namespace CalamityMod.World { PlaceStalactites(); PlaceColumns(); - PlaceRustyChests(); CreateBeachNearSea(); PlaceScrapPiles(); + PlaceRustyChests(); } #endregion