From 889d5d5fce3f2830cf2bd2ae3bafc8a2165f919b Mon Sep 17 00:00:00 2001 From: Heart-Plus-Up <85328817+Heart-Plus-Up@users.noreply.github.com> Date: Sat, 30 Aug 2025 14:39:52 -0700 Subject: [PATCH] Sunken Kelp is real now, wall coral hell (still wip) Gil Herb Vines. More sunken sea worldgen + you can now move stuff. --- Items/Placeables/SunkenSea/TableCoralLeft.cs | 15 + Items/Placeables/SunkenSea/TableCoralLeft.png | Bin 0 -> 663 bytes NPCs/SunkenSea/PrismBack.cs | 3 +- Systems/Tile/TileFramingSystem.cs | 4 +- Tiles/CalamityGlobalTile.cs | 5 + Tiles/Rubblemaker/SunkenSea/TableCoralEcho.cs | 10 - Tiles/Rubblemaker/SunkenSea/WallCoralEcho.cs | 30 +- Tiles/SunkenSea/Ambient/GilHerb.cs | 79 ++++++ Tiles/SunkenSea/Ambient/GilHerb.png | Bin 0 -> 2549 bytes Tiles/SunkenSea/Ambient/SunkenShip.cs | 41 +++ Tiles/SunkenSea/Ambient/SunkenShip.png | Bin 0 -> 5928 bytes Tiles/SunkenSea/Ambient/TableCoral.cs | 22 +- Tiles/SunkenSea/Ambient/TableCoral.png | Bin 1054 -> 1659 bytes Tiles/SunkenSea/Ambient/TableCoral2.png | Bin 982 -> 0 bytes Tiles/SunkenSea/Ambient/TableCoral3.png | Bin 1091 -> 0 bytes Tiles/SunkenSea/Ambient/TableCoralLeft.cs | 38 +++ Tiles/SunkenSea/Ambient/TableCoralLeft.png | Bin 0 -> 1662 bytes Tiles/SunkenSea/Ambient/WallCoral.cs | 51 +--- Tiles/SunkenSea/Ambient/WallCoral.png | Bin 0 -> 2685 bytes Tiles/SunkenSea/Ambient/WallCoral1.png | Bin 1464 -> 0 bytes Tiles/SunkenSea/Ambient/WallCoral2.png | Bin 1233 -> 0 bytes Tiles/SunkenSea/Ambient/WallCoral3.png | Bin 1302 -> 0 bytes Tiles/SunkenSea/Ambient/WallCoral4.png | Bin 1227 -> 0 bytes Tiles/SunkenSea/Ambient/WallCoralLeft.cs | 38 +++ Tiles/SunkenSea/Ambient/WallCoralLeft.png | Bin 0 -> 2614 bytes Tiles/SunkenSea/EutrophicSand.cs | 73 +---- Tiles/SunkenSea/HardenedEutrophicSand.cs | 14 + Tiles/SunkenSea/Limestone.cs | 21 ++ Tiles/SunkenSea/SunkenKelp.cs | 147 ++++++++++ Tiles/SunkenSea/SunkenKelp.png | Bin 2079 -> 900 bytes World/SunkenSea.cs | 258 +++++++++++------- 31 files changed, 594 insertions(+), 255 deletions(-) create mode 100644 Items/Placeables/SunkenSea/TableCoralLeft.cs create mode 100644 Items/Placeables/SunkenSea/TableCoralLeft.png create mode 100644 Tiles/SunkenSea/Ambient/GilHerb.cs create mode 100644 Tiles/SunkenSea/Ambient/GilHerb.png create mode 100644 Tiles/SunkenSea/Ambient/SunkenShip.cs create mode 100644 Tiles/SunkenSea/Ambient/SunkenShip.png delete mode 100644 Tiles/SunkenSea/Ambient/TableCoral2.png delete mode 100644 Tiles/SunkenSea/Ambient/TableCoral3.png create mode 100644 Tiles/SunkenSea/Ambient/TableCoralLeft.cs create mode 100644 Tiles/SunkenSea/Ambient/TableCoralLeft.png create mode 100644 Tiles/SunkenSea/Ambient/WallCoral.png delete mode 100644 Tiles/SunkenSea/Ambient/WallCoral1.png delete mode 100644 Tiles/SunkenSea/Ambient/WallCoral2.png delete mode 100644 Tiles/SunkenSea/Ambient/WallCoral3.png delete mode 100644 Tiles/SunkenSea/Ambient/WallCoral4.png create mode 100644 Tiles/SunkenSea/Ambient/WallCoralLeft.cs create mode 100644 Tiles/SunkenSea/Ambient/WallCoralLeft.png create mode 100644 Tiles/SunkenSea/SunkenKelp.cs diff --git a/Items/Placeables/SunkenSea/TableCoralLeft.cs b/Items/Placeables/SunkenSea/TableCoralLeft.cs new file mode 100644 index 0000000000..835a1e43df --- /dev/null +++ b/Items/Placeables/SunkenSea/TableCoralLeft.cs @@ -0,0 +1,15 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.SunkenSea +{ + public class TableCoralLeft : ModItem, ILocalizedModType + { + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + } +} diff --git a/Items/Placeables/SunkenSea/TableCoralLeft.png b/Items/Placeables/SunkenSea/TableCoralLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..db7fa149c07303f4ef8c8e1ad3afc90dae137435 GIT binary patch literal 663 zcmV;I0%-k-P)Px%QAtEWR9J=Wn9pkyK@`V7E2Yw6Xh}6x2vs~N_F|QqLrCZ$5JDQQwhfV#28$36v#-facaqXXQ^);YX5Q?Zx10Iwn|T}W zaq3!=9<-1vc>sSqj`-Vju9t^7%Nml-lSDPpp&Us9kS{kn21;EV>&pX4oMe2Yn_m+k zxBEjI7n05rJ9a5f?d*;C%%`YvTH%or!z;Bhm zkQcqKO+!HLw6yKFQO!1YNq33GuHV<+>B9m5PqSM9q_0E($n8cow^VIZv!A_Eb~5+Q za;phw%efX2iCfpkZM*EtLPfLJD|>(); + int tileType = ModContent.TileType(); // Assure the kelp still exists, if it's gone, clear the tile if ((TileX != 0 || TileY != 0) && t.TileType != tileType) diff --git a/Systems/Tile/TileFramingSystem.cs b/Systems/Tile/TileFramingSystem.cs index 8294009f1b..169adcfb8c 100644 --- a/Systems/Tile/TileFramingSystem.cs +++ b/Systems/Tile/TileFramingSystem.cs @@ -93,6 +93,8 @@ namespace CalamityMod.Systems (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), ]; private static int[][] PlantValidGrounds; @@ -121,7 +123,7 @@ namespace CalamityMod.Systems PlantValidGrounds[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantValidGrounds[ModContent.TileType()] = new int[1] { ModContent.TileType() }; PlantValidGrounds[ModContent.TileType()] = new int[2] { ModContent.TileType(), ModContent.TileType() }; - PlantValidGrounds[ModContent.TileType()] = new int[1] { ModContent.TileType() }; + PlantValidGrounds[ModContent.TileType()] = new int[2] { ModContent.TileType(), ModContent.TileType() }; VineToGrass = new Dictionary { diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index 222d30dfc0..be54ad4ca5 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -32,6 +32,11 @@ namespace CalamityMod.Tiles TileType(), TileType(), TileType(), + TileType(), + TileType(), + TileType(), + TileType(), + TileType(), TileType(), TileType(), TileType() diff --git a/Tiles/Rubblemaker/SunkenSea/TableCoralEcho.cs b/Tiles/Rubblemaker/SunkenSea/TableCoralEcho.cs index 28345f79b5..ebe0e4e805 100644 --- a/Tiles/Rubblemaker/SunkenSea/TableCoralEcho.cs +++ b/Tiles/Rubblemaker/SunkenSea/TableCoralEcho.cs @@ -50,14 +50,4 @@ namespace CalamityMod.Tiles.Rubblemaker.SunkenSea frameYOffset = yPos * subsheetHeight; } } - - public class TableCoralEcho2 : TableCoralEcho - { - public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/TableCoral2"; - } - - public class TableCoralEcho3 : TableCoralEcho - { - public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/TableCoral3"; - } } diff --git a/Tiles/Rubblemaker/SunkenSea/WallCoralEcho.cs b/Tiles/Rubblemaker/SunkenSea/WallCoralEcho.cs index da444b3432..f7ef145f92 100644 --- a/Tiles/Rubblemaker/SunkenSea/WallCoralEcho.cs +++ b/Tiles/Rubblemaker/SunkenSea/WallCoralEcho.cs @@ -5,9 +5,9 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.Rubblemaker.SunkenSea { - public class WallCoral1Echo : WallCoral1 + public class WallCoralEcho : WallCoral { - public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/WallCoral1"; + public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/WallCoral"; public override void SetStaticDefaults() { base.SetStaticDefaults(); @@ -17,31 +17,9 @@ namespace CalamityMod.Tiles.Rubblemaker.SunkenSea } } - public class WallCoral2Echo : WallCoral2 + public class WallCoralLeftEcho : WallCoralLeft { - public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/WallCoral2"; - public override void SetStaticDefaults() - { - base.SetStaticDefaults(); - RegisterItemDrop(ModContent.ItemType(), Type, 0); - //FlexibleTileWand.RubblePlacementLarge.AddVariations(ModContent.ItemType(), Type, 0); - } - } - - public class WallCoral3Echo : WallCoral3 - { - public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/WallCoral3"; - public override void SetStaticDefaults() - { - base.SetStaticDefaults(); - RegisterItemDrop(ModContent.ItemType(), Type, 0); - //FlexibleTileWand.RubblePlacementLarge.AddVariations(ModContent.ItemType(), Type, 0); - } - } - - public class WallCoral4Echo : WallCoral4 - { - public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/WallCoral4"; + public override string Texture => "CalamityMod/Tiles/SunkenSea/Ambient/WallCoralLeft"; public override void SetStaticDefaults() { base.SetStaticDefaults(); diff --git a/Tiles/SunkenSea/Ambient/GilHerb.cs b/Tiles/SunkenSea/Ambient/GilHerb.cs new file mode 100644 index 0000000000..a3b6f3b65d --- /dev/null +++ b/Tiles/SunkenSea/Ambient/GilHerb.cs @@ -0,0 +1,79 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace CalamityMod.Tiles.SunkenSea.Ambient +{ + public class GilHerb : ModTile + { + public override void SetStaticDefaults() + { + Main.tileCut[Type] = true; + Main.tileSolid[Type] = false; + Main.tileNoFail[Type] = true; + Main.tileNoAttach[Type] = true; + TileID.Sets.IsVine[Type] = true; + TileID.Sets.VineThreads[Type] = true; + AddMapEntry(new Color(41, 97, 126)); + DustType = DustID.Grass; + HitSound = SoundID.Grass; + } + + public override void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem) + { + Tile tile = Framing.GetTileSafely(i, j + 1); + if (tile.HasTile && tile.TileType == Type) + WorldGen.KillTile(i, j + 1); + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + Tile tileAbove = Framing.GetTileSafely(i, j - 1); + int type = -1; + if (tileAbove.HasTile && !tileAbove.BottomSlope) + type = tileAbove.TileType; + + if (type == ModContent.TileType() || type == Type) + return true; + + WorldGen.KillTile(i, j); + return true; + } + + public override void RandomUpdate(int i, int j) + { + Tile tileBelow = Framing.GetTileSafely(i, j + 1); + if (WorldGen.genRand.NextBool(5) && !tileBelow.HasTile && tileBelow.LiquidType != LiquidID.Lava) + { + bool PlaceVine = false; + int Test = j; + while (Test > j - 10) + { + Tile testTile = Framing.GetTileSafely(i, Test); + if (testTile.BottomSlope) + { + break; + } + else if (!testTile.HasTile || testTile.TileType != ModContent.TileType()) + { + Test--; + continue; + } + PlaceVine = true; + break; + } + + if (PlaceVine) + { + tileBelow.TileType = Type; + tileBelow.HasTile = true; + WorldGen.SquareTileFrame(i, j + 1, true); + if (Main.dedServ) + NetMessage.SendTileSquare(-1, i, j + 1, 3, TileChangeType.None); + } + } + } + } +} diff --git a/Tiles/SunkenSea/Ambient/GilHerb.png b/Tiles/SunkenSea/Ambient/GilHerb.png new file mode 100644 index 0000000000000000000000000000000000000000..5f73fb29181fa3cf6ab90639b33d086133f37667 GIT binary patch literal 2549 zcmZ8jdsvd^8~&WFX?gq=dC0>=%_Un}%LAEErct)kQaq&MDYGooL4s#%S(c=x3#}zK ztxfZUq=w*7S}IBg&aU(ph`OKeAp|lV2bE|K9C7&g{SLO zPwGc!fGqDyEwc6=pK=MM9pl?;#W*ocuGLNyKfL1e&Alr*E_p@Q_PEk7Yz@?P-HP08 zU#sQxwN|$i!xw+QZO3kcDPBLo4!_0b^o|?-EyLnB(S_3u7;%9GPcOMCv+$7(0>hqR z$79a1smmTST`Qr+fScg~bzq==`AZ;psez;n!2Fl3fVZO!l=+ZNm^t{AG6O%vQ3kk= zWLiKBMp~J}p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%x4-*HpiKSij8Ckx+Y zzi?r6(ytN>=1;xvuIVGyFT9!@FUbdh6S^amK36wG@?a1I`V`ky3ihG@@(H2i&s89t z1=R;!WM@?&kQrUXJ4XJo)5PB<`C_F&Cc_;a3N^Q&xaphuY-CcHtjWB}5nfHDrKsU_ zQM5U;tSgA9)jFhV;+`pY%CXu(aR+M7AU-6DGI$xV9J|V|(m5P{J zpQxV{R_Af_{~|_&X?GzTFVB0}J9E;r!o>W}1comZgK|ms`_j{E+|H4QCwQ7i*LSV! zYsKjFxN5|AVvX`qe-OgJ(YtjKNRqwn+Ig(}KMpwV;^tiC H6#UcQ5eWdS literal 0 HcmV?d00001 diff --git a/Tiles/SunkenSea/Ambient/SunkenShip.cs b/Tiles/SunkenSea/Ambient/SunkenShip.cs new file mode 100644 index 0000000000..d32f8472c6 --- /dev/null +++ b/Tiles/SunkenSea/Ambient/SunkenShip.cs @@ -0,0 +1,41 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.Enums; +using Terraria.DataStructures; +using Terraria.Localization; + +namespace CalamityMod.Tiles.SunkenSea.Ambient +{ + public class SunkenShip : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileBlockLight[Type] = false; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style1x1); + TileObjectData.newTile.Width = 14; + TileObjectData.newTile.Height = 8; + TileObjectData.newTile.Origin = new Point16(7, 7); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16, 16, 16, 16, 16, 16, 16 }; + TileObjectData.newTile.AnchorBottom = new AnchorData( + AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, 14, 0); + + TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.SolidTile | AnchorType.SolidWithTop | AnchorType.SolidSide, TileObjectData.newTile.Width, 0); + + TileObjectData.addTile(Type); + + AddMapEntry(new Color(100, 80, 70), Language.GetText("Sunken Ship")); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/SunkenSea/Ambient/SunkenShip.png b/Tiles/SunkenSea/Ambient/SunkenShip.png new file mode 100644 index 0000000000000000000000000000000000000000..496c1e25556b64ba03c35ce735ba613a98a794cc GIT binary patch literal 5928 zcmYjVc{rO{`%bH^jt-`+)TnKyz79f5r(bZ_Au-R@w67AviubqTDYh}`B1g_$cw%_`X?(V^2=u}!kFrF=U-6$46QTK~ZUuQq z45e=xSd=JR45S+!S{04Wew@&B?2bhb$U6Wba&B97^LUo_1P^LZ~w+So0U@VyMJp|D5x=5~9bJUPwOh1d;Qv-Ze zK!w_W@iVQ!Eb-j-ip;SZPc$Qi%wGI&*(u>2HldF{V=5m%1nV1?)e;9RrL9tBa!YPB z1B%ZcY{Ov!`_`gTc>9^vc;otT3`aYq+2`BUYAlD_G{<+-^WHiZOFstKnIi=rsvXr! z`6u+|E@n36UgINe_*$P94**z?Ye3i2WzKjc(t^eH zYsHl;R!B4=M`Kz)wTOO>gZcLlSSA|nXI+a62154c^=c2D&!CLPH(zlvm`|wV=!5H8 z^~{o&YTdFf4Gh{_Lwp&F5lx~Rv&`}b^S8whGCX2Be%=-mK3jU(dLVgf0lJw%Vs|1g zt+kDOnxJVoRW$3Eh|5Wj=3XeI|IuXdFDQ-AXW_K|;WXtayDzIhQ`A4dmKU@c91|f; z;9DEk!-MU8HX_zrBoNe{*40CR;n7IXxu070vo;r_5}Bp$2(il?(aVM5OV3_2VevZz z@`l5xS<_)j{x90PEgW633fkiO+`|;xhId6%4imD)#&xZsQczkNy4INCVTi7DB1ZqwYIEiubcXB#a=W4Vj!gu-x@`a zZR-T#ZQ+7dG6ZLn+aqU+@EumP7`~|s()A8ZE=Pv5ZB5z1F`<~V6Cwtk7OZHiS)pff z!WE6Zy|j=QUIWMVQ;xkzwkf-8uvK5l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ea/Ambient/TableCoral.cs index 8d2c9bd58d..fc71856e8d 100644 --- a/Tiles/SunkenSea/Ambient/TableCoral.cs +++ b/Tiles/SunkenSea/Ambient/TableCoral.cs @@ -10,21 +10,21 @@ namespace CalamityMod.Tiles.SunkenSea.Ambient { public class TableCoral : ModTile { + private const int Variants = 3; public override void SetStaticDefaults() { Main.tileFrameImportant[Type] = true; Main.tileNoAttach[Type] = true; Main.tileSolidTop[Type] = true; + + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleWrapLimit = Variants; + TileObjectData.newTile.RandomStyleRange = Variants; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); - TileObjectData.newTile.StyleMultiplier = 2; - TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0); - TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); - TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile, 2, 0); - TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; - TileObjectData.addAlternate(1); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, 2, 0); - TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; TileObjectData.addTile(Type); + DustType = 253; AddMapEntry(new Color(54, 69, 72)); } @@ -34,12 +34,4 @@ namespace CalamityMod.Tiles.SunkenSea.Ambient num = fail ? 1 : 3; } } - - public class TableCoral2 : TableCoral - { - } - - public class TableCoral3 : TableCoral - { - } } diff --git a/Tiles/SunkenSea/Ambient/TableCoral.png b/Tiles/SunkenSea/Ambient/TableCoral.png index 9d89cd26ed7f4bf134f6f612819852947069a2d4..be8d875999db52aa7db169c0f4e866a3243f4ed6 100644 GIT binary patch literal 1659 zcmV->288*EP)Px*HAzH4RCt{2n_o7>dE5+{k~?G|X0dQ5Vs4wQOx|T~-&h z?!2lSZP~i&rgf3lT1;EhrPb0EE`&5T?69L8Ap%8I5EW#SjV_+|i|_OEdC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P(;bdl2xMVyM)Hmd{P!sxO4{q5dOXa02rDa2b9790MoPQ0RY=he_>MD zNIqr$NNMf9|0K6eY0=^BGMFleBp9OnDSJq`XcQ*X{(O@c9b>AUtsn za4Ct9HjQt`Q7K9)iEOV*GGP_wGukT5gp3rIt*tU;BvQmJ=DA-wxiHP6+*4Ug11^P8 z4kO4WrO|l8l)GqslWnS++f{j;DvPiRvsf&aI!E$eZAJg+D9dS-J0zx)mg(RS(4y*m z*B@i;rjw3q&Pj*KPoc8S+9~Il{!=W!3wO7+j{RQ3<}m+p=qk}GGV+q5ij;~YMNtH& zYgJ~`_)Juto`;=z?M^x}P}L;XmYF{Z`A?O~ti4x?l30cLjAK`rgd&r2+tMCCSs*(Y zjcMm+obRsSAu3W&XMmqBw2=lYS+HZdP zPW{bFS=F|a;>b@88=lr7yVtpkunO}TCn9Qe$P*H;$SU-(^G_;PVHS(UVzF2(7K`us Y58`3UNY(`$YybcN07*qoM6N<$f>;m>tpET3 diff --git a/Tiles/SunkenSea/Ambient/TableCoral2.png b/Tiles/SunkenSea/Ambient/TableCoral2.png deleted file mode 100644 index 150bdffd38f2a0f3c246721ed6b6d1aebce9f54f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 982 zcmV;{11bE8P)Px&kV!;ARA_K)GHKC&E!crU>2-GlyO0Z3v78wLV(Aq_-K>7~? z!F8Kf5eR~{XcI(6KVWFkgupPIbfGCKX+l#t71QGRo!&d%J8ynz^XPmw&w2OW^Uisk z?>qM%LlAUS*QWuXt@4{3GBUc63<1Ekqt)r07L?e|Z0axoU@Ey1GL7dOPqF?KYsW91 zeZ@GV>^&9ygPGXZZ~_2uCfsOTFtNVmy|EDk05l&vU7RNtJ2pSa(Da*}%wK7{ly$sZ z;>!53j5G{NQ-uYL3VCCEc@6-u@Z~+=%8VN=-JW@onkE3ia3bazpV?e2$|2fmJk@O+ zU-}RS06d(J=Vh0fYqQ@c>@zMuh1>9ZKOAQqeBZ2LHdJ8&Bc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xYq7ijPME_jYHWN~L1Ca}P z#Y_H{q9j&fKI5Or8Yj7GTrQ}DV)^;kunMzSEEbE!VzF3!&rb{g>}4e8?)d-!002ov JPDHLkV1k>p7w!N6 diff --git a/Tiles/SunkenSea/Ambient/TableCoralLeft.cs b/Tiles/SunkenSea/Ambient/TableCoralLeft.cs new file mode 100644 index 0000000000..d483514583 --- /dev/null +++ b/Tiles/SunkenSea/Ambient/TableCoralLeft.cs @@ -0,0 +1,38 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.SunkenSea.Ambient +{ + public class TableCoralLeft : ModTile + { + private const int Variants = 3; + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileSolidTop[Type] = true; + + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleWrapLimit = Variants; + TileObjectData.newTile.RandomStyleRange = Variants; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorLeft = new AnchorData(AnchorType.SolidTile, 2, 0); + TileObjectData.addTile(Type); + + DustType = 253; + AddMapEntry(new Color(54, 69, 72)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/SunkenSea/Ambient/TableCoralLeft.png b/Tiles/SunkenSea/Ambient/TableCoralLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..e107da9edea2e5705c9a42d1a9ce7f17f742af68 GIT binary patch literal 1662 zcmV-^27&pBP)Px*I7vi7RCt{2non$0MI6V!Pgfdfv9*O(DhmON)UJ{sQpA9U8kK_{#Aq~t2V+b; z8Av2CkrO5;(L+z3^q`mbBeqLtWUN&HTK03Do0MHU0O**X5y!_N-PXorO2+mG*UmO6!eOI)8no^7?_=3QN zXoC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K*eJWMkEd-;8SVnjg@1VIo4K@bE%5ClOG1VIo4LAa&(A7OUX(QyNPFaQ7m07*qo IM6N<$f{G;@^8f$< literal 0 HcmV?d00001 diff --git a/Tiles/SunkenSea/Ambient/WallCoral.cs b/Tiles/SunkenSea/Ambient/WallCoral.cs index 39e2e2dd73..a01eefb85c 100644 --- a/Tiles/SunkenSea/Ambient/WallCoral.cs +++ b/Tiles/SunkenSea/Ambient/WallCoral.cs @@ -2,25 +2,27 @@ using Terraria; using Terraria.DataStructures; using Terraria.Enums; -using Terraria.Localization; using Terraria.ModLoader; using Terraria.ObjectData; namespace CalamityMod.Tiles.SunkenSea.Ambient { - public class WallCoral1 : ModTile + public class WallCoral : ModTile { + private const int Variants = 4; public override void SetStaticDefaults() { Main.tileFrameImportant[Type] = true; Main.tileNoAttach[Type] = true; Main.tileSolidTop[Type] = false; Main.tileLighted[Type] = true; + + + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleWrapLimit = Variants; + TileObjectData.newTile.RandomStyleRange = Variants; TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); - TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0); - TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); - TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile, 2, 0); - TileObjectData.addAlternate(1); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, 2, 0); TileObjectData.addTile(Type); DustType = 253; @@ -31,42 +33,5 @@ namespace CalamityMod.Tiles.SunkenSea.Ambient { num = fail ? 1 : 3; } - - public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) - { - r = 0.42f; - g = 0.16f; - b = 0.16f; - } - } - - public class WallCoral2 : WallCoral1 - { - public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) - { - r = 0.213f; - g = 0.349f; - b = 0.416f; - } - } - - public class WallCoral3 : WallCoral1 - { - public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) - { - r = 0.151f; - g = 0.342f; - b = 0.284f; - } - } - - public class WallCoral4 : WallCoral1 - { - public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) - { - r = 0.38f; - g = 0.28f; - b = 0.32f; - } } } diff --git a/Tiles/SunkenSea/Ambient/WallCoral.png b/Tiles/SunkenSea/Ambient/WallCoral.png new file mode 100644 index 0000000000000000000000000000000000000000..6ef197c60ba785985cbc82abfa9eb769b74efc3b GIT binary patch literal 2685 zcmV-@3WD{CP)PxWfjJsm6Z}HErKpmcH1q`4)o8&r35OKHkQ;jB|u`VA0S4d zL=#a0sm1uo=ob@KQp2BbrHUpRT|yvIvamoxmD)c*?W|pPwn%rowPjlk*rkMGoAJYW zpS$y(op=%s^8TZlV!`o zN4$T(2M0Da0l)*FzTX@F<$oXb{#`$n(e)X||0T`!zJN6D{r(#74zcy|o+bcTfA_ab z05Ipmf1=XyMrCQ|gM3+nDcL#4H#V-47f*_!4ILT+0L+^|4*>AMAyG6cnJJiIL?kl> z3n@|B{PXYlCIDdI(7OPD^><%U0)X~AS9|k6dG5D0xlYDPR2IEoE3W<0SNXCbmF$&u z>%4!jTe`cab$!3c=e_lQSSU2q=S_o3HL~w80ASU1^8o;lH$Mje7;W7J0O%h*B_|w{ zjVYL6L?rVVZ1JX_0sz*Z5+!=!SHJe|WLoK{Oec%y0RXOl=uT8R-qkZ4<$7xsGqnvI z1OW7I-U9dv)=*Hn+J5{60Ko9i-vi1NXtK(qmFxEJUIzf^d*b2}0Bq~q(U3}}vxelz zUrqo3TEF~x0Klw+UjzUQ;%{!oDQ~_hm|;XDa|Jv2&O1O^3^jY_t`Y$Jr`Ye^$*6SO zdtL$nf0oa+GIvu6 z0Cp62*5!^)rJ-`A%?l|R6>#6tqu%)1br%5uP7jHa-!)hExAoQJ@~bATZlz(?@Q+Wv z=8eDh)}gB2&lJosB9gg+F&nsW{*?fL+}w5mz@B1%#re0c5#=~gcs-Nrq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tsLJD>@( ziVLp38Yt^zrlTXP=Ok)E&o|T^&Fm}FUdNDgLwgWoJ+nUKWJrTC49}mV`n@!b*3n!o z`t#|}p~tNbW*8Y#_upt{eN1}@b)Q(SD8H)miSj1G^^K)H<9@p6=M^TXXUvBPbwGz) z^pkbdPn9$U(RXlW9qEE+Rt@+#umWkUj^=7flo}H&J-;8$vuAP`Mh4Vf!9pF)I+oIP zHF_Ak-0y>pIYZ*Yez2q?Ssf24RVaqiPod(s!8%!}b2=;Z9sKC~{_&meS4FhKX*kY0 z84eDc=

RrGQ~&JTS&YbQr6v_mA8lf$SjjM1zP rW*CNH7=~dOhG7_nVHk#C7r1g3800000NkvXXu0mjfEuu8z literal 0 HcmV?d00001 diff --git a/Tiles/SunkenSea/Ambient/WallCoral1.png b/Tiles/SunkenSea/Ambient/WallCoral1.png deleted file mode 100644 index 5efc01eaecd5160fcc73562ac2239e98315aa20d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1464 zcmV;p1xNacP)Px)a!Eu%RCr$Pn$N3MRTRgc7#M<3NMVnjhM)t@Cpl;m)F813mj8egY0^L%1S&Rh z;KZxzU#Z!k9}86#ivsqSkWnK!`P_+tYbkCfCXS3^FYVU4Tc3^9rHlP%ngPGU>);7 z$IK0e1z^2BaDHy??|??rAPr?q+6uoqei zM5$cqT86!j()TVKU@UOv^L6Q+i^qOX-&dBF(znG7Yat52o=FK0L*E8sjQ3~A185V$*LQy6+GQeQMo)eh?e3W5a zw;~?EVI=Y&%&lqY{bM2jCenHC)!By)xij<4-!R5vh%#CkhVoONW(K!qZW&C^r2?>O zi~HXL);4lNzRUw7V_4biL#nL@`UZ>~p*aHs$T@WmyPEGj`SoVcoWkC(W%JBOxw@Qs zGk=i-$xUDXurgiWyMA@g9QOThkJ9zeK75+K$#qnDQpEas6@jc)KN>MNF6_&b2ZKqgc2^Opp;gIm-v3<+o?i~Vll0UP zT*<>s7=jv@eD2T8p!vJklAgKOwkAD0U&##A$cLfUd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Bu0E?-6fIRGpC>K6BcY zuUq{!aYO30-?yLZUAsp&Z@K=yar2#h{-dpUh8bW<&>534^&B$%O0d{}+r>bqy2 zyDLoNv1dQmd>YKs<$!6u8*4s`KbW=9x6c(FsT@pY4*gF|Tuk)O>hqd|=ilB2m;sh< zQ!odMCOX5Hyskb@X6RL3dn1$j&eP~=5e_(RdMTta(q5I{jj-{CQR%0x&@B;QiyM8_pRyk0q#U_6Xe-$wtU z@-YLfzT%o6wjE%~AS_&?JuK80l~Iom@hKBo8K%k!K+wl2 z58r}CUz>m7ln(M6m_xoqK1Mn3h=krtq&_qrQRw-ey$PiwG=Ej|4Y2yV7Y10qQKyX- zc?EL!VUg$C_QU56m_|*$^D9*{RILXYRC^Q(%2D0HGBx`4)`Rb10vpqP~(m3r1;v#+>n~ zzInz1Bs8u8R{tTNE|dW#E28I2`pZdG;gu<>EHFI2P$e>-cBsBdl@}Oav?}joTFV(0 zS|BEFfYnx_<$wW*o?~gWrM?89RpV2JY2M^JKht2zcdiyY3M`!u0~iA=9lDk=EM!T( zdf)j|$cIrMTZvfib7k#kfMs2&71FLWfGM*yx>Lo(r%>p5T&sOjqjq3`)&EUIqYKxn z_N4<%qsmZp7YbgCVUbKPBoS$JnKjxpz#;)=!?rkaHUO5l0)GGkq=15c2?8Gg0000< MMNUMnLSTXb0Q@R$Bme*a diff --git a/Tiles/SunkenSea/Ambient/WallCoral4.png b/Tiles/SunkenSea/Ambient/WallCoral4.png deleted file mode 100644 index 901f50fcdb509a339954afbdb8ef4285bd10d0d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1227 zcmV;+1T_1JP)Px(g-Jv~RCr$PTuq2hQ5c>HCCrq+gs)~MkxV1aSV%H{7OW73QWj&O#5A%{%1S8< znTC{wStx}ftXTLNNfu_3X(ZCj)Q99}Y6dAp-tJTG(|5jezk5&T-fLc)>zsSed(VBJ z_c`y+x!+V*>AzfQpgLEp)x}mRU^z1a1xx{RtASICPX7K^;=z}P#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1,38 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.SunkenSea.Ambient +{ + public class WallCoralLeft : ModTile + { + public const int Variants = 4; + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileSolidTop[Type] = false; + Main.tileLighted[Type] = true; + + TileObjectData.newTile.StyleHorizontal = true; + TileObjectData.newTile.StyleWrapLimit = Variants; + TileObjectData.newTile.RandomStyleRange = Variants; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorLeft = new AnchorData(AnchorType.SolidTile, 2, 0); + TileObjectData.addTile(Type); + DustType = 253; + AddMapEntry(new Color(54, 69, 72)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/SunkenSea/Ambient/WallCoralLeft.png b/Tiles/SunkenSea/Ambient/WallCoralLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..f8e349d9e820c01d35f75c00e14ce4a03d091fe4 GIT binary patch literal 2614 zcmX|Ddpy$%8~@3PQ__XpOQH}OXLIQ?iRLoRr3hi}mqip?WL9)sN~1)=XkLU?zx>$9sw!KbKOd=5Y9 zCDU-6A>X*uyd%g#SJaLp>Wj9%$fA_Gj0 z@?_hY*SOD>0f2~GsF3li{KEr9IUeaL1;mXtH?#9G2#>YOHpuL2LAW#^`FY!_{$b(` z{u!>~oAxl1w%;8hSeJYNfY*o908Ad9kOE$4t)2m1m+qHME*RET7g8^Z`s000ZP4a$ zJ||8x=8wLeAWS_MQz z2{f#@7TvrRP@T#>x%{Oc4kW9@ww-1=psNs4_X4$|K=MxY(E+$HveNwM*Pd$<!!ovhRv-9}MWPxI0Ke^f-~2=T z2uRhIiCY~@vg-b~8wIt?pL6d^0f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0d161b29fd 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -45,26 +45,12 @@ namespace CalamityMod.Tiles.SunkenSea public override void RandomUpdate(int i, int j) { - if (!WorldGen.genRand.NextBool(8)) - return; - Tile tile = Main.tile[i, j]; - if (tile.HasTile || tile.LiquidAmount <= 0) - return; - - if (tile.LeftSlope || tile.RightSlope || tile.IsHalfBlock) - return; - Tile up = Main.tile[i, j - 1]; - if (up.HasTile || up.LiquidAmount <= 0) - return; - Tile up2 = Main.tile[i, j - 2]; - if (up2.HasTile || up2.LiquidAmount <= 0) - return; // Place corals - if (WorldGen.genRand.NextBool(3)) + if (WorldGen.genRand.NextBool(8) && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) { up.TileType = (ushort)ModContent.TileType(); up.HasTile = true; @@ -79,57 +65,18 @@ namespace CalamityMod.Tiles.SunkenSea NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None); } } - - //multi-colored corals - if (WorldGen.genRand.NextBool(3)) + // Place sunken kelp + if (WorldGen.genRand.NextBool(2) && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) { - ushort[] ColoredCorals = new ushort[] { (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; + up.TileType = (ushort)ModContent.TileType(); + up.HasTile = true; - ushort newObject = Main.rand.Next(ColoredCorals); + WorldGen.SquareTileFrame(i, j - 1, true); - WorldGen.PlaceObject(i, j - 1, newObject, true); - NetMessage.SendObjectPlacement(-1, i, j - 1, newObject, 0, 0, -1, -1); - } - - //blue coral trees - if (WorldGen.genRand.NextBool(6)) - { - ushort[] BlueCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - - ushort newObject = Main.rand.Next(BlueCorals); - - WorldGen.PlaceObject(i, j - 1, newObject, true); - NetMessage.SendObjectPlacement(-1, i, j - 1, newObject, 0, 0, -1, -1); - } - - //brown coral trees - if (WorldGen.genRand.NextBool(6)) - { - ushort[] BrownCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - - ushort newObject = Main.rand.Next(BrownCorals); - - WorldGen.PlaceObject(i, j - 1, newObject, true); - NetMessage.SendObjectPlacement(-1, i, j - 1, newObject, 0, 0, -1, -1); - } - - //fan coral - if (WorldGen.genRand.NextBool(10)) - { - WorldGen.PlaceObject(i, j - 1, (ushort)ModContent.TileType()); - } - - //misc corals - if (WorldGen.genRand.NextBool()) - { - ushort[] MiscCorals = new ushort[] { (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - - ushort newObject = Main.rand.Next(MiscCorals); - - WorldGen.PlaceObject(i, j - 1, newObject, true); - NetMessage.SendObjectPlacement(-1, i, j - 1, newObject, 0, 0, -1, -1); + if (Main.dedServ) + { + NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None); + } } } diff --git a/Tiles/SunkenSea/HardenedEutrophicSand.cs b/Tiles/SunkenSea/HardenedEutrophicSand.cs index 27c252ec75..957214a8c7 100644 --- a/Tiles/SunkenSea/HardenedEutrophicSand.cs +++ b/Tiles/SunkenSea/HardenedEutrophicSand.cs @@ -85,6 +85,20 @@ namespace CalamityMod.Tiles.SunkenSea NetMessage.SendObjectPlacement(-1, i, j - 1, (ushort)ModContent.TileType(), 0, 0, -1, -1); } } + + // Place sunken kelp + if (WorldGen.genRand.NextBool(2) && !up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) + { + up.TileType = (ushort)ModContent.TileType(); + up.HasTile = true; + + WorldGen.SquareTileFrame(i, j - 1, true); + + if (Main.dedServ) + { + NetMessage.SendTileSquare(-1, i, j - 1, 3, TileChangeType.None); + } + } } } } diff --git a/Tiles/SunkenSea/Limestone.cs b/Tiles/SunkenSea/Limestone.cs index 91779fe959..fb13b3429f 100644 --- a/Tiles/SunkenSea/Limestone.cs +++ b/Tiles/SunkenSea/Limestone.cs @@ -1,5 +1,6 @@ using CalamityMod.Systems; using CalamityMod.Tiles.Merges; +using CalamityMod.Tiles.SunkenSea.Ambient; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -49,5 +50,25 @@ namespace CalamityMod.Tiles.SunkenSea { return TileFramingSystem.BetterGemsparkFraming(i, j, resetFrame); } + public override void RandomUpdate(int i, int j) + { + Tile Tile = Framing.GetTileSafely(i, j); + Tile Below = Framing.GetTileSafely(i, j + 1); + Tile Above = Framing.GetTileSafely(i, j - 1); + + if (!Below.HasTile && Below.LiquidType <= 0 && !Tile.BottomSlope) + { + if (Main.rand.NextBool(10)) + { + Below.TileType = (ushort)ModContent.TileType(); + Below.HasTile = true; + WorldGen.SquareTileFrame(i, j + 1, true); + if (Main.dedServ) + { + NetMessage.SendTileSquare(-1, i, j + 1, 3, TileChangeType.None); + } + } + } + } } } diff --git a/Tiles/SunkenSea/SunkenKelp.cs b/Tiles/SunkenSea/SunkenKelp.cs new file mode 100644 index 0000000000..d8c6aab42d --- /dev/null +++ b/Tiles/SunkenSea/SunkenKelp.cs @@ -0,0 +1,147 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.SunkenSea +{ + public class SunkenKelp : ModTile + { + private const int MaxChainLength = 18; + private static readonly ushort[] ValidAnchors = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; + + private const short FrameBottom = 0; + private const short FrameMid = 18; + private const short FrameTop = 36; + private const short FrameWidth = 18; + + public override void SetStaticDefaults() + { + Main.tileCut[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileID.Sets.IsVine[Type] = true; + TileID.Sets.DisableSmartCursor[Type] = true; + + HitSound = SoundID.Grass; + DustType = DustID.Grass; + + AddMapEntry(new Color(27, 112, 68)); + } + + public override void RandomUpdate(int i, int j) + { + if (!IsTopmostSegment(i, j)) + return; + + if (j <= 0 || Main.tile[i, j - 1].HasTile) + return; + + if (!IsSupportedFromBelow(i, j)) + return; + + if (GetChainLengthUpward(i, j) >= MaxChainLength) + return; + + bool placed = WorldGen.PlaceTile(i, j - 1, Type, mute: true, forced: true); + if (placed) + { + SetFrame(i, j - 1, FrameTop); + SetFrame(i, j, FrameMid); + UpdateBaseSegment(i, j + GetChainLengthDownward(i, j)); + } + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + if (!IsSupportedFromBelow(i, j)) + { + WorldGen.KillTile(i, j, noItem: true, effectOnly: false); + return false; + } + + if (IsTopmostSegment(i, j)) + SetFrame(i, j, FrameTop); + else if (IsBottomSegment(i, j)) + SetFrame(i, j, FrameBottom); + else + SetFrame(i, j, FrameMid); + + return false; + } + + private static bool IsSupportedFromBelow(int i, int j) + { + if (j >= Main.maxTilesY - 1) return false; + Tile below = Main.tile[i, j + 1]; + if (!below.HasTile) return false; + + ushort t = below.TileType; + if (t == ModContent.TileType()) + return true; + + foreach (ushort anchor in ValidAnchors) + if (t == anchor) + return true; + + return false; + } + + private static bool IsTopmostSegment(int i, int j) + { + if (j <= 0) return true; + Tile above = Main.tile[i, j - 1]; + return !(above.HasTile && above.TileType == ModContent.TileType()); + } + + private static bool IsBottomSegment(int i, int j) + { + if (j >= Main.maxTilesY - 1) return true; + Tile below = Main.tile[i, j + 1]; + return !(below.HasTile && below.TileType == ModContent.TileType()); + } + + private static int GetChainLengthUpward(int i, int j) + { + int length = 1; + int y = j - 1; + int vineType = ModContent.TileType(); + while (y >= 0 && Main.tile[i, y].HasTile && Main.tile[i, y].TileType == vineType) + { + length++; + y--; + if (length > MaxChainLength) break; + } + return length; + } + + private static int GetChainLengthDownward(int i, int j) + { + int length = 0; + int y = j + 1; + int vineType = ModContent.TileType(); + while (y < Main.maxTilesY && Main.tile[i, y].HasTile && Main.tile[i, y].TileType == vineType) + { + length++; + y++; + } + return length; + } + + private static void SetFrame(int i, int j, short frameYRow) + { + Tile tile = Main.tile[i, j]; + tile.TileFrameX = (short)(WorldGen.genRand.Next(3) * FrameWidth); + tile.TileFrameY = frameYRow; + } + + private static void UpdateBaseSegment(int i, int bottomY) + { + Tile t = Main.tile[i, bottomY]; + if (t.HasTile && t.TileType == ModContent.TileType()) + SetFrame(i, bottomY, FrameBottom); + } + } +} diff --git a/Tiles/SunkenSea/SunkenKelp.png b/Tiles/SunkenSea/SunkenKelp.png index d6ef19a3c684a4f62ebdb8e9f96fe177f8d49ac4..46c82c6488d6f810cf7b7e9b300e5fc6f477d0d5 100644 GIT binary patch literal 900 zcmV-~1AF|5P)Px&K1oDDRA_~k6t~S0l@a_7XX0m z)*me5>hw1A`>)U6YAC?dw=ZV^&^W9E04BXH0Ki@MveY_z$49fp=V|Uf1_1OvjsO7D zfm`qT{35f?gQ7)O84vY>GQ~&(jxk1PS(IIeOevHpA|A#pSnslL{6;UU*$G_aH$TK=Wz4;o!h)&{~#X5tO#%Jxd>aD zu%KEa$i!8*cs{csnd0;Lv|fG279!xX(W#46ibzP4^vE(EDxYJh+c&1?_YD^nk7RJ3x+e2(1=$ozUm0tj5x;$ZW=l z_R}or?la42&qASZ0GSH)h6;5mp%s1g8Porq6|TDcP;GFWu9Gt0aS+rNnH~?_PkKgu z-gvrH{7+RIj7S468!=1v4acFNX3gHmnHy(02r}E;%~sCzmg{;HBiPTIcZtenB{HAxf1T`oUpD0Z@vxqGp2?r3;!ZA6mT4kh#`vx?a$kP-@AZf1HTT<2Gee9D$6M!U zzMef1FJr#GUMNzpnYi`PGi_?KEaGEK`+A)l_B!& zg7BTPDD?Ek2h}9s9Ic=ix@j5a;$e*M@|)+nZ*A$&Tui01)pITDYXJ+KXI0P^D$Cd! atA@XiT7o> literal 2079 zcmaJ?dpy(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+OKLZxPE-&G;m=etnl~l*zp)G0G z9Z5gM{zAvuRhYP>>k2)#Caw+f-fuQ@F;qQJbmXv}Y5ew776n}>=Nq0z1+OGpF-R)| zL|S3=r}F?uq6jhorD|w1js5y%bl({I=71{?(qOaLaQb-JYWhR<%shOkem2%8w`u-G zG=U=Mr7h@?i+V%x?eG5^-mfod{?`CA8vNI$cI7ZD^4iBn3@g1V>`EZ5jH_>o?6a!v zqMM|$8chPCF=fd%Kzfa6z1D`x*fAL&oqMZjjOF2w?C11ppxl-dA4r zO=OLrK9VPD0^zN98u!+`>w)VNTHQb*Vd1y6FDp9pL}5XLvDsW4EnwV(yi{evA%b?ct8Qiq$qZ{*HU^$D3YrTV0<@8xCHCXKxdO3OgDkz9?yEmxQL8$s_cQv_)3xrvSTo(kVV2j6&M7({!LtHiK5-E72{Vq8(R-%s#+ z9JJax3Td9cumWEOrrHG^QIlk?Ww#<`BjPL#u2Z&L%B`< zYG2ymVOimSc*%xEX&?^27&1!dzBfDRPb=*@|G6TJ}5cug{8D|3-2dbYmG@Z z$4)2CR?M+z*bxswi^|-(MmDHK?uIPN7GdI(lJM5B5@7p%w7a#ct_n^*z8~_j)kb#k zDJ6(ATth9y)7(PQ@-q!>_`x1h2~dW}#^~6Vi^SINpk+A*i+^mt{D0drIr-b8&vd9@ zV0M+d%D8?bg_vj3LLhA!RX>va;pnf#KE$l;mu&EI_Q>jG9SM!IP*UZf7 WUMy8FcTr_8KETf#>P7QJXZ{Bypb5DE diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 8830825e46..769ca64ca5 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -19,7 +19,18 @@ namespace CalamityMod.World { public class SunkenSea { - /* + + internal static class SSOffsets + { + public static int TimelessShoresX = 0, TimelessShoresY = 0; + public static int RadiantReefsX = 0, RadiantReefsY = 55; + public static int PolypForestX = 0, PolypForestY = 0; + public static int GleamingBurrowsX = 0, GleamingBurrowsY = 75; + public static int ClamDenX = 0, ClamDenY = 75; + public static int BasaltGullyX = 0, BasaltGullyY = 15; + public static int GlobalX = 0, GlobalY = -20; + } +/* checklist: -Add the wall corals properly @@ -38,6 +49,10 @@ namespace CalamityMod.World public static void PlaceTimelessShores(int startPosX, int startPosY) { + int startX = startPosX + SSOffsets.GlobalX + SSOffsets.TimelessShoresX; + + int startY = startPosY + SSOffsets.GlobalY + SSOffsets.TimelessShoresY; + int biomeSize = 250 + (Main.maxTilesX / 180); // @@ -53,10 +68,10 @@ namespace CalamityMod.World else return -steepness * x + steepness; } - ParallelFor(startPosX - biomeSize - 5, startPosX + biomeSize + 20, 15, (X) => + ParallelFor(startX - biomeSize - 5, startX + biomeSize + 20, 15, (X) => { - float height = MathHelper.Lerp(startPosY + 35, startPosY - 15, trapezoidLateralSteep(Utils.GetLerpValue(startPosX - biomeSize - 20, startPosX + biomeSize + 20, X))); - for (int Y = startPosY + 25; Y >= height; Y -= 10) + float height = MathHelper.Lerp(startY + 35, startY - 15, trapezoidLateralSteep(Utils.GetLerpValue(startX - biomeSize - 20, startX + biomeSize + 20, X))); + for (int Y = startY + 25; Y >= height; Y -= 10) { ShapeData circle = new ShapeData(); WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(30), Actions.Chain(new GenAction[] @@ -72,10 +87,10 @@ namespace CalamityMod.World // Makes the bottom borders of the Timeless Shores curved downwards. // const int totalCuveDepth = 90; - ParallelFor(startPosX - biomeSize - 10, startPosX - biomeSize + 200, 10, (x) => + ParallelFor(startX - biomeSize - 10, startX - biomeSize + 200, 10, (x) => { - int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 17, startPosX - biomeSize + 200, x, true))); - for (int y = startPosY + 50; y <= startPosY + 70 + curveDepth; y += 5) + int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startX - biomeSize - 17, startX - biomeSize + 200, x, true))); + for (int y = startY + 50; y <= startY + 70 + curveDepth; y += 5) { ShapeData circle = new(); WorldUtils.Gen(new Point(x, y), new Shapes.Slime(30), Actions.Chain(new GenAction[] @@ -86,10 +101,10 @@ namespace CalamityMod.World WorldUtils.Gen(new Point(x, y), new ModShapes.All(circle), new Actions.SetTile((ushort)ModContent.TileType())); } }); - ParallelFor(startPosX + biomeSize - 200, startPosX + biomeSize + 10, 5, (x) => + ParallelFor(startX + biomeSize - 200, startX + biomeSize + 10, 5, (x) => { - int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 20, startPosX + biomeSize - 200, x, true))); - for (int y = startPosY + 50; y <= startPosY + 70 + curveDepth; y += 5) + int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startX + biomeSize + 20, startX + biomeSize - 200, x, true))); + for (int y = startY + 50; y <= startY + 70 + curveDepth; y += 5) { ShapeData circle = new(); WorldUtils.Gen(new Point(x, y), new Shapes.Slime(30), Actions.Chain(new GenAction[] @@ -103,13 +118,13 @@ 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 - ParallelFor(startPosX - biomeSize + 10, startPosX + biomeSize - 10, 1, (X) => + ParallelFor(startX - biomeSize + 10, startX + biomeSize - 10, 1, (X) => { - 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 curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startX + biomeSize + 20, startX + biomeSize - 200, X, true))); + int curveDepth2 = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startX - biomeSize - 17, startX - biomeSize + 200, X, true))); int random = WorldGen.genRand.Next(-40, 10); - for (int Y = startPosY - 25 + curveDepth + curveDepth2; Y <= startPosY + 50; Y++) + for (int Y = startY - 25 + curveDepth + curveDepth2; Y <= startY + 50; Y++) { ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); @@ -128,24 +143,24 @@ namespace CalamityMod.World // // Places slopes at the sides of the shores to actually make shores. // - ParallelFor(startPosX - biomeSize - 15, startPosX - biomeSize + 200, 20, (moundX) => + ParallelFor(startX - biomeSize - 15, startX - biomeSize + 200, 20, (moundX) => { int RandomX = Main.rand.Next(15, 20); ShapeData mound = new(); GenAction blotchMod = new Modifiers.Blotches().Output(mound); - int moundY = startPosY + 75; - int moundHeight = (int)MathHelper.Lerp(60f, 5f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize + 27, startPosX - biomeSize + 200, moundX))); + int moundY = startY + 75; + int moundHeight = (int)MathHelper.Lerp(60f, 5f, MathF.Sqrt(Utils.GetLerpValue(startX - biomeSize + 27, startX - biomeSize + 200, moundX))); WorldUtils.Gen(new Point(moundX, moundY), new Shapes.Mound(30, moundHeight), blotchMod); WorldUtils.Gen(new Point(moundX, moundY), new ModShapes.All(mound), new Actions.SetTile((ushort)ModContent.TileType())); WorldUtils.Gen(new Point(moundX, moundY), new ModShapes.All(mound), new Actions.PlaceWall((ushort)ModContent.WallType())); }); - ParallelFor(startPosX + biomeSize - 200, startPosX + biomeSize - 15, 20, (moundX) => + ParallelFor(startX + biomeSize - 200, startX + biomeSize - 15, 20, (moundX) => { ShapeData mound = new(); GenAction blotchMod = new Modifiers.Blotches().Output(mound); - int moundY = startPosY + 75; - int moundHeight = (int)MathHelper.Lerp(60f, 5f, MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize - 27, startPosX + biomeSize - 200, moundX))); + int moundY = startY + 75; + int moundHeight = (int)MathHelper.Lerp(60f, 5f, MathF.Sqrt(Utils.GetLerpValue(startX + biomeSize - 27, startX + biomeSize - 200, moundX))); WorldUtils.Gen(new Point(moundX, moundY), new Shapes.Mound(30, moundHeight), blotchMod); WorldUtils.Gen(new Point(moundX, moundY), new ModShapes.All(mound), new Actions.SetTile((ushort)ModContent.TileType())); @@ -158,11 +173,11 @@ namespace CalamityMod.World const int platformSize = 130; const int platformHeight = 35; // Remember that because of Terraria's coordinate system, making it lower actually makes it higher. const int platformDepth = 35; // How deep it goes. Like above, the higher it is, the lower it goes. - ParallelFor(startPosX - platformSize / 2, startPosX + platformSize / 2, 5, (platformX) => + ParallelFor(startX - platformSize / 2, startX + platformSize / 2, 5, (platformX) => { // This makes the "stem" of the platform be thinner towards the base and then expand on the top. - int thickness = (int)(MathF.Pow(CalamityUtils.Convert01To010(Utils.GetLerpValue(startPosX - platformSize / 2, startPosX + platformSize / 2, platformX)), 3f) * platformDepth) + platformHeight; - for (int platformY = startPosY + platformHeight; platformY <= startPosY + thickness; platformY++) + int thickness = (int)(MathF.Pow(CalamityUtils.Convert01To010(Utils.GetLerpValue(startX - platformSize / 2, startX + platformSize / 2, platformX)), 3f) * platformDepth) + platformHeight; + for (int platformY = startY + platformHeight; platformY <= startY + thickness; platformY++) { WorldUtils.Gen(new Point(platformX, platformY), new Shapes.Circle(5), Actions.Chain(new GenAction[] { @@ -172,28 +187,28 @@ namespace CalamityMod.World })); } }); - ParallelFor(startPosX - platformSize / 2, startPosX + platformSize / 2, 1, (x) => + ParallelFor(startX - platformSize / 2, startX + platformSize / 2, 1, (x) => { - float interpolator = CalamityUtils.Convert01To010(Utils.GetLerpValue(startPosX - platformSize / 2, startPosX + platformSize / 2, x, true)); + float interpolator = CalamityUtils.Convert01To010(Utils.GetLerpValue(startX - platformSize / 2, startX + platformSize / 2, x, true)); int elevation = (int)MathHelper.Lerp(4f, 1f, interpolator); - WorldUtils.Gen(new Point(x, startPosY + platformHeight - 7), new Shapes.Circle(elevation), Actions.Chain(new GenAction[] { new Actions.Clear(), })); + WorldUtils.Gen(new Point(x, startY + platformHeight - 7), new Shapes.Circle(elevation), Actions.Chain(new GenAction[] { new Actions.Clear(), })); }); // Plateau - ParallelFor(startPosX - biomeSize, startPosX + biomeSize, 100, (wallPillarX) => + ParallelFor(startX - biomeSize, startX + biomeSize, 100, (wallPillarX) => { int randomDisplacement = WorldGen.genRand.Next(-27, 46); int RandomX = Main.rand.Next(15, 20); int RandomH = Main.rand.Next(20, 35); - for (int wallPillarY = startPosY + RandomH; wallPillarY <= startPosY + 60; wallPillarY += 10) + for (int wallPillarY = startY + RandomH; wallPillarY <= startY + 60; 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 - RandomH, startPosY + 45, wallPillarY)) * 25); + int pillarWidth = (int)(CalamityUtils.Convert01To010(Utils.GetLerpValue(startY - RandomH, startY + 45, wallPillarY)) * 25); ShapeData rectangle = new ShapeData(); GenAction blotchFilter = new Modifiers.Blotches(1, 0.4); - GenAction ditherFilter = new Modifiers.Dither(Math.Min(Utils.GetLerpValue(startPosY + 30, startPosY + 70, wallPillarY) + 0.25, 1)); + GenAction ditherFilter = new Modifiers.Dither(Math.Min(Utils.GetLerpValue(startY + 30, startY + 70, wallPillarY) + 0.25, 1)); WorldUtils.Gen(new Point(randomDisplacement + wallPillarX + pillarWidth / 2, wallPillarY), new Shapes.Circle(RandomX - pillarWidth + 3, RandomX), Actions.Chain(new GenAction[] { @@ -211,9 +226,9 @@ namespace CalamityMod.World }); //place water below the clear barrier for the islands so that theres water inbetween them - ParallelFor(startPosX - biomeSize + 35, startPosX + biomeSize - 35, 1, (WaterX) => + ParallelFor(startX - biomeSize + 35, startX + biomeSize - 35, 1, (WaterX) => { - for (int WaterY = startPosY + 37; WaterY <= startPosY + 60; WaterY++) + for (int WaterY = startY + 37; WaterY <= startY + 60; WaterY++) { Main.tile[WaterX, WaterY].Get().LiquidType = LiquidID.Water; Main.tile[WaterX, WaterY].LiquidAmount = byte.MaxValue; @@ -224,19 +239,19 @@ namespace CalamityMod.World // Generates pillars made out of walls at random points in the Timeless Shores. // const int furthestDistanceFromCenter = 100; - ParallelFor(startPosX - (biomeSize / 2) - furthestDistanceFromCenter, startPosX + (biomeSize / 2) + furthestDistanceFromCenter, 100, (wallPillarX) => + ParallelFor(startX - (biomeSize / 2) - furthestDistanceFromCenter, startX + (biomeSize / 2) + furthestDistanceFromCenter, 100, (wallPillarX) => { int randomDisplacementX = WorldGen.genRand.Next(-10, 10); int RandomX = Main.rand.Next(3, 6); - for (int wallPillarY = startPosY - 75; wallPillarY <= startPosY + 80; wallPillarY += 10) + for (int wallPillarY = startY - 75; wallPillarY <= startY + 80; 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); + int pillarWidth = (int)(CalamityUtils.Convert01To010(Utils.GetLerpValue(startY - 75, startY + 50, wallPillarY)) * 25); ShapeData rectangle = new ShapeData(); 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)); + GenAction ditherFilter = new Modifiers.Dither(Math.Min(Utils.GetLerpValue(startY + 40, startY + 70, wallPillarY) + 0.25, 1)); WorldUtils.Gen(new Point(randomDisplacementX + wallPillarX + pillarWidth / 2, wallPillarY), new Shapes.Rectangle(25 - pillarWidth + 3, 15), Actions.Chain(new GenAction[] { @@ -256,14 +271,14 @@ namespace CalamityMod.World // Makes the transition area to the Timeless Shores. // Replaces tiles, walls, and places some water spots. // - ParallelFor(startPosX - biomeSize - 30, startPosX + biomeSize + 30, 20, (x) => + ParallelFor(startX - biomeSize - 30, startX + biomeSize + 30, 20, (x) => { - int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 30, startPosX + biomeSize - 200, x, true))); - int curveDepth2 = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 30, startPosX - biomeSize + 200, x, true))); + int curveDepth = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startX + biomeSize + 30, startX + biomeSize - 200, x, true))); + int curveDepth2 = (int)MathHelper.Lerp(totalCuveDepth, 0f, MathF.Sqrt(Utils.GetLerpValue(startX - biomeSize - 30, startX - biomeSize + 200, x, true))); - for (int y = startPosY - 5; y >= startPosY - 149; y -= 15) + for (int y = startY - 5; y >= startY - 149; y -= 15) { - float interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 150, y, true); + float interpolator = Utils.GetLerpValue(startY - 90, startY - 150, y, true); // This lerp does absolutely nothing. float ditherStrength = MathHelper.Lerp(0f, 0f, interpolator); @@ -277,7 +292,7 @@ namespace CalamityMod.World })); // 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); + interpolator = Utils.GetLerpValue(startY - 90, startY - 200, y, true); ditherStrength = MathHelper.Lerp(0f, 0f, interpolator); WorldUtils.Gen(new Point(x, y + curveDepth + curveDepth2), new Shapes.Circle(15), Actions.Chain(new GenAction[] @@ -289,7 +304,7 @@ namespace CalamityMod.World })); // I forgot to change this one. :peepotired: - interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 150, y, true); + interpolator = Utils.GetLerpValue(startY - 90, startY - 150, y, true); ditherStrength = MathHelper.Lerp(0f, 0f, interpolator); WorldUtils.Gen(new Point(x, y + curveDepth + curveDepth2), new Shapes.Circle(15), Actions.Chain(new GenAction[] { @@ -298,7 +313,7 @@ namespace CalamityMod.World new Actions.ClearTile(), new Actions.PlaceTile((ushort)ModContent.TileType()), })); - interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 150, y, true); + interpolator = Utils.GetLerpValue(startY - 90, startY - 150, y, true); ditherStrength = MathHelper.Lerp(0f, 0f, interpolator); WorldUtils.Gen(new Point(x, y + curveDepth + curveDepth2), new Shapes.Circle(15), Actions.Chain(new GenAction[] { @@ -311,7 +326,7 @@ namespace CalamityMod.World if (Main.tile[x, y].Get().LiquidType == LiquidID.Lava) WorldUtils.Gen(new Point(x, y), new Shapes.Rectangle(5, 5), new Actions.SetLiquid(LiquidID.Lava, 0)); - if (WorldGen.genRand.NextBool(5) && y < startPosY - 100) + if (WorldGen.genRand.NextBool(5) && y < startY - 100) { WorldUtils.Gen(new Point(x, y), new Shapes.Circle(WorldGen.genRand.Next(5, 7)), Actions.Chain(new GenAction[] { @@ -322,9 +337,9 @@ namespace CalamityMod.World } // Place layer of sand on valid runestone blocks. - for (int X = startPosX - biomeSize; X < startPosX + biomeSize; X += 1) + for (int X = startX - biomeSize; X < startX + biomeSize; X += 1) { - for (int Y = startPosY - 100; Y <= startPosY + 100; Y++) + for (int Y = startY - 100; Y <= startY + 100; Y++) { bool canPlaceSand = Main.tile[X, Y].TileType == ModContent.TileType() && @@ -352,9 +367,9 @@ namespace CalamityMod.World } // Slope tiles and Soil Spawn - for (int X = startPosX - biomeSize; X < startPosX + biomeSize; X += 1) + for (int X = startX - biomeSize; X < startX + biomeSize; X += 1) { - for (int Y = startPosY - 300; Y <= startPosY + 200; Y++) + for (int Y = startY - 300; Y <= startY + 200; Y++) { Tile.SmoothSlope(X, Y); @@ -387,13 +402,17 @@ namespace CalamityMod.World // Sides of the sunken sea (radiant reefs) public static void PlaceRadiantReefs(int startPosX, int startPosY) { + int startX = startPosX + SSOffsets.GlobalX + SSOffsets.RadiantReefsX; + + int startY = startPosY + SSOffsets.GlobalY + SSOffsets.RadiantReefsY; + int cavePerlinSeed = WorldGen.genRand.Next(); int cavePerlinSeedWalls = WorldGen.genRand.Next(); - Point origin = new Point(startPosX, startPosY); + Point origin = new Point(startX, startY); Vector2 center = origin.ToVector2() * 16f + new Vector2(8f); - float angle = MathHelper.Pi * 0.20f; + float angle = MathHelper.Pi * 0.15f; float otherAngle = MathHelper.PiOver2 - angle; int biomeSize = 280 + (Main.maxTilesX / 180); @@ -401,7 +420,7 @@ namespace CalamityMod.World float constant = actualSize * 2f / (float)Math.Sin(angle); float fociSpacing = actualSize * (float)Math.Sin(otherAngle) / (float)Math.Sin(angle); - int verticalRadius = (int)(constant / 20f); + int verticalRadius = (int)(constant / 50f); Vector2 fociOffset = Vector2.UnitY * fociSpacing; Vector2 topFoci = center - fociOffset; @@ -547,10 +566,17 @@ namespace CalamityMod.World // Middle of the sunken sea (polyp forest) public static void PlacePolypForest(int startPosX, int startPosY) { + + int startX = startPosX + SSOffsets.GlobalX + SSOffsets.PolypForestX; + + + int startY = startPosY + SSOffsets.GlobalY + SSOffsets.PolypForestY; + + int cavePerlinSeed = WorldGen.genRand.Next(); int cavePerlinSeedWalls = WorldGen.genRand.Next(); - Point origin = new Point(startPosX, startPosY - 200); + Point origin = new Point(startX, startY - 200); Vector2 center = origin.ToVector2() * 16f + new Vector2(8f); float angle = MathHelper.Pi * 0.15f; @@ -649,7 +675,7 @@ namespace CalamityMod.World { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { - if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, false, Y > origin.Y)) + if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, false, Y < origin.Y)) { //clean tiles that are sticking out (aka tiles only attached to one tile on one side) bool OnlyRight = !Main.tile[X, Y - 1].HasTile && !Main.tile[X, Y + 1].HasTile && !Main.tile[X - 1, Y].HasTile; @@ -674,9 +700,9 @@ namespace CalamityMod.World //place extra tiles for (int X = origin.X - biomeSize - 3; X < origin.X + biomeSize + 3; X += 1) { - for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 20; Y <= origin.Y + verticalRadius + 20; Y++) + for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) { - if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, false, Y > origin.Y)) + if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, false, Y < origin.Y)) { bool canPlaceSand = false; @@ -699,7 +725,7 @@ namespace CalamityMod.World { for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 20; Y <= origin.Y + verticalRadius + 20; Y++) { - if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, false, Y > origin.Y)) + if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, false, Y < origin.Y)) { bool canPlaceGrass = false; @@ -779,10 +805,14 @@ namespace CalamityMod.World //bottom of the biome (gleaming burrows) public static void PlaceGleamingBurrows(int startPosX, int startPosY) { + int startX = startPosX + SSOffsets.GlobalX + SSOffsets.GleamingBurrowsX; + + int startY = startPosY + SSOffsets.GlobalY + SSOffsets.GleamingBurrowsY; + int cavePerlinSeed = WorldGen.genRand.Next(); int cavePerlinSeedWalls = WorldGen.genRand.Next(); - Point origin = new Point(startPosX, startPosY); + Point origin = new Point(startX, startY); Vector2 center = origin.ToVector2() * 16f + new Vector2(8f); float angle = MathHelper.Pi * 0.15f; @@ -845,7 +875,7 @@ namespace CalamityMod.World if (percent > blurPercent) { - if (Y > origin.Y - 50) + if (Y > origin.Y - 15) { //place smaller navystone 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); @@ -1007,10 +1037,14 @@ namespace CalamityMod.World //Very bottom of the biome (Clam Den) public static void PlaceClamDen(int startPosX, int startPosY) { + int startX = startPosX + SSOffsets.GlobalX + SSOffsets.ClamDenX; + + int startY = startPosY + SSOffsets.GlobalY + SSOffsets.ClamDenY; + int cavePerlinSeed = WorldGen.genRand.Next(); int cavePerlinSeedWalls = WorldGen.genRand.Next(); - Point origin = new Point(startPosX, startPosY); + Point origin = new Point(startX, startY); Vector2 center = origin.ToVector2() * 16f + new Vector2(8f); float angle = MathHelper.Pi * 0.70f; @@ -1177,38 +1211,46 @@ namespace CalamityMod.World //basalt biome underneath the sunken sea public static void PlaceBasaltGully(int startPosX, int startPosY) { + int startX = startPosX + SSOffsets.GlobalX + SSOffsets.BasaltGullyX; + + int startY = startPosY + SSOffsets.GlobalY + SSOffsets.BasaltGullyY; + int biomeSize = 250 + (Main.maxTilesX / 180); int XLeft = GenVars.UndergroundDesertLocation.Left + 40; int XRight = GenVars.UndergroundDesertLocation.Right - 70; //place blocks of basalt all the way down to hell, here it just places one block and wall so it doesnt hurt preformance - for (int X = startPosX - biomeSize - 60; X < startPosX + biomeSize + 60; X += 1) + for (int X = startX - biomeSize - 80; X < startX + biomeSize + 80; X += 1) { - //const int totalCuveDepth = -120; - //const int totalCuveDepth2 = 120; - int basaltbordernoise = Main.rand.Next(180, 185); - int basaltbordernoisetop = Main.rand.Next(645, 650); - const int totalCuveDepth = -220; - const int totalCuveDepth2 = 90; + int leftEdge = startX - biomeSize - 60; + int rightEdge = startX + biomeSize + 60; + int basaltbordernoise = Main.rand.Next(0, 4); + int basaltbordernoisetop = Main.rand.Next(0, 4); + const int totalCurveDepth = -320; + const int totalCurveDepthTop = 45; int curveDepth = (int)MathHelper.Lerp( - totalCuveDepth, + totalCurveDepth, 0f, - MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 60, startPosX + biomeSize - 200, X, true))); + MathF.Sqrt(Utils.GetLerpValue(startX + biomeSize + 60, startX + biomeSize - 200, X, true))); int curveDepth2 = (int)MathHelper.Lerp( - totalCuveDepth, + totalCurveDepth, 0f, - MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 60, startPosX - biomeSize + 200, X, true))); + MathF.Sqrt(Utils.GetLerpValue(startX - biomeSize - 60, startX - biomeSize + 200, X, true))); int curveDepthtop = (int)MathHelper.Lerp( - totalCuveDepth2, + totalCurveDepthTop, 0f, - MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 60, startPosX + biomeSize - 200, X, true))); + MathF.Sqrt(Utils.GetLerpValue(startX + biomeSize + 60, startX + biomeSize - 200, X, true))); int curveDepth2top = (int)MathHelper.Lerp( - totalCuveDepth2, + totalCurveDepthTop, 0f, - MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 60, startPosX - biomeSize + 200, X, true))); + MathF.Sqrt(Utils.GetLerpValue(startX - biomeSize - 60, startX - biomeSize + 200, X, true))); - for (int Y = startPosY - 650 + curveDepthtop + curveDepth2top; Y <= Main.maxTilesY - 185 + curveDepth + curveDepth2; Y++) + for (int Y = startY - (625 + basaltbordernoisetop) + curveDepthtop + curveDepth2top; Y <= Main.maxTilesY - (270 + basaltbordernoise) + curveDepth + curveDepth2; Y++) { + int leftIndent = Main.rand.Next(0, 12); + int rightIndent = Main.rand.Next(0, 12); + if (X < leftEdge + leftIndent || X > rightEdge - rightIndent) + continue; Main.tile[X, Y].ClearEverything(); WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); WorldGen.PlaceWall(X, Y, ModContent.WallType()); @@ -1216,9 +1258,9 @@ namespace CalamityMod.World } //place caverns and lava - for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X <= startPosX + biomeSize + (Main.maxTilesX / 25); X++) + for (int X = startX - biomeSize - (Main.maxTilesX / 25); X <= startX + biomeSize + (Main.maxTilesX / 25); X++) { - for (int Y = startPosY; Y <= Main.maxTilesY - 190; Y++) + for (int Y = startY; Y <= Main.maxTilesY - 190; Y++) { if (Main.tile[X, Y].TileType == ModContent.TileType()) { @@ -1240,9 +1282,9 @@ namespace CalamityMod.World } //place sand blocks - for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X < startPosX + biomeSize + (Main.maxTilesX / 25); X += 1) + for (int X = startX - biomeSize - (Main.maxTilesX / 25); X < startX + biomeSize + (Main.maxTilesX / 25); X += 1) { - for (int Y = startPosY; Y <= Main.maxTilesY - 210; Y++) + for (int Y = startY; Y <= Main.maxTilesY - 210; Y++) { bool canPlaceSand = false; @@ -1260,9 +1302,9 @@ namespace CalamityMod.World } //cleanup - for(int X = startPosX - biomeSize - (Main.maxTilesX / 25); X < startPosX + biomeSize + (Main.maxTilesX / 25); X += 1) + for(int X = startX - biomeSize - (Main.maxTilesX / 25); X < startX + biomeSize + (Main.maxTilesX / 25); X += 1) { - for (int Y = startPosY; Y <= Main.maxTilesY - 210; Y++) + for (int Y = startY; Y <= Main.maxTilesY - 210; Y++) { //clean tiles that are sticking out (aka tiles only attached to one tile on one side) bool OnlyRight = !Main.tile[X, Y - 1].HasTile && !Main.tile[X, Y + 1].HasTile && !Main.tile[X - 1, Y].HasTile; @@ -1323,6 +1365,7 @@ namespace CalamityMod.World //place all the ambient tiles in the sunken sea public static void PlaceSunkenSeaAmbience() { + bool shipPlaced = false; //first clean up unnecessary chunks of tiles CleanOutSmallClumps(); @@ -1332,7 +1375,7 @@ namespace CalamityMod.World for (int Y = 20; Y <= Main.maxTilesY - 20; Y++) { //place coral blobs in the radiant reefs - if (WorldGen.genRand.NextBool(800) && ((Main.tile[X, Y].TileType == ModContent.TileType() && !Main.tile[X, Y - 1].HasTile) || + if (WorldGen.genRand.NextBool(400) && ((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(), @@ -1354,7 +1397,7 @@ namespace CalamityMod.World if (Main.tile[X, Y].TileType == ModContent.TileType()) { //Driftwood Ambiance - if (WorldGen.genRand.NextBool(70)) + if (WorldGen.genRand.NextBool(50)) { ushort[] DriftwoodPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -1364,7 +1407,7 @@ namespace CalamityMod.World if (Main.tile[X, Y].TileType == ModContent.TileType()) { //Driftwood Ambiance - if (WorldGen.genRand.NextBool(100)) + if (WorldGen.genRand.NextBool(75)) { ushort[] DriftwoodPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; @@ -1447,6 +1490,19 @@ namespace CalamityMod.World } if (Main.tile[X, Y].TileType == ModContent.TileType()) { + int RandStyleTable() => WorldGen.genRand.Next(3); + int styletable = RandStyleTable(); + + if (WorldGen.genRand.NextBool(5) && !Main.tile[X + 1, Y].HasTile) + { + WorldGen.PlaceTile(X + 2, Y, ModContent.TileType(), true, false, -1, styletable); + } + + if (WorldGen.genRand.NextBool(5) && !Main.tile[X - 1, Y].HasTile) + { + WorldGen.PlaceTile(X - 2, Y, ModContent.TileType(), true, false, -1, styletable); + } + //stalactites if (WorldGen.genRand.NextBool(10)) { @@ -1510,6 +1566,7 @@ namespace CalamityMod.World ushort[] BranchCorals = new ushort[] { (ushort)ModContent.TileType() }; WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(BranchCorals), true, 0, 0, style); } + } if (Main.tile[X, Y].TileType == ModContent.TileType()) { @@ -1583,6 +1640,11 @@ namespace CalamityMod.World WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(DriftwoodPiles)); } + if (!shipPlaced) + { + if (WorldGen.PlaceObject(X, Y - 1, ModContent.TileType(), mute: true)) + shipPlaced = true; + } } //radiant reefs ambient tiles @@ -1654,10 +1716,18 @@ namespace CalamityMod.World CalamityUtils.GrowVines(X, Y, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); } + if (Main.tile[X, Y].TileType == ModContent.TileType() && Main.tile[X, Y].Slope == 0 && !Main.tile[X, Y + 1].HasTile && !Main.tile[X, Y + 2].HasTile) + { + WorldGen.PlaceTile(X, Y + 1, (ushort)ModContent.TileType()); + } + if (Main.tile[X, Y].TileType == ModContent.TileType()) + { + CalamityUtils.GrowVines(X, Y, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); + } + //grow depth vines on navystone if (Main.tile[X, Y].TileType == ModContent.TileType() && Main.tile[X, Y].Slope == 0 && !Main.tile[X, Y + 1].HasTile && !Main.tile[X, Y + 2].HasTile) { - // 18APR2025: Ozzatron: removed guaranteed RNG check here, since it was intended to be guaranteed WorldGen.PlaceTile(X, Y + 1, (ushort)ModContent.TileType()); } if (Main.tile[X, Y].TileType == ModContent.TileType()) @@ -1668,22 +1738,18 @@ namespace CalamityMod.World //wall corals if (Main.tile[X, Y].TileType == ModContent.TileType()) { + + int RandStyleWall() => WorldGen.genRand.Next(4); + int stylewall = RandStyleWall(); + if (WorldGen.genRand.NextBool(5) && !Main.tile[X + 1, Y].HasTile) { - ushort[] WallCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - - WorldGen.PlaceTile(X + 2, Y, WorldGen.genRand.Next(WallCorals), true, false, -1, 0); + WorldGen.PlaceTile(X + 2, Y, ModContent.TileType(), true, false, -1, stylewall); } if (WorldGen.genRand.NextBool(5) && !Main.tile[X - 1, Y].HasTile) { - ushort[] WallCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), - (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - - WorldGen.PlaceTile(X - 2, Y, WorldGen.genRand.Next(WallCorals), true, false, -1, 0); + WorldGen.PlaceTile(X - 2, Y, ModContent.TileType(), true, false, -1, stylewall); } } // Pearl Autism