diff --git a/Schematics/DungeonArena.csch b/Schematics/DungeonArena.csch index 29364a0099..738055f6e6 100644 Binary files a/Schematics/DungeonArena.csch and b/Schematics/DungeonArena.csch differ diff --git a/Schematics/Shrine_Corruption.csch b/Schematics/Shrine_Corruption.csch index 4a669deb42..1543395aa7 100644 Binary files a/Schematics/Shrine_Corruption.csch and b/Schematics/Shrine_Corruption.csch differ diff --git a/Schematics/Shrine_Desert.csch b/Schematics/Shrine_Desert.csch index e344d04933..37205a4d91 100644 Binary files a/Schematics/Shrine_Desert.csch and b/Schematics/Shrine_Desert.csch differ diff --git a/Schematics/Shrine_Ice.csch b/Schematics/Shrine_Ice.csch index 9dc4fa4d35..36ea8edf44 100644 Binary files a/Schematics/Shrine_Ice.csch and b/Schematics/Shrine_Ice.csch differ diff --git a/Schematics/Shrine_Surface.csch b/Schematics/Shrine_Surface.csch index 772b508722..3010472517 100644 Binary files a/Schematics/Shrine_Surface.csch and b/Schematics/Shrine_Surface.csch differ diff --git a/Schematics/SurfaceHouse_Snow_Mechanic.csch b/Schematics/SurfaceHouse_Snow_Mechanic.csch index fed0c8289f..8e66175a34 100644 Binary files a/Schematics/SurfaceHouse_Snow_Mechanic.csch and b/Schematics/SurfaceHouse_Snow_Mechanic.csch differ diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 04e0763276..04308a617c 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -669,7 +669,7 @@ namespace CalamityMod.World //note: the stalactites and stalagmites only use their first frame for now //this is because the previous tile frame randomizer code i had was janky and bad, ill make sure to fix it eventually //stalactites - if (WorldGen.genRand.Next(5) == 0) + /*if (WorldGen.genRand.Next(5) == 0) { WorldGen.PlaceTile(num5, num6 + 2, (ushort)ModContent.TileType(), true, false, -1, 0); } @@ -685,7 +685,7 @@ namespace CalamityMod.World if (WorldGen.genRand.Next(5) == 0) { WorldGen.PlaceTile(num5, num6 - 1, (ushort)ModContent.TileType(), true, false, -1, 0); - } + }*/ } if (!tile.HasTile) { diff --git a/World/UndergroundShrines.cs b/World/UndergroundShrines.cs index 792c62385b..02bbb09e08 100644 --- a/World/UndergroundShrines.cs +++ b/World/UndergroundShrines.cs @@ -89,7 +89,6 @@ namespace CalamityMod.World Point placementPoint = new Point(placementPositionX, placementPositionY); Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)); - //int airTilesBetweenBridge = 0; int corruptStuffInArea = 0; bool canGenerateInLocation = true; @@ -104,19 +103,14 @@ namespace CalamityMod.World //Should generate within the bounds of the walls. if (tile.TileType == TileID.Ebonstone || tile.WallType == WallID.EbonstoneUnsafe) - corruptStuffInArea++; - - //There should be some space in the middle of the bridge to make it more natural - //It doesn't seem to work though... - /* - float bridgeStartingBound = schematicSize.X * 0.15f; - bool bridgeGap = x <= placementPoint.X + schematicSize.X - bridgeStartingBound && x >= placementPoint.X + bridgeStartingBound; - if (bridgeGap && !tile.HasTile) - airTilesBetweenBridge++; - */ + corruptStuffInArea++; + + //Do not cut into the altars + if (tile.TileType == TileID.DemonAltar) + canGenerateInLocation = false; } } - if (!canGenerateInLocation || corruptStuffInArea < totalTiles * 0.6f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) + if (!canGenerateInLocation || corruptStuffInArea < totalTiles * 0.6f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) tries++; else { @@ -186,6 +180,10 @@ namespace CalamityMod.World //Crimson does not generate walls in blocks very much, so both walls and tiles are grouped if (tile.TileType == TileID.Crimstone || tile.WallType == WallID.CrimstoneUnsafe) crimsonStuffInArea++; + + //Do not cut into the altars + if (tile.TileType == TileID.DemonAltar) + canGenerateInLocation = false; } } if (!canGenerateInLocation || crimsonTilesInGround < groundTiles * 0.5f || crimsonStuffInArea < totalTiles * 0.8f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) @@ -369,7 +367,7 @@ namespace CalamityMod.World Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)); int iceTilesInArea = 0; int xCheckArea = 80; - int yCheckArea = 40; + int yCheckArea = 20; bool canGenerateInLocation = true; float totalTiles = (schematicSize.X + xCheckArea * 2) * (schematicSize.Y + yCheckArea * 2); @@ -382,12 +380,11 @@ namespace CalamityMod.World if (ShouldAvoidLocation(new Point(x, y), false)) canGenerateInLocation = false; - if (tile.TileType == TileID.SnowBlock || tile.TileType == TileID.IceBlock - || tile.TileType == TileID.Slush || tile.TileType == TileID.BreakableIce) + if (tile.TileType == TileID.SnowBlock || tile.TileType == TileID.IceBlock) iceTilesInArea++; } } - if (!canGenerateInLocation || iceTilesInArea < totalTiles * 0.3f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) + if (!canGenerateInLocation || iceTilesInArea < totalTiles * 0.5f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) tries++; else { @@ -585,11 +582,10 @@ namespace CalamityMod.World Vector2 schematicSize = new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)); int normalTilesInArea = 0; - int xCheckArea = 50; + int activeTilesInArea = 0; bool canGenerateInLocation = true; - float totalTiles = (schematicSize.X + xCheckArea * 2) * schematicSize.Y; - for (int x = placementPoint.X - xCheckArea; x < placementPoint.X + schematicSize.X + xCheckArea; x++) + for (int x = placementPoint.X; x < placementPoint.X + schematicSize.X; x++) { for (int y = placementPoint.Y; y < placementPoint.Y + schematicSize.Y; y++) { @@ -599,14 +595,17 @@ namespace CalamityMod.World canGenerateInLocation = false; if (tile.TileType == TileID.Dirt || tile.TileType == TileID.Stone || tile.TileType == TileID.ClayBlock || tile.TileType == TileID.Sand) - normalTilesInArea++; + normalTilesInArea++; + + if (tile.HasTile) + activeTilesInArea++; //Avoid the desert due to sand checks if (tile.WallType == WallID.HardenedSand || tile.WallType == WallID.Sandstone) canGenerateInLocation = false; } } - if (!canGenerateInLocation || normalTilesInArea < totalTiles * 0.4f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) + if (!canGenerateInLocation || normalTilesInArea < activeTilesInArea * 0.8f || !structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) tries++; else {