From e6848f6237c609fa1cb9430e0dff1476cc3eef92 Mon Sep 17 00:00:00 2001 From: Heart-Plus-Up <85328817+Heart-Plus-Up@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:21:35 -0700 Subject: [PATCH] Sunken Seagen weeeee --- Tiles/SunkenSea/ScarletSeaGrassTile.cs | 2 +- Walls/PlantyMushWallLeaves.png | Bin 1357 -> 1115 bytes Walls/ScarletSeaGrassWall.cs | 53 +++++++ Walls/ScarletSeaGrassWall.png | Bin 0 -> 12044 bytes Walls/ScarletSeaGrassWall_Leaves.png | Bin 0 -> 1148 bytes World/Abyss.cs | 28 ++-- World/SunkenSea.cs | 200 +++++++++++++++---------- 7 files changed, 190 insertions(+), 93 deletions(-) create mode 100644 Walls/ScarletSeaGrassWall.cs create mode 100644 Walls/ScarletSeaGrassWall.png create mode 100644 Walls/ScarletSeaGrassWall_Leaves.png diff --git a/Tiles/SunkenSea/ScarletSeaGrassTile.cs b/Tiles/SunkenSea/ScarletSeaGrassTile.cs index 03754300a1..0805070787 100644 --- a/Tiles/SunkenSea/ScarletSeaGrassTile.cs +++ b/Tiles/SunkenSea/ScarletSeaGrassTile.cs @@ -94,7 +94,7 @@ namespace CalamityMod.Tiles.SunkenSea public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) { float brightness = 0.7f; - brightness *= (float)MathF.Sin(-j / 40f + Main.GameUpdateCount * 0.01f + i); + brightness *= (float)MathF.Sin(-i / 40f + Main.GameUpdateCount * 0.01f + j); brightness += 0.5f; r = 187f / 255f; g = 43f / 255f; diff --git a/Walls/PlantyMushWallLeaves.png b/Walls/PlantyMushWallLeaves.png index f058242830d7cc16eb9df2c6509c4c035545854b..072cc678fce73531175ea93f847fa9e9dfbeebaa 100644 GIT binary patch delta 1082 zcmV-A1jYN!3fl;fFn($H!;BbMCqKQihL&yZ678Khx#o<538J-)b0uIJyMj`G4Wx8_oOe_jcZAkB_fo znUz7~rWa777~T!s(`271z+l)0U_1&_fOfZOiZ8R+KiC7{(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`jfZ)1tT4|-_p$LSsup8y&#INz#X%0PQPjzN&M?%Oe z`MXU|byfHH`>Lwj9uD5RyX_7s{BUm{fV&^=0uV<-06MLKaeqv`wEe6QzbS}c58&RH zdo%g@;Nx4F^QYmfPae$VUyxdF=Kck&Fi%q!=X1XpR*{GOm~& z7VH*8`BDQ!0Z;#mRB(yY?_b*Am6Re7rJSF{2F6Mezk=#YpzKmL#w7btaTbc1Q;ZZ7 z$F_S2Lw`S$IVojiKEHaa#v}-X%GFUw&(0qxPn!M5?Y2;$F)M` zYU%Rw7%b1?|6solz{{^&KlL@6IixFdyD?Gd;gc5DzM%XXWBtUD?oLHHqFmXxyN`up z<`g6P4r0r&REQ_hb2NtaYmxqrM|EqVYK_V_eXy2OpTqg-y%>vT~n+gj8* zi;^y{I8ixyXrI}2Zogu`gE1GGcYQA8ySO!Sp_n;E`sD8cw9jnqxP51H$}esS>wh)? z5AUA>aQ)`02T-Z&Tj0D8A$I*J`&Qb$W0YF-#+%P&+AkC{rwDLzXQduy8b-ZX-EoBl zUtXzk$^F8>O0A^qOri(3<_Ke?R=Dq_RtfTQvy0TNvIpbyk932g9I^8}-vjvL(Fp)Q z|M(=+Z(eui-qr_!t$9-GBu)_8TYu(*eXHn=?Zr9fnLvtK&;S4c diff --git a/Walls/ScarletSeaGrassWall.cs b/Walls/ScarletSeaGrassWall.cs new file mode 100644 index 0000000000..053b457495 --- /dev/null +++ b/Walls/ScarletSeaGrassWall.cs @@ -0,0 +1,53 @@ + +using System; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Walls +{ + public class ScarletSeaGrassWall : ModWall, IVisibleThroughWater + { + public static Asset leafTexture = null; + int IVisibleThroughWater.WaterMapEntry { get; set; } + public static Vector2 TileAdj => (Lighting.Mode == Terraria.Graphics.Light.LightMode.Retro || Lighting.Mode == Terraria.Graphics.Light.LightMode.Trippy) ? Vector2.Zero : Vector2.One * 12; + /*public override bool Autoload(ref string name, ref string texture) + { + mod.AddWall("AstralGrassWallUnsafe", this, texture); + return base.Autoload(ref name, ref texture); + }*/ + + public override void SetStaticDefaults() + { + // TODO -- Change this dust to be one more befitting Astral Grass. + DustType = DustID.Shadowflame; + + WallID.Sets.Conversion.Grass[Type] = true; + + AddMapEntry(new Color(104, 24, 24)); + this.AddMapEntryWithWaterVisibility(new Color(87, 20, 38)); + if (!Main.dedServ) + { + leafTexture = ModContent.Request("CalamityMod/Walls/ScarletSeaGrassWall_Leaves"); + } + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + if (i > Main.screenPosition.X / 16 && i < Main.screenPosition.X / 16 + Main.screenWidth / 16 && j > Main.screenPosition.Y / 16 && j < Main.screenPosition.Y / 16 + Main.screenHeight / 16) + { + Texture2D tex = leafTexture.Value; + var rand = new Random(i + (j * 100000)); + + float offset = i * j % 6.28f + (float)rand.NextDouble() / 8f; + float sin = (float)Math.Sin(Main.GameUpdateCount / 45f + offset); + + spriteBatch.Draw(tex, (new Vector2(i + 0.5f, j + 0.5f) + TileAdj) * 16 + new Vector2(1, 0.5f) * sin * 2.2f - Main.screenPosition, + new Rectangle(rand.Next(4) * 26, 0, 24, 24), Lighting.GetColor(i, j), offset + sin * 0.09f, new Vector2(12, 12), 1 + sin / 14f, 0, 0); + } + } + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + } +} diff --git a/Walls/ScarletSeaGrassWall.png b/Walls/ScarletSeaGrassWall.png new file mode 100644 index 0000000000000000000000000000000000000000..6e379e77c28c57b551076b23571a5e771efe77a9 GIT binary patch literal 12044 zcmZ9ycU;nK)IY9S*>YxC&O|G-(x#?{m|M${yPUUsn>$6J;WjnPk*PRxqd0LP(sB>X zg@U7U-~h=1rU-uN&ii?u-|wH##f#VL1Lr!|xz782-si*_8EA7I6FSDm#>Sq(n67-uc)0mj;DY={AoB{sHmY`PlvOrK_xbAZW`6KTbUuRm4wk^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9zJJn^gsN$_xeYO-J*eus@|Ey*?vI2kNtOU>IC&8}i)QutB@k=(Koz zU#~<=&xEN1Awc(>8N+gZW&~yy(Sogt{`HbfeH*kp-Iu@9e7*UK7v@_wBIo3p!gBH6 zmkZK{$VLwqH9eth9v5w1d5@cSR=)BEa^BL&CnQtLf5I%)OY!5vD{t_{_inl@B#FF^ zyIqaW^!D9-y~j6nVISHQ&F?jjl!Pj8;~1BQuH>d8t%EMp_-eWT_U`T_1@Y&%Dk;6hZiOUIH+8pIOQm*tzBSP;ZhAoZ zSxnnq`=rTKw=r-rKKaecS!wZ(^UlkGr<=2rmFsIQ%cF~zK~~I;rhbjj5w=QTW}zOc z40z6>`}xkvB=(+bX%{x@3QSp=t{Hhtf}D9 zuJejes}CCN9SjxoW-{4VUJac)GrB21BRFY?l2K8fHSu`85%almKH74=cFGRHRD*Hs zCj%K+YivrE~*QCHZ|(xy^%=;&-8n zHKy^N1&Z00;Jl_Vc4q>cuf1pw_9m3A5b3D@qp()847f-4Q7E$2mK)?ALmVK(^(Z`B zINctQIX!PTOlw=>Vug6`7Z1^K{|MoLgE%VpG*0Z{UgjavOF)!El;69AZ9s}LVU1kv zC{}%((3E5|bBpiIAIA1)UfBKsyP~XgW9V7Z^m0TDP)xCCZ}*o<&!A&nC*CXu$)R@y z?QL?Y+7U@??g6{g@(o`ciZAzp67s?~gWh?r2fGR6ogZs+tP)fk`&-BF4?;!07VO;P a%)aG2bUGu^jWyoRrmJb7fl#x5@&5puPTjfy literal 0 HcmV?d00001 diff --git a/Walls/ScarletSeaGrassWall_Leaves.png b/Walls/ScarletSeaGrassWall_Leaves.png new file mode 100644 index 0000000000000000000000000000000000000000..4db2083f0fad72a97020356cbb7d485b86c82d45 GIT binary patch literal 1148 zcmV-?1cUpDP)Px(Hc3Q5RA_HJJ7 zTsQ{Orb&<>o7n3WP4O?q%#}EIXGqzA0Tw(B!Qsr@8S0$5KU9Rp%csxyM6~uA0et`J zmy-sGy{f7K$jhPyIL}s2z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tile.WallType = (ushort)ModContent.WallType(); } + } } } } } + //initial hole MiscWorldgenRoutines.ChasmGenerator(abyssChasmX, Main.remixWorld ? 100 : (int)GenVars.worldSurfaceLow + 65, Main.remixWorld ? AbyssChasmBottom + 110 : AbyssChasmBottom, true); MiscWorldgenRoutines.ChasmGenerator(abyssChasmX - 22, Main.remixWorld ? 35 : (int)GenVars.worldSurfaceLow, AbyssChasmBottom, true); @@ -650,11 +652,11 @@ namespace CalamityMod.World if (tile.TileType == ModContent.TileType()) { //place coral blobs - if (WorldGen.genRand.NextBool(125) && !Main.tile[X, Y - 1].HasTile) + if (WorldGen.genRand.NextBool(125) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(WorldGen.genRand.Next(3, 4)), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y), new Shapes.Mound(WorldGen.genRand.Next(4, 5), 3), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -666,13 +668,13 @@ namespace CalamityMod.World } //rare pearls - if (WorldGen.genRand.NextBool(50)) + if (WorldGen.genRand.NextBool(50) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { WorldGen.PlaceObject(X, Y, (ushort)ModContent.TileType()); } //giant kelp on abyss gravel - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(15) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] Kelps = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -681,7 +683,7 @@ namespace CalamityMod.World } //plany mush piles - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(15) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] PlantPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -690,7 +692,7 @@ namespace CalamityMod.World } //gravel rock piles - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(15) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] GravelPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -699,7 +701,7 @@ namespace CalamityMod.World } //abyss gravel vents - if (WorldGen.genRand.NextBool(45)) + if (WorldGen.genRand.NextBool(45) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] Vents = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -708,7 +710,7 @@ namespace CalamityMod.World } //pirate crates - if (WorldGen.genRand.NextBool(17)) + if (WorldGen.genRand.NextBool(17) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] PirateCrate = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -721,7 +723,7 @@ namespace CalamityMod.World if (tile.TileType == ModContent.TileType()) { //spider coral - if (WorldGen.genRand.NextBool(12)) + if (WorldGen.genRand.NextBool(12) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] SpiderCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), @@ -731,7 +733,7 @@ namespace CalamityMod.World } //thermal vent - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(15) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] Vents = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -744,7 +746,7 @@ namespace CalamityMod.World if (tile.TileType == ModContent.TileType()) { //bulb trees - if (WorldGen.genRand.NextBool(25)) + if (WorldGen.genRand.NextBool(25) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -758,7 +760,7 @@ namespace CalamityMod.World if ((tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType()) && Y > (Main.remixWorld ? rockLayer - (int)((y - 200) * 0.8f) : rockLayer)) { - if (WorldGen.genRand.NextBool(5)) + if (WorldGen.genRand.NextBool(5) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { WorldGen.PlacePot(X, Y, (ushort)ModContent.TileType()); CalamityUtils.SafeSquareTileFrame(X, Y, true); @@ -768,7 +770,7 @@ namespace CalamityMod.World //sulphur pots else if (tile.TileType == ModContent.TileType() && Y < (Main.remixWorld ? Main.UnderworldLayer : (int)Main.worldSurface)) { - if (WorldGen.genRand.NextBool(3)) + if (WorldGen.genRand.NextBool(3) && !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) { WorldGen.PlacePot(X, Y, (ushort)ModContent.TileType()); CalamityUtils.SafeSquareTileFrame(X, Y, true); diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 562abd2448..8aece43e6e 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -7,6 +7,7 @@ using CalamityMod.Tiles.SunkenSea.Ambient; using CalamityMod.Walls; using Microsoft.Xna.Framework; using ReLogic.Threading; +using ReLogic.Utilities; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -93,8 +94,8 @@ namespace CalamityMod.World ForLoop.Invoke(startPosX - biomeSize - 20, startPosX + biomeSize + 20, 15, (X) => { float height = MathHelper.Lerp( - startPosY + 50, - startPosY - 35, + startPosY + 35, //top + startPosY - 15, //bottom trapezoidLateralSteep(Utils.GetLerpValue(startPosX - biomeSize - 20, startPosX + biomeSize + 20, X))); for (int Y = startPosY + 50; Y >= height; Y -= 10) @@ -112,7 +113,7 @@ namespace CalamityMod.World // // Makes the bottom borders of the Timeless Shores curved downwards. // - const int totalCuveDepth = 40; + const int totalCuveDepth = 90; ForLoop.Invoke(startPosX - biomeSize - 20, startPosX - biomeSize + 200, 10, (x) => { int curveDepth = (int)MathHelper.Lerp( @@ -120,10 +121,10 @@ namespace CalamityMod.World 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 17, startPosX - biomeSize + 200, x, true))); - for (int y = startPosY + 50; y <= startPosY + 50 + curveDepth; y += 5) + for (int y = startPosY + 25; y <= startPosY + 50 + curveDepth; y += 5) { ShapeData circle = new(); - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(30), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(x, y), new Shapes.Slime(30), Actions.Chain(new GenAction[] { //new Modifiers.RadialDither(1, 30).Output(circle), new Modifiers.Blotches().Output(circle), @@ -141,7 +142,7 @@ namespace CalamityMod.World for (int y = startPosY + 50; y <= startPosY + 50 + curveDepth; y += 5) { ShapeData circle = new(); - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(30), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(x, y), new Shapes.Slime(30), Actions.Chain(new GenAction[] { //new Modifiers.RadialDither(1, 30).Output(circle), new Modifiers.Blotches().Output(circle), @@ -151,18 +152,28 @@ namespace CalamityMod.World }); //clear a smaller square out of the center where the biomes stuff will be + //Added curves to the top of the biome via curve depth -hpu 02/19/25 ForLoop.Invoke(startPosX - biomeSize + 35, startPosX + biomeSize - 35, 1, (X) => { - for (int Y = startPosY - 65; Y <= startPosY + 50; Y++) + int curveDepth = (int)MathHelper.Lerp( + totalCuveDepth, + 0f, + MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 20, startPosX + biomeSize - 200, X, true))); + int curveDepth2 = (int)MathHelper.Lerp( + totalCuveDepth, + 0f, + MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 17, startPosX - biomeSize + 200, X, true))); + int random = WorldGen.genRand.Next(-40, 10); + for (int Y = startPosY - 25 + curveDepth + curveDepth2; Y <= startPosY + 50; Y++) { ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(WorldGen.genRand.Next(2, 5)), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y + random), new Shapes.Mound(WorldGen.genRand.Next(7, 10),5), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); - WorldUtils.Gen(new Point(X, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y + random), new ModShapes.All(circle), Actions.Chain(new GenAction[] { new Actions.Clear() })); @@ -226,7 +237,7 @@ namespace CalamityMod.World const int furthestDistanceFromCenter = 55; const int shortestDistanceFromCenter = 35; const int holeStart = 50; - const int holeDepth = 35; + const int holeDepth = 32; ForLoop.Invoke(startPosX - furthestDistanceFromCenter, startPosX - shortestDistanceFromCenter, 1, (holeX) => { for (int holeY = startPosY + holeStart; holeY <= startPosY + holeStart + holeDepth; holeY += 3) @@ -234,12 +245,12 @@ namespace CalamityMod.World ShapeData circle = new(); // As the hole gets deeper, we want the holes to be bigger and more blurry, so it's not so monotonous. - int sizeIncrement = (int)Utils.Remap(holeY, startPosY + holeStart, startPosY + holeStart + holeDepth, 1, 20); + int sizeIncrement = (int)Utils.Remap(holeY, startPosY + holeStart, startPosY + holeStart + holeDepth, 1, 5); // may or may not be useful later //GenAction dither = new Modifiers.RadialDither(2 * sizeIncrement, 5 * sizeIncrement); - WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Circle(sizeIncrement), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Tail(sizeIncrement, new Vector2D(6,20)), Actions.Chain(new GenAction[] { new Actions.ClearTile(), // The shape removes tiles. new Actions.SetLiquid() // The shape adds liquid (Default to max water). @@ -255,7 +266,7 @@ namespace CalamityMod.World // As the hole gets deeper, we want the holes to be bigger and more blurry, so it's not so monotonous. int sizeIncrement = (int)Utils.Remap(holeY, startPosY + holeStart, startPosY + holeStart + holeDepth, 1, 20); - WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Circle(sizeIncrement), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Tail(sizeIncrement, new Vector2D(6, 20)), Actions.Chain(new GenAction[] { new Actions.ClearTile(), // The shape removes tiles. new Actions.SetLiquid() // The shape adds liquid (Default to max water). @@ -273,15 +284,6 @@ namespace CalamityMod.World } }); - //slope tiles - ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 1, (X) => - { - for (int Y = startPosY - 50; Y <= startPosY + 50; Y++) - { - Tile.SmoothSlope(X, Y); - } - }); - //place layer of sand on valid runestone blocks ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 1, (X) => { @@ -307,9 +309,9 @@ namespace CalamityMod.World // ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 100, (wallPillarX) => { - int randomDisplacementX = WorldGen.genRand.Next(-10, 30); + int randomDisplacementX = WorldGen.genRand.Next(-40, 80); - for (int wallPillarY = startPosY - 75; wallPillarY <= startPosY + 70; wallPillarY += 10) + for (int wallPillarY = startPosY - 75; wallPillarY <= startPosY + 120; wallPillarY += 10) { // Along the height of the pillar, it becomes shorter the more closer to the center we get. int pillarWidth = (int)(CalamityUtils.Convert01To010(Utils.GetLerpValue(startPosY - 75, startPosY + 50, wallPillarY)) * 25); @@ -318,7 +320,7 @@ namespace CalamityMod.World GenAction blotchFilter = new Modifiers.Blotches(2, 0.4); GenAction ditherFilter = new Modifiers.Dither(Math.Min(Utils.GetLerpValue(startPosY + 40, startPosY + 70, wallPillarY) + 0.25, 1)); - WorldUtils.Gen(new Point(randomDisplacementX + wallPillarX + pillarWidth / 2, wallPillarY), new Shapes.Rectangle(25 - pillarWidth + 3, 12), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(randomDisplacementX + wallPillarX + pillarWidth / 2, wallPillarY), new Shapes.Rectangle(25 - pillarWidth + 3, 15), Actions.Chain(new GenAction[] { ditherFilter.Output(rectangle), // Applies a dithering filter to the rectangle. blotchFilter.Output(rectangle), // Applies a blotch filter to the rectangle. @@ -337,23 +339,31 @@ namespace CalamityMod.World // ForLoop.Invoke(startPosX - biomeSize - 25, startPosX + biomeSize + 25, 20, (x) => { - for (int y = startPosY - 70; y >= startPosY - 200; y -= 15) + int curveDepth = (int)MathHelper.Lerp( + totalCuveDepth, + 0f, + MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 20, startPosX + biomeSize - 200, x, true))); + int curveDepth2 = (int)MathHelper.Lerp( + totalCuveDepth, + 0f, + MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 17, startPosX - biomeSize + 200, x, true))); + for (int y = startPosY - 5; y >= startPosY - 149; y -= 15) { float interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 150, y, true); - float ditherStrength = MathHelper.Lerp(0f, 0.95f, interpolator); + float ditherStrength = MathHelper.Lerp(0f, 0.0f, interpolator); - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(15), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(x, y + curveDepth + curveDepth2), new Shapes.Circle(15), Actions.Chain(new GenAction[] { new Modifiers.OnlyTiles(TileID.Sand, TileID.HardenedSand), - new Modifiers.Dither(ditherStrength + 0.2f), + new Modifiers.Dither(ditherStrength + 0f), new Actions.ClearTile(), new Actions.PlaceTile((ushort)ModContent.TileType()), })); // changing these makes the walls dither higher up than tiles, to prevent the biome from changing earlier than expected. still looks nice imo :) interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 200, y, true); - ditherStrength = MathHelper.Lerp(0f, 0.95f, interpolator); + ditherStrength = MathHelper.Lerp(0f, 0f, interpolator); - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(15), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(x, y + curveDepth + curveDepth2), new Shapes.Circle(15), Actions.Chain(new GenAction[] { new Modifiers.OnlyWalls(WallID.Sandstone, WallID.HardenedSand), new Modifiers.Dither(ditherStrength), @@ -363,8 +373,8 @@ namespace CalamityMod.World // i forgot to change this one. :peepotired: interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 150, y, true); - ditherStrength = MathHelper.Lerp(0f, 0.95f, interpolator); - WorldUtils.Gen(new Point(x, y), new Shapes.Circle(15), Actions.Chain(new GenAction[] + ditherStrength = MathHelper.Lerp(0f, 0f, interpolator); + WorldUtils.Gen(new Point(x, y + curveDepth + curveDepth2), new Shapes.Circle(15), Actions.Chain(new GenAction[] { new Modifiers.OnlyTiles(TileID.Sandstone), new Modifiers.Dither(ditherStrength), @@ -384,6 +394,16 @@ namespace CalamityMod.World })); } } + + + //slope tiles + ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 1, (X) => + { + for (int Y = startPosY - 300; Y <= startPosY + 200; Y++) + { + Tile.SmoothSlope(X, Y); + } + }); }); } @@ -432,11 +452,11 @@ namespace CalamityMod.World ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X - 40, Y - 25), new Shapes.Circle(60), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X - 15, Y - 20), new Shapes.Tail(50, new Vector2D(0,-50)), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); - WorldUtils.Gen(new Point(X - 40, Y - 25), new ModShapes.All(circle), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X - 15, Y - 20), new ModShapes.All(circle), Actions.Chain(new GenAction[] { new Actions.Clear(), new Actions.PlaceTile((ushort)ModContent.TileType()) @@ -450,11 +470,11 @@ namespace CalamityMod.World ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X + 40, Y - 25), new Shapes.Circle(60), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X + 10, Y - 5), new Shapes.Tail(50, new Vector2D(37, -20)), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); - WorldUtils.Gen(new Point(X + 40, Y - 25), new ModShapes.All(circle), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X + 10, Y - 5), new ModShapes.All(circle), Actions.Chain(new GenAction[] { new Actions.Clear(), new Actions.PlaceTile((ushort)ModContent.TileType()) @@ -466,7 +486,7 @@ namespace CalamityMod.World } } }); - + bool runonce = false; //generate the actual caverns for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) { @@ -476,11 +496,21 @@ namespace CalamityMod.World { float percent = dist / constant; float blurPercent = 0.99f; + if (percent > blurPercent) { + if (runonce = false) //place smaller shellstone clumps infront of the basalt so the basalt isnt actually inside of the biome itself - WorldGen.TileRunner(X, Y, WorldGen.genRand.Next(8, 12), WorldGen.genRand.Next(8, 12), ModContent.TileType(), true, 0f, 0f, true, true); + { + WorldGen.TileRunner(X, Y, WorldGen.genRand.Next(8, 12), WorldGen.genRand.Next(8, 12), ModContent.TileType(), true, 0f, 0f, true, true); + runonce = true; + } + if (runonce = true) + //place smaller shellstone clumps infront of the basalt so the basalt isnt actually inside of the biome itself + { + WorldGen.TileRunner(X, Y, WorldGen.genRand.Next(8, 12), WorldGen.genRand.Next(8, 12), ModContent.TileType(), false, 0f, 0f, true, true); + } } else { @@ -488,11 +518,11 @@ namespace CalamityMod.World Main.tile[X, Y].ClearEverything(); //generate perlin noise caves - float horizontalOffsetNoise = CalamityUtils.PerlinNoise2D(X / 80f, Y / 80f, 5, unchecked(cavePerlinSeed + 1)) * 0.01f; - float cavePerlinValue = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 750f, 5, cavePerlinSeed) + 0.5f + horizontalOffsetNoise; - float cavePerlinValue2 = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 750f, 5, unchecked(cavePerlinSeed - 1)) + 0.5f; + float horizontalOffsetNoise = CalamityUtils.PerlinNoise2D(X / 90f, Y / 90f, 3, unchecked(cavePerlinSeed + 1)) * 0.01f; + float cavePerlinValue = CalamityUtils.PerlinNoise2D(X / 150f, Y / 90f, 3, cavePerlinSeed) + 0.5f + horizontalOffsetNoise; + float cavePerlinValue2 = CalamityUtils.PerlinNoise2D(X / 150f, Y / 90f, 3, unchecked(cavePerlinSeed - 1)) + 0.5f; float caveNoiseMap = (cavePerlinValue + cavePerlinValue2) * 0.5f; - float caveCreationThreshold = horizontalOffsetNoise * 3.5f + 0.280f; + float caveCreationThreshold = horizontalOffsetNoise * 3.5f + 0.380f; //kill or place tiles depending on the noise map if (caveNoiseMap * caveNoiseMap > caveCreationThreshold) @@ -504,11 +534,13 @@ namespace CalamityMod.World WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); } + + //place walls in the biome using a different "seed" so it differs from the cave generation //this creates a neat effect where walls worm their way through the caverns while leaving openings for the background to show through - float horizontalOffsetNoiseWalls = CalamityUtils.PerlinNoise2D(X / 80f, Y / 80f, 5, unchecked(cavePerlinSeedWalls + 1)) * 0.01f; - float cavePerlinValueWalls = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 750f, 5, cavePerlinSeedWalls) + 0.5f + horizontalOffsetNoiseWalls; - float cavePerlinValue2Walls = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 750f, 5, unchecked(cavePerlinSeedWalls - 1)) + 0.5f; + float horizontalOffsetNoiseWalls = CalamityUtils.PerlinNoise2D(X / 80f, Y / 80f, 2, unchecked(cavePerlinSeedWalls + 1)) * 0.01f; + float cavePerlinValueWalls = CalamityUtils.PerlinNoise2D(X / 200f, Y / 160f, 4, cavePerlinSeedWalls) + 0.5f + horizontalOffsetNoiseWalls; + float cavePerlinValue2Walls = CalamityUtils.PerlinNoise2D(X / 200f, Y / 160f, 4, unchecked(cavePerlinSeedWalls - 1)) + 0.5f; float caveNoiseMapWalls = (cavePerlinValueWalls + cavePerlinValue2Walls) * 0.5f; float caveCreationThresholdWalls = horizontalOffsetNoiseWalls * 3.5f + 0.280f; @@ -516,6 +548,10 @@ namespace CalamityMod.World { WorldGen.PlaceWall(X, Y, ModContent.WallType()); } + if (caveNoiseMapWalls * caveNoiseMapWalls < (caveCreationThresholdWalls - (caveNoiseMapWalls * 0.2f))) + { + WorldGen.KillTile(X, Y); + } Main.tile[X, Y].Get().LiquidType = LiquidID.Water; Main.tile[X, Y].LiquidAmount = byte.MaxValue; @@ -624,7 +660,7 @@ namespace CalamityMod.World float angle = MathHelper.Pi * 0.15f; float otherAngle = MathHelper.PiOver2 - angle; - int biomeSize = 120 + (Main.maxTilesX / 180); + int biomeSize = 150 + (Main.maxTilesX / 180); float actualSize = biomeSize * 16f; float constant = actualSize * 2f / (float)Math.Sin(angle); @@ -652,7 +688,7 @@ namespace CalamityMod.World { ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(WorldGen.genRand.Next(1, 3)), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y), new Shapes.Slime(WorldGen.genRand.Next(1, 3)), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -670,8 +706,8 @@ namespace CalamityMod.World //generate perlin noise caves float horizontalOffsetNoise = CalamityUtils.PerlinNoise2D(X / 80f, Y / 80f, 5, unchecked(cavePerlinSeed + 1)) * 0.01f; - float cavePerlinValue = CalamityUtils.PerlinNoise2D(X / 700f, Y / 650f, 5, cavePerlinSeed) + 0.5f + horizontalOffsetNoise; - float cavePerlinValue2 = CalamityUtils.PerlinNoise2D(X / 700f, Y / 650f, 5, unchecked(cavePerlinSeed - 1)) + 0.5f; + float cavePerlinValue = CalamityUtils.PerlinNoise2D(X / 600f, Y / 550f, 5, cavePerlinSeed) + 0.5f + horizontalOffsetNoise; + float cavePerlinValue2 = CalamityUtils.PerlinNoise2D(X / 600f, Y / 550f, 5, unchecked(cavePerlinSeed - 1)) + 0.5f; float caveNoiseMap = (cavePerlinValue + cavePerlinValue2) * 0.5f; float caveCreationThreshold = horizontalOffsetNoise * 3.5f + 0.235f; @@ -688,8 +724,8 @@ namespace CalamityMod.World //place walls in the biome using a different "seed" so it differs from the cave generation //this creates a neat effect where walls worm their way through the caverns while leaving openings for the background to show through float horizontalOffsetNoiseWalls = CalamityUtils.PerlinNoise2D(X / 80f, Y / 80f, 5, unchecked(cavePerlinSeedWalls + 1)) * 0.01f; - float cavePerlinValueWalls = CalamityUtils.PerlinNoise2D(X / 700f, Y / 650f, 5, cavePerlinSeedWalls) + 0.5f + horizontalOffsetNoiseWalls; - float cavePerlinValue2Walls = CalamityUtils.PerlinNoise2D(X / 700f, Y / 650f, 5, unchecked(cavePerlinSeedWalls - 1)) + 0.5f; + float cavePerlinValueWalls = CalamityUtils.PerlinNoise2D(X / 600f, Y / 350f, 5, cavePerlinSeedWalls) + 0.5f + horizontalOffsetNoiseWalls; + float cavePerlinValue2Walls = CalamityUtils.PerlinNoise2D(X / 600f, Y / 350f, 5, unchecked(cavePerlinSeedWalls - 1)) + 0.5f; float caveNoiseMapWalls = (cavePerlinValueWalls + cavePerlinValue2Walls) * 0.5f; float caveCreationThresholdWalls = horizontalOffsetNoiseWalls * 3.5f + 0.235f; @@ -699,6 +735,10 @@ namespace CalamityMod.World WorldGen.PlaceWall(X, Y, ModContent.WallType()); } + if ((caveNoiseMapWalls + 0.065f) * (caveNoiseMapWalls + 0.065f) > caveCreationThresholdWalls) + { + WorldGen.PlaceWall(X, Y, ModContent.WallType()); + } Main.tile[X, Y].Get().LiquidType = LiquidID.Water; Main.tile[X, Y].LiquidAmount = byte.MaxValue; } @@ -858,11 +898,11 @@ namespace CalamityMod.World ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(10, 0.4); - WorldUtils.Gen(new Point(X, Y - 10), new Shapes.Circle(20), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y + 5), new Shapes.Slime(20), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); - WorldUtils.Gen(new Point(X, Y - 10), new ModShapes.All(circle), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y + 5), new ModShapes.All(circle), Actions.Chain(new GenAction[] { new Actions.Clear(), new Actions.PlaceTile((ushort)ModContent.TileType()) @@ -896,7 +936,7 @@ namespace CalamityMod.World { ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(WorldGen.genRand.Next(1, 3)), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y), new Shapes.Slime(WorldGen.genRand.Next(1, 3)), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -1047,11 +1087,11 @@ namespace CalamityMod.World { int biomeSize = 200 + (Main.maxTilesX / 180); - int XLeft = GenVars.UndergroundDesertLocation.Left + 30; - int XRight = GenVars.UndergroundDesertLocation.Right - 30; - + int XLeft = GenVars.UndergroundDesertLocation.Left + 53; + int XRight = GenVars.UndergroundDesertLocation.Right - 53; + //place circles of basalt along the 2 edges of the area - for (int Y = startPosY - 60; Y <= Main.maxTilesY - 230; Y += 20) + for (int Y = startPosY - 120; Y <= Main.maxTilesY - 230; Y += 20) { ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); @@ -1059,7 +1099,7 @@ namespace CalamityMod.World int radius = WorldGen.genRand.Next(30, 45); int RandomX = Main.rand.Next(-25, 25); - WorldUtils.Gen(new Point(XLeft, Y), new Shapes.Circle(radius), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(XLeft, Y), new Shapes.Slime(radius), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -1071,7 +1111,7 @@ namespace CalamityMod.World new Actions.PlaceWall(WallID.LavaUnsafe1) })); - WorldUtils.Gen(new Point(XRight, Y), new Shapes.Circle(radius), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(XRight, Y), new Shapes.Slime(radius), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -1087,7 +1127,7 @@ namespace CalamityMod.World //place blocks of basalt all the way down to hell, here it just places one block and wall so it doesnt hurt preformance ForLoop.Invoke(startPosX - biomeSize - 25, startPosX + biomeSize + 25, 1, (X) => { - for (int Y = startPosY - 30; Y <= Main.maxTilesY - 200; Y++) + for (int Y = startPosY - 30; Y <= Main.maxTilesY - 250; Y++) { Main.tile[X, Y].ClearEverything(); WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); @@ -1098,12 +1138,12 @@ namespace CalamityMod.World //place another wall of circles along the bottom of the biome so it doesnt just end unnaturally ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 20, (X) => { - int Y = Main.maxTilesY - 250; + int Y = Main.maxTilesY - 230; ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(25), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y), new Shapes.Slime(25), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -1231,15 +1271,15 @@ namespace CalamityMod.World for (int Y = 20; Y <= Main.maxTilesY - 20; Y++) { //place coral blobs in the radiant reefs - if (WorldGen.genRand.NextBool(100) && ((Main.tile[X, Y].TileType == ModContent.TileType() && !Main.tile[X, Y - 1].HasTile) || + if (WorldGen.genRand.NextBool(1000) && ((Main.tile[X, Y].TileType == ModContent.TileType() && !Main.tile[X, Y - 1].HasTile) || (Main.tile[X, Y].TileType == ModContent.TileType() && !Main.tile[X, Y + 1].HasTile))) { ushort[] Corals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - + ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(WorldGen.genRand.Next(2, 4)), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(WorldGen.genRand.Next(1, 3)), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -1440,37 +1480,37 @@ namespace CalamityMod.World if (Main.tile[X, Y].TileType == ModContent.TileType()) { //BranchCoralsOnSand - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(55)) { ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y + 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, 3); } - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(55)) { ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y + 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, 1); } - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(55)) { ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, 5); } - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(55)) { ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, 4); } - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(55)) { ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, 3); } - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(55)) { ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y + 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, 2); } - if (WorldGen.genRand.NextBool(15)) + if (WorldGen.genRand.NextBool(55)) { ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y + 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, 8); @@ -1482,7 +1522,7 @@ namespace CalamityMod.World WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(DigitateCorals)); } - if (WorldGen.genRand.NextBool(8)) + if (WorldGen.genRand.NextBool(15)) { ushort[] FryCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -1503,22 +1543,23 @@ namespace CalamityMod.World WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(StalkCorals)); } - if (WorldGen.genRand.NextBool(8)) + if (WorldGen.genRand.NextBool(10)) { ushort[] FryCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(FryCorals)); } - if (WorldGen.genRand.NextBool(8)) + if (WorldGen.genRand.NextBool(10)) { ushort[] TallDigitateCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(TallDigitateCorals)); } + //Driftwood Ambiance - if (WorldGen.genRand.NextBool(8)) + if (WorldGen.genRand.NextBool(15)) { ushort[] DriftwoodPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -1530,7 +1571,7 @@ namespace CalamityMod.World if (Main.tile[X, Y].TileType == ModContent.TileType()) { //Driftwood Ambiance - if (WorldGen.genRand.NextBool(5)) + if (WorldGen.genRand.NextBool(15)) { ushort[] DriftwoodPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -1713,6 +1754,7 @@ namespace CalamityMod.World (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), }; void getAttachedPoints(int x, int y, List points)