From bb7f1ed8fa78da8d2c0831cb51b60d2807e5d98c Mon Sep 17 00:00:00 2001 From: Mortis3 <53282720+DylanDoe21@users.noreply.github.com> Date: Fri, 17 Nov 2023 22:09:16 -0500 Subject: [PATCH] Many changes -Sunken sea generation polishing and fixing -Abyss generation loops now just use X and Y instead of abyssIndex and abyssIndex2 -Sunken draedon lab now generates in the sunken sea -Added abyss coral -Fixed and polished the sulphur reefs generation a bit -Added sea anemonies to the burrows because i forgot to add them earlier --- .../Vanity/{SnailHead.cs => AbyssHood.cs} | 11 +- Items/Armor/Vanity/AbyssHood.png | Bin 0 -> 522 bytes Items/Armor/Vanity/AbyssHood_Head.png | Bin 0 -> 4584 bytes .../Vanity/{SnailRobe.cs => AbyssRobe.cs} | 14 +- Items/Armor/Vanity/AbyssRobe.png | Bin 0 -> 693 bytes Items/Armor/Vanity/AbyssRobe_Body.png | Bin 0 -> 5619 bytes Items/Armor/Vanity/AbyssRobe_Legs.png | Bin 0 -> 4323 bytes Items/Armor/Vanity/SnailHead.png | Bin 474 -> 0 bytes Items/Armor/Vanity/SnailHead_Head.png | Bin 3918 -> 0 bytes Items/Armor/Vanity/SnailRobe.png | Bin 711 -> 0 bytes Items/Armor/Vanity/SnailRobe_Body.png | Bin 5673 -> 0 bytes Items/Armor/Vanity/SnailRobe_Legs.png | Bin 4338 -> 0 bytes .../Mods.CalamityMod.Items.Armor.Vanity.hjson | 12 +- Systems/WorldgenManagementSystem.cs | 7 +- Tiles/Abyss/AbyssCoral.cs | 59 +++++++ Tiles/SunkenSea/CyanCoral.cs | 8 +- Tiles/SunkenSea/HardenedEutrophicSand.cs | 43 ++++- Tiles/SunkenSea/LimeCoral.cs | 8 +- Tiles/SunkenSea/MagentaCoral.cs | 8 +- Tiles/SunkenSea/OrangeCoral.cs | 8 +- Tiles/SunkenSea/YellowCoral.cs | 8 +- World/Abyss.cs | 162 +++++++++-------- World/DraedonStructures.cs | 64 ++----- World/SulphurousSea.cs | 98 ++++++++-- World/SunkenSea.cs | 167 ++++++++---------- 25 files changed, 404 insertions(+), 273 deletions(-) rename Items/Armor/Vanity/{SnailHead.cs => AbyssHood.cs} (77%) create mode 100644 Items/Armor/Vanity/AbyssHood.png create mode 100644 Items/Armor/Vanity/AbyssHood_Head.png rename Items/Armor/Vanity/{SnailRobe.cs => AbyssRobe.cs} (76%) create mode 100644 Items/Armor/Vanity/AbyssRobe.png create mode 100644 Items/Armor/Vanity/AbyssRobe_Body.png create mode 100644 Items/Armor/Vanity/AbyssRobe_Legs.png delete mode 100644 Items/Armor/Vanity/SnailHead.png delete mode 100644 Items/Armor/Vanity/SnailHead_Head.png delete mode 100644 Items/Armor/Vanity/SnailRobe.png delete mode 100644 Items/Armor/Vanity/SnailRobe_Body.png delete mode 100644 Items/Armor/Vanity/SnailRobe_Legs.png create mode 100644 Tiles/Abyss/AbyssCoral.cs diff --git a/Items/Armor/Vanity/SnailHead.cs b/Items/Armor/Vanity/AbyssHood.cs similarity index 77% rename from Items/Armor/Vanity/SnailHead.cs rename to Items/Armor/Vanity/AbyssHood.cs index b983bc3fd3..ab6f97d03a 100644 --- a/Items/Armor/Vanity/SnailHead.cs +++ b/Items/Armor/Vanity/AbyssHood.cs @@ -8,7 +8,7 @@ using CalamityMod.Items.Materials; namespace CalamityMod.Items.Armor.Vanity { [AutoloadEquip(EquipType.Head)] - public class SnailHead : ModItem, ILocalizedModType + public class AbyssHood : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.Vanity"; @@ -32,10 +32,11 @@ namespace CalamityMod.Items.Armor.Vanity public override void AddRecipes() { CreateRecipe(). - AddIngredient(10). - AddIngredient(18). - AddTile(TileID.Loom). - Register(); + AddIngredient(10). + AddIngredient(18). + AddIngredient(ItemID.Silk, 20). + AddTile(TileID.Loom). + Register(); } } } diff --git a/Items/Armor/Vanity/AbyssHood.png b/Items/Armor/Vanity/AbyssHood.png new file mode 100644 index 0000000000000000000000000000000000000000..22a2002aa497d99187830e562dc15fcda54bc57c GIT binary patch literal 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mV?d00001 diff --git a/Items/Armor/Vanity/SnailRobe.cs b/Items/Armor/Vanity/AbyssRobe.cs similarity index 76% rename from Items/Armor/Vanity/SnailRobe.cs rename to Items/Armor/Vanity/AbyssRobe.cs index 5583c2b26b..2cf43909a3 100644 --- a/Items/Armor/Vanity/SnailRobe.cs +++ b/Items/Armor/Vanity/AbyssRobe.cs @@ -8,7 +8,7 @@ using CalamityMod.Items.Materials; namespace CalamityMod.Items.Armor.Vanity { [AutoloadEquip(EquipType.Body)] - public class SnailRobe : ModItem, ILocalizedModType + public class AbyssRobe : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.Vanity"; @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Armor.Vanity { if (Main.netMode != NetmodeID.Server) { - EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Armor/Vanity/SnailRobe_Legs", EquipType.Legs, this); + EquipLoader.AddEquipTexture(Mod, "CalamityMod/Items/Armor/Vanity/AbyssRobe_Legs", EquipType.Legs, this); } } @@ -38,11 +38,11 @@ namespace CalamityMod.Items.Armor.Vanity public override void AddRecipes() { CreateRecipe(). - AddIngredient(22). - AddIngredient(25). - AddIngredient(ItemID.Silk, 25). - AddTile(TileID.Loom). - Register(); + AddIngredient(22). + AddIngredient(25). + AddIngredient(ItemID.Silk, 25). + AddTile(TileID.Loom). + Register(); } } } diff --git a/Items/Armor/Vanity/AbyssRobe.png b/Items/Armor/Vanity/AbyssRobe.png new file mode 100644 index 0000000000000000000000000000000000000000..41b58da833ea9444523cafa55532d4bbd9d80765 GIT binary patch literal 693 zcmV;m0!safP)Px%ZAnByR9HvNSWhVIQ4}^)SZHQ4ld&MZ#A2*OS!p7h7opcHC97v+p~#=Ic(M=+ zB5%+;(XKm4lphV7ndT(<(D~F-;W;H_{pJy z#gst_BvXFowI7(IIyWzXkhgz9VXA0(82-WDKcn3&tEj}h)6Zkd{M+dc_}5n{Sh)jQ zjadgQlSru%zu%9kh2bJs=FZ}$h^NzOSB-L!POI7@K-WFi0OOXjLTWaPm38Slz>2PU;eKxByJC1O7O8;V>i%u!?OtA7!1ZmoCKm|XAVePmEF=dm7`uA<-b zS19gdcOI-fa2;(;PGG!ma0r&?8JXdYA@k{W#9_=jU_{IppzK(CX$d z*w$zx?8ecG(tYv;tox3(E3E@2nN!MrqAlKaJb}I)}3PT(u zQ^}lTgn~CE3Ui!C24&Lt|8<0nH5RrN*fa6pMqC*rQ*w~Z$@sN5=AK9VHe&qSMeZ8| by9XKv8x1*7`v?F4002ovPDHLkV1fVut=UT7 literal 0 HcmV?d00001 diff --git a/Items/Armor/Vanity/AbyssRobe_Body.png b/Items/Armor/Vanity/AbyssRobe_Body.png new file mode 100644 index 0000000000000000000000000000000000000000..20739d074229233c2af7fb6187fe5192dec41424 GIT binary patch literal 5619 zcmds*dpMK-|HrqPS`IOCj;K%+icb!avE&nqM5{4FeVh;FGvw?RDKSN}oF{~QX33D# z(1D6^aeD8g)-*x@2-+#Z~U%%`6{!WaKMZwrAyJ;2}J5PQH+jXT>t;1~37TXR!LS;xT{2t=av;&~IhyG{$)Mh|ek zlC8ZeAGEaJH}5-LVk)3Y61&UzI&RXGd?4ZRVU>Uq(t=aDdE zmu!ehX**x5-NSn_DlUG~rWxeD9Jjcv?7F2<_o(c^j;+F)^mK0dSAQyZY;OMVsrLNj zpCT~PXb9X+?5ngaVQ+?>8vHl zy9{<|KR6<4V*vrK$x64!K;Vkes8l|l;8QUag|uf+1*n2hWc>g~{#SC+uw+f6JDVm4 zbXA5LI+F6X&>6&36iw>89{O6#T;9Gx*7kAnzze;XA;4FKytf+|AYW%EnQ6Cv{!MLhw7s%f zn4*wj`~k*nYB(H?+EjDgN|eu_2!F{9f8thfP8>zy9BhCOnX#^kD4fpsaWpWZ7Kmhd zBzj@`vCM)Gx$n$#&TQc8fBMn57ZE3Md(T4v1skoQH!&#dWCGn!&)47bbe=eQ@{jE_3oOGEucXL2f`b^{kpmVl zQUWp`qO2btX4PmvS`HBVDM05oHCkPEjgK=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Ud~U|E1!p@#i90}z5A#8| zRGvq;NrC+KYt>e2;q$RSwg*_^b{Se?y4qL$&o2#*$Q3|tlj;qq$cM?j^LoGXp03v4 zO+1_`wPv8Z0SkFsEUhmwI)h^C1lIw%zxaw0`@d5GzMJ5-Dz!ea^0v+HCOoS2QXiDN zdyic>pdc1=UUuDHf#J5cy*`c9R`8DO+fwF1ccq8(F-d33UMROF`xO<@P0=mH8R6yy_5nX{ZWP77P>FVdKo zSqzIElsimcb@mjwRp`pR~3lGethGj|N5Stk&t>E6a?2H$P3N*>= z0P!Wg3)zeQR`HOw>dmyo!$0cYdFp-H>d8L7fYLw3jvmgiMact5|JUDy^v=%T zK)Ot9fD67L_?7c7dRdX0(>gLd5_+F|WJ8+w2}_m7SGPy~TRtX1YnnRl)>M9-^z0GqwNFF6{Z*-4;6Ut3*2*sS@AZ zoo`Kk+l8QJ4#<)yE?w;>-R-$?hhh8(!U%%O*eSxZ%q3`EUSSb2YYID|N6ohly_*L9 R!Vt2ta5!0Jj)@Tx`VVt&2>Sp4 diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson index 2973515dce..626498de15 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson @@ -243,12 +243,12 @@ YharonMask: { Tooltip: "" } -SnailHead: { - DisplayName: Wearable Head Snail - Tooltip: "" +AbyssHood: { + DisplayName: Abyss Cultist Hood + Tooltip: Turns your face into tentacles } -SnailRobe: { - DisplayName: Fancy Abyss Robe - Tooltip: "" +AbyssRobe: { + DisplayName: Abyss Cultist Robe + Tooltip: It feels cold, but very cozy } diff --git a/Systems/WorldgenManagementSystem.cs b/Systems/WorldgenManagementSystem.cs index b124fbe7a9..bf73e261b3 100644 --- a/Systems/WorldgenManagementSystem.cs +++ b/Systems/WorldgenManagementSystem.cs @@ -127,11 +127,12 @@ namespace CalamityMod.Systems int sunkenSeaX = (GenVars.UndergroundDesertLocation.Left + GenVars.UndergroundDesertLocation.Right) / 2; int sunkenSeaY = Main.maxTilesY / 2; - SunkenSea.PlaceRadiantReefs(sunkenSeaX - 130, sunkenSeaY + 75, true); - SunkenSea.PlaceRadiantReefs(sunkenSeaX + 130, sunkenSeaY + 75, false); + //place each piece of the sunken sea based on the above positons + SunkenSea.PlaceRadiantReefs(sunkenSeaX - 100, sunkenSeaY + 75, true); + SunkenSea.PlaceRadiantReefs(sunkenSeaX + 100, sunkenSeaY + 75, false); SunkenSea.PlacePolypForest(sunkenSeaX, sunkenSeaY + 75); SunkenSea.PlaceBasaltGully(sunkenSeaX, sunkenSeaY + (Main.maxTilesY / 4)); - SunkenSea.PlaceGleamingBurrows(sunkenSeaX, sunkenSeaY + (Main.maxTilesY / 4)); + SunkenSea.PlaceGleamingBurrows(sunkenSeaX, sunkenSeaY + (Main.maxTilesY / 4) - 50); SunkenSea.PlaceSunkenSeaAmbience(); SunkenSea.BasaltGullyLavaCleanup(sunkenSeaX, sunkenSeaY + (Main.maxTilesY / 4)); })); diff --git a/Tiles/Abyss/AbyssCoral.cs b/Tiles/Abyss/AbyssCoral.cs new file mode 100644 index 0000000000..beb50b9a0a --- /dev/null +++ b/Tiles/Abyss/AbyssCoral.cs @@ -0,0 +1,59 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ModLoader; +using Terraria.ID; +using Microsoft.Xna.Framework.Graphics; +using System; + +namespace CalamityMod.Tiles.Abyss +{ + public class AbyssCoral : ModTile + { + public byte[,] tileAdjacency; + + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + Main.tileLighted[Type] = true; + + TileID.Sets.HasSlopeFrames[Type] = true; + + TileID.Sets.ChecksForMerge[Type] = true; + HitSound = SoundID.Dig; + DustType = 119; + AddMapEntry(new Color(139, 206, 56)); + Main.tileShine2[Type] = true; + + TileID.Sets.CanBeDugByShovel[Type] = true; + + TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (!Main.tile[i - 1, j].HasTile || !Main.tile[i + 1, j].HasTile || !Main.tile[i, j - 1].HasTile || !Main.tile[i, j + 1].HasTile) + { + float brightness = 0.9f; + Color Color1 = new Color(52, 84, 107); + Color Color2 = new Color(29, 38, 56); + Color value = Color.Lerp(Color1, Color2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); + Color value1 = Color.Lerp(Color1, Color2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); + r = (value.R + value1.R) / 300f; + g = (value.G + value1.G) / 300f; + b = (value.B + value1.B) / 300f; + r *= brightness; + g *= brightness; + b *= brightness; + } + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFraming.GetAdjacencyData(i, j, ModContent.TileType(), out tileAdjacency[i, j]); + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + } +} diff --git a/Tiles/SunkenSea/CyanCoral.cs b/Tiles/SunkenSea/CyanCoral.cs index 13beaf5a31..bcffb9392d 100644 --- a/Tiles/SunkenSea/CyanCoral.cs +++ b/Tiles/SunkenSea/CyanCoral.cs @@ -50,10 +50,10 @@ namespace CalamityMod.Tiles.SunkenSea if (!Main.tile[i - 1, j].HasTile || !Main.tile[i + 1, j].HasTile || !Main.tile[i, j - 1].HasTile || !Main.tile[i, j + 1].HasTile) { float brightness = 0.9f; - Color Cyan1 = new Color(130, 213, 247); - Color Cyan2 = new Color(26, 68, 85); - Color value = Color.Lerp(Cyan1, Cyan2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); - Color value1 = Color.Lerp(Cyan1, Cyan2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); + Color Color1 = new Color(130, 213, 247); + Color Color2 = new Color(26, 68, 85); + Color value = Color.Lerp(Color1, Color2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); + Color value1 = Color.Lerp(Color1, Color2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); r = (value.R + value1.R) / 400f; g = (value.G + value1.G) / 400f; b = (value.B + value1.B) / 400f; diff --git a/Tiles/SunkenSea/HardenedEutrophicSand.cs b/Tiles/SunkenSea/HardenedEutrophicSand.cs index 20eca33764..98c8a0ff88 100644 --- a/Tiles/SunkenSea/HardenedEutrophicSand.cs +++ b/Tiles/SunkenSea/HardenedEutrophicSand.cs @@ -1,4 +1,6 @@ -using Microsoft.Xna.Framework; +using CalamityMod.Items.Placeables; +using CalamityMod.Tiles.SunkenSea.Ambient; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; @@ -62,5 +64,44 @@ namespace CalamityMod.Tiles.SunkenSea TileFraming.GetAdjacencyData(i, j, TileID.Sand, out fifthTileAdjacency[i, j]); return TileFraming.BrimstoneFraming(i, j, resetFrame); } + + public override void RandomUpdate(int i, int j) + { + Tile tile = Main.tile[i, j]; + Tile up = Main.tile[i, j - 1]; + Tile up2 = Main.tile[i, j - 2]; + + if (!up.HasTile && !up2.HasTile && up.LiquidAmount > 0 && up2.LiquidAmount > 0 && !tile.LeftSlope && !tile.RightSlope && !tile.IsHalfBlock) + { + //brain corals + if (WorldGen.genRand.NextBool(18)) + { + ushort[] BrainCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; + + ushort newObject = Main.rand.Next(BrainCorals); + + WorldGen.PlaceObject(i, j - 1, newObject, true); + NetMessage.SendObjectPlacement(-1, i, j - 1, newObject, 0, 0, -1, -1); + } + + //tube corals + if (WorldGen.genRand.NextBool(8)) + { + ushort[] TubeCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; + + ushort newObject = Main.rand.Next(TubeCorals); + + WorldGen.PlaceObject(i, j - 1, newObject, true); + NetMessage.SendObjectPlacement(-1, i, j - 1, newObject, 0, 0, -1, -1); + } + + //anemonie + if (WorldGen.genRand.NextBool(10)) + { + WorldGen.PlaceObject(i, j - 1, (ushort)ModContent.TileType(), true); + NetMessage.SendObjectPlacement(-1, i, j - 1, (ushort)ModContent.TileType(), 0, 0, -1, -1); + } + } + } } } diff --git a/Tiles/SunkenSea/LimeCoral.cs b/Tiles/SunkenSea/LimeCoral.cs index d597331738..d64276807a 100644 --- a/Tiles/SunkenSea/LimeCoral.cs +++ b/Tiles/SunkenSea/LimeCoral.cs @@ -42,10 +42,10 @@ namespace CalamityMod.Tiles.SunkenSea if (!Main.tile[i - 1, j].HasTile || !Main.tile[i + 1, j].HasTile || !Main.tile[i, j - 1].HasTile || !Main.tile[i, j + 1].HasTile) { float brightness = 0.9f; - Color Lime1 = new Color(176, 242, 96); - Color Lime2 = new Color(82, 113, 29); - Color value = Color.Lerp(Lime1, Lime2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); - Color value1 = Color.Lerp(Lime1, Lime2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); + Color Color1 = new Color(176, 242, 96); + Color Color2 = new Color(82, 113, 29); + Color value = Color.Lerp(Color1, Color2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); + Color value1 = Color.Lerp(Color1, Color2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); r = (value.R + value1.R) / 300f; g = (value.G + value1.G) / 300f; b = (value.B + value1.B) / 300f; diff --git a/Tiles/SunkenSea/MagentaCoral.cs b/Tiles/SunkenSea/MagentaCoral.cs index 3df1e09d1a..ed7657f1cc 100644 --- a/Tiles/SunkenSea/MagentaCoral.cs +++ b/Tiles/SunkenSea/MagentaCoral.cs @@ -42,10 +42,10 @@ namespace CalamityMod.Tiles.SunkenSea if (!Main.tile[i - 1, j].HasTile || !Main.tile[i + 1, j].HasTile || !Main.tile[i, j - 1].HasTile || !Main.tile[i, j + 1].HasTile) { float brightness = 0.9f; - Color Magenta1 = new Color(242, 96, 161); - Color Magenta2 = new Color(156, 51, 83); - Color value = Color.Lerp(Magenta1, Magenta2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); - Color value1 = Color.Lerp(Magenta1, Magenta2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); + Color Color1 = new Color(242, 96, 161); + Color Color2 = new Color(156, 51, 83); + Color value = Color.Lerp(Color1, Color2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); + Color value1 = Color.Lerp(Color1, Color2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); r = (value.R + value1.R) / 300f; g = (value.G + value1.G) / 300f; b = (value.B + value1.B) / 300f; diff --git a/Tiles/SunkenSea/OrangeCoral.cs b/Tiles/SunkenSea/OrangeCoral.cs index b9340c872e..bdeca4d1f6 100644 --- a/Tiles/SunkenSea/OrangeCoral.cs +++ b/Tiles/SunkenSea/OrangeCoral.cs @@ -42,10 +42,10 @@ namespace CalamityMod.Tiles.SunkenSea if (!Main.tile[i - 1, j].HasTile || !Main.tile[i + 1, j].HasTile || !Main.tile[i, j - 1].HasTile || !Main.tile[i, j + 1].HasTile) { float brightness = 0.9f; - Color Orange1 = new Color(255, 177, 120); - Color Orange2 = new Color(117, 23, 44); - Color value = Color.Lerp(Orange1, Orange2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); - Color value1 = Color.Lerp(Orange1, Orange2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); + Color Color1 = new Color(255, 177, 120); + Color Color2 = new Color(117, 23, 44); + Color value = Color.Lerp(Color1, Color2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); + Color value1 = Color.Lerp(Color1, Color2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); r = (value.R + value1.R) / 300f; g = (value.G + value1.G) / 300f; b = (value.B + value1.B) / 300f; diff --git a/Tiles/SunkenSea/YellowCoral.cs b/Tiles/SunkenSea/YellowCoral.cs index d0e60e4c71..c057374302 100644 --- a/Tiles/SunkenSea/YellowCoral.cs +++ b/Tiles/SunkenSea/YellowCoral.cs @@ -42,10 +42,10 @@ namespace CalamityMod.Tiles.SunkenSea if (!Main.tile[i - 1, j].HasTile || !Main.tile[i + 1, j].HasTile || !Main.tile[i, j - 1].HasTile || !Main.tile[i, j + 1].HasTile) { float brightness = 0.9f; - Color Yellow1 = new Color(218, 203, 67); - Color Yellow2 = new Color(121, 76, 1); - Color value = Color.Lerp(Yellow1, Yellow2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); - Color value1 = Color.Lerp(Yellow1, Yellow2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); + Color Color1 = new Color(218, 203, 67); + Color Color2 = new Color(121, 76, 1); + Color value = Color.Lerp(Color1, Color2, (MathF.Sin(-j / 80f + Main.GameUpdateCount * 0.017f + i / 40f) + 1f) / 2f); + Color value1 = Color.Lerp(Color1, Color2, (MathF.Sin((j - 100) / 50f + Main.GameUpdateCount * 0.004f + -i / 30f) + 1f) / 2f); r = (value.R + value1.R) / 300f; g = (value.G + value1.G) / 300f; b = (value.B + value1.B) / 300f; diff --git a/World/Abyss.cs b/World/Abyss.cs index 4c53863e6e..78b085a588 100644 --- a/World/Abyss.cs +++ b/World/Abyss.cs @@ -51,11 +51,11 @@ namespace CalamityMod.World int abyssMinX = AtLeftSideOfWorld ? 0 : abyssChasmX - 160; int abyssMaxX = AtLeftSideOfWorld ? abyssChasmX + 160 : x; - for (int abyssIndex = abyssMinX; abyssIndex < abyssMaxX; abyssIndex++) + for (int X = abyssMinX; X < abyssMaxX; X++) { - for (int abyssIndex2 = 0; abyssIndex2 < abyssChasmY + 50; abyssIndex2++) + for (int Y = 0; Y < abyssChasmY + 50; Y++) { - Tile tile = Framing.GetTileSafely(abyssIndex, abyssIndex2); + Tile tile = Framing.GetTileSafely(X, Y); if (tile.LiquidType == LiquidID.Lava && tile.LiquidAmount > 0) { @@ -70,43 +70,43 @@ namespace CalamityMod.World //i have at least left comments so people reading will know what does what if (Main.remixWorld) { - if (abyssIndex2 <= rockLayer) + if (Y <= rockLayer) { //replaces blocks wand walls that can be converted if (canConvert) { //layer 4 - if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.6f)) + if (Y <= rockLayer - (int)((y - 200) * 0.6f)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2)) + else if (Y <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3 - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.4f)) + else if (Y <= rockLayer - (int)((y - 200) * 0.4f)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 2-3 dithering transition - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.39f) && WorldGen.genRand.NextBool(2)) + else if (Y <= rockLayer - (int)((y - 200) * 0.39f) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 2 - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.2f)) + else if (Y <= rockLayer - (int)((y - 200) * 0.2f)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 1-2 dithering transition - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.19f)) + else if (Y <= rockLayer - (int)((y - 200) * 0.19f)) { if (WorldGen.genRand.NextBool(2)) { @@ -132,37 +132,37 @@ namespace CalamityMod.World tile.Get().HasTile = true; //layer 4 - if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.6f)) + if (Y <= rockLayer - (int)((y - 200) * 0.6f)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2)) + else if (Y <= rockLayer - (int)((y - 200) * 0.59f) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3 - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.4f)) + else if (Y <= rockLayer - (int)((y - 200) * 0.4f)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 2-3 dithering transition - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.39f) && WorldGen.genRand.NextBool(2)) + else if (Y <= rockLayer - (int)((y - 200) * 0.39f) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 2 - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.2f)) + else if (Y <= rockLayer - (int)((y - 200) * 0.2f)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 1-2 dithering transition - else if (abyssIndex2 <= rockLayer - (int)((y - 200) * 0.19f)) + else if (Y <= rockLayer - (int)((y - 200) * 0.19f)) { if (WorldGen.genRand.NextBool(2)) { @@ -186,37 +186,37 @@ namespace CalamityMod.World } else { - if (abyssIndex2 > (rockLayer - Main.maxTilesY / 15) + 35) + if (Y > (rockLayer - Main.maxTilesY / 15) + 35) { - //replaces blocks wand walls that can be converted + //replaces blocks and walls that can be converted if (canConvert) { //layer 4 - if (abyssIndex2 > (rockLayer + y * 0.270)) + if (Y > (rockLayer + y * 0.270)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition - else if (abyssIndex2 > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2)) + else if (Y > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3 - else if (abyssIndex2 > (rockLayer + y * 0.145)) + else if (Y > (rockLayer + y * 0.145)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 2-3 dithering transition - else if (abyssIndex2 > (rockLayer + y * 0.143) && WorldGen.genRand.NextBool(2)) + else if (Y > (rockLayer + y * 0.143) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 1-2 dithering transition - else if (abyssIndex2 >= rockLayer - 10 && abyssIndex2 <= rockLayer) + else if (Y >= rockLayer - 10 && Y <= rockLayer) { if (WorldGen.genRand.NextBool(2)) { @@ -230,7 +230,7 @@ namespace CalamityMod.World } } //layer 1 - else if (abyssIndex2 <= rockLayer - 10) + else if (Y <= rockLayer - 10) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); @@ -248,31 +248,31 @@ namespace CalamityMod.World tile.Get().HasTile = true; //layer 4 - if (abyssIndex2 > (rockLayer + y * 0.270)) + if (Y > (rockLayer + y * 0.270)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3-4 dithering transition - else if (abyssIndex2 > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2)) + else if (Y > (rockLayer + y * 0.268) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 3 - else if (abyssIndex2 > (rockLayer + y * 0.145)) + else if (Y > (rockLayer + y * 0.145)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 2-3 dithering transition - else if (abyssIndex2 > (rockLayer + y * 0.143) && WorldGen.genRand.NextBool(2)) + else if (Y > (rockLayer + y * 0.143) && WorldGen.genRand.NextBool(2)) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); } //layer 1-2 dithering transition - else if (abyssIndex2 >= rockLayer - 10 && abyssIndex2 <= rockLayer) + else if (Y >= rockLayer - 10 && Y <= rockLayer) { if (WorldGen.genRand.NextBool(2)) { @@ -286,7 +286,7 @@ namespace CalamityMod.World } } //layer 1 - else if (abyssIndex2 <= rockLayer - 10) + else if (Y <= rockLayer - 10) { tile.TileType = (ushort)ModContent.TileType(); tile.WallType = (ushort)ModContent.WallType(); @@ -523,27 +523,27 @@ namespace CalamityMod.World } //clean up - for (int abyssIndex = abyssMinX + 5; abyssIndex < abyssMaxX - 5; abyssIndex++) + for (int X = abyssMinX + 5; X < abyssMaxX - 5; X++) { - for (int abyssIndex2 = 5; abyssIndex2 < abyssChasmY; abyssIndex2++) + for (int Y = 5; Y < abyssChasmY; Y++) { - Tile tile = Main.tile[abyssIndex, abyssIndex2]; - Tile tileUp = Main.tile[abyssIndex, abyssIndex2 - 1]; - Tile tileDown = Main.tile[abyssIndex, abyssIndex2 + 1]; - Tile tileLeft = Main.tile[abyssIndex - 1, abyssIndex2]; - Tile tileRight = Main.tile[abyssIndex + 1, abyssIndex2]; + Tile tile = Main.tile[X, Y]; + Tile tileUp = Main.tile[X, Y - 1]; + Tile tileDown = Main.tile[X, Y + 1]; + Tile tileLeft = Main.tile[X - 1, Y]; + Tile tileRight = Main.tile[X + 1, Y]; if (tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType()) { //slope tiles - Tile.SmoothSlope(abyssIndex, abyssIndex2, true); + Tile.SmoothSlope(X, Y, true); //kill any individual floating tiles if (!tileUp.HasTile && !tileDown.HasTile && !tileLeft.HasTile && !tileRight.HasTile) { - WorldGen.KillTile(abyssIndex, abyssIndex2); + WorldGen.KillTile(X, Y); } } @@ -557,24 +557,24 @@ namespace CalamityMod.World //kill obsidian if (tile.TileType == TileID.Obsidian) { - WorldGen.KillTile(abyssIndex, abyssIndex2); + WorldGen.KillTile(X, Y); } } } //ambient tiles and pots - for (int abyssIndex = abyssMinX + 5; abyssIndex < abyssMaxX - 5; abyssIndex++) + for (int X = abyssMinX + 5; X < abyssMaxX - 5; X++) { - for (int abyssIndex2 = 0; abyssIndex2 < (Main.remixWorld ? rockLayer : Main.maxTilesY - 200); abyssIndex2++) + for (int Y = 0; Y < (Main.remixWorld ? rockLayer : Main.maxTilesY - 200); Y++) { - Tile tileToGrowVineOn = Main.tile[abyssIndex, abyssIndex2]; + Tile tileToGrowVineOn = Main.tile[X, Y]; - if (!Main.tile[abyssIndex, abyssIndex2].HasTile) + if (!Main.tile[X, Y].HasTile) { - Tile tile = Main.tile[abyssIndex, abyssIndex2 + 1]; + Tile tile = Main.tile[X, Y + 1]; //above the 4th layer - if (abyssIndex2 < (Main.remixWorld ? rockLayer : Main.maxTilesY - 200) && WorldGen.SolidTile(abyssIndex, abyssIndex2 + 1)) + if (Y < (Main.remixWorld ? rockLayer : Main.maxTilesY - 200) && WorldGen.SolidTile(X, Y + 1)) { //sulphur shale stuff if (tile.TileType == ModContent.TileType()) @@ -582,7 +582,7 @@ namespace CalamityMod.World //tube coral if (WorldGen.genRand.NextBool(85)) { - WorldGen.PlaceObject(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceObject(X, Y, (ushort)ModContent.TileType()); } //shale rock piles @@ -591,7 +591,7 @@ namespace CalamityMod.World ushort[] ShalePiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(ShalePiles)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(ShalePiles)); } //pire corals @@ -600,7 +600,7 @@ namespace CalamityMod.World ushort[] PireCorals = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(PireCorals)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(PireCorals)); } //sulphur fossils @@ -609,7 +609,7 @@ namespace CalamityMod.World ushort[] SulphuricFossils = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(SulphuricFossils)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(SulphuricFossils)); } //ribs @@ -619,7 +619,7 @@ namespace CalamityMod.World (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Ribs)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(Ribs)); } } @@ -631,17 +631,33 @@ namespace CalamityMod.World ushort[] PlantPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(PlantPiles)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(PlantPiles)); } } //abyss gravel stuff if (tile.TileType == ModContent.TileType()) { + //place coral blobs + if (WorldGen.genRand.NextBool(125) && !Main.tile[X, Y - 1].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[] + { + blotchMod.Output(circle) + })); + + WorldUtils.Gen(new Point(X, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] + { + new Actions.PlaceTile((ushort)ModContent.TileType()) + })); + } + //rare pearls if (WorldGen.genRand.NextBool(50)) { - WorldGen.PlaceObject(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); + WorldGen.PlaceObject(X, Y, (ushort)ModContent.TileType()); } //giant kelp on abyss gravel @@ -650,7 +666,7 @@ namespace CalamityMod.World ushort[] Kelps = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Kelps)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(Kelps)); } //plany mush piles @@ -659,7 +675,7 @@ namespace CalamityMod.World ushort[] PlantPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(PlantPiles)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(PlantPiles)); } //gravel rock piles @@ -668,7 +684,7 @@ namespace CalamityMod.World ushort[] GravelPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(GravelPiles)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(GravelPiles)); } //abyss gravel vents @@ -677,7 +693,7 @@ namespace CalamityMod.World ushort[] Vents = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Vents)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(Vents)); } //pirate crates @@ -686,7 +702,7 @@ namespace CalamityMod.World ushort[] PirateCrate = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(PirateCrate)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(PirateCrate)); } } @@ -700,7 +716,7 @@ namespace CalamityMod.World (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(SpiderCorals)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(SpiderCorals)); } //thermal vent @@ -709,7 +725,7 @@ namespace CalamityMod.World ushort[] Vents = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(Vents)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(Vents)); } } @@ -722,57 +738,57 @@ namespace CalamityMod.World ushort[] BulbTrees = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; - WorldGen.PlaceObject(abyssIndex, abyssIndex2, WorldGen.genRand.Next(BulbTrees)); + WorldGen.PlaceObject(X, Y, WorldGen.genRand.Next(BulbTrees)); } } } //pots if ((tile.TileType == ModContent.TileType() || tile.TileType == ModContent.TileType() || - tile.TileType == ModContent.TileType()) && abyssIndex2 > (Main.remixWorld ? rockLayer - (int)((y - 200) * 0.8f) : rockLayer)) + tile.TileType == ModContent.TileType()) && Y > (Main.remixWorld ? rockLayer - (int)((y - 200) * 0.8f) : rockLayer)) { if (WorldGen.genRand.NextBool(5)) { - WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); - CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); + WorldGen.PlacePot(X, Y, (ushort)ModContent.TileType()); + CalamityUtils.SafeSquareTileFrame(X, Y, true); } } //sulphur pots - else if (tile.TileType == ModContent.TileType() && abyssIndex2 < (Main.remixWorld ? Main.maxTilesY - 200 : (int)Main.worldSurface)) + else if (tile.TileType == ModContent.TileType() && Y < (Main.remixWorld ? Main.maxTilesY - 200 : (int)Main.worldSurface)) { if (WorldGen.genRand.NextBool(3)) { - WorldGen.PlacePot(abyssIndex, abyssIndex2, (ushort)ModContent.TileType()); - CalamityUtils.SafeSquareTileFrame(abyssIndex, abyssIndex2, true); + WorldGen.PlacePot(X, Y, (ushort)ModContent.TileType()); + CalamityUtils.SafeSquareTileFrame(X, Y, true); } } } //esentially what this does is grow one vine on the bottom of a tile, then use the util to keep placing the vine until it decides to stop - if (tileToGrowVineOn.TileType == ModContent.TileType() && Main.tile[abyssIndex, abyssIndex2].Slope == 0 && !Main.tile[abyssIndex, abyssIndex2 + 1].HasTile) + if (tileToGrowVineOn.TileType == ModContent.TileType() && Main.tile[X, Y].Slope == 0 && !Main.tile[X, Y + 1].HasTile) { if (WorldGen.genRand.Next(2) == 0) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2 + 1, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(X, Y + 1, (ushort)ModContent.TileType()); } } if (tileToGrowVineOn.TileType == ModContent.TileType()) { - CalamityUtils.GrowVines(abyssIndex, abyssIndex2, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); + CalamityUtils.GrowVines(X, Y, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); } //same as above but for sulphur vines - if (tileToGrowVineOn.TileType == ModContent.TileType() && Main.tile[abyssIndex, abyssIndex2].Slope == 0 && !Main.tile[abyssIndex, abyssIndex2 + 1].HasTile) + if (tileToGrowVineOn.TileType == ModContent.TileType() && Main.tile[X, Y].Slope == 0 && !Main.tile[X, Y + 1].HasTile) { if (WorldGen.genRand.Next(5) == 0) { - WorldGen.PlaceTile(abyssIndex, abyssIndex2 + 1, (ushort)ModContent.TileType()); + WorldGen.PlaceTile(X, Y + 1, (ushort)ModContent.TileType()); } } if (tileToGrowVineOn.TileType == ModContent.TileType()) { - CalamityUtils.GrowVines(abyssIndex, abyssIndex2, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); + CalamityUtils.GrowVines(X, Y, WorldGen.genRand.Next(1, 4), (ushort)ModContent.TileType()); } } } diff --git a/World/DraedonStructures.cs b/World/DraedonStructures.cs index 52f5026c70..82c6115cc2 100644 --- a/World/DraedonStructures.cs +++ b/World/DraedonStructures.cs @@ -326,61 +326,35 @@ namespace CalamityMod.World public static void PlaceSunkenSeaLab(out Point placementPoint, List workshopPoints, StructureMap structures) { - int tries = 0; string mapKey = SunkenSeaLabKey; PilePlacementMaps.TryGetValue(mapKey, out PilePlacementFunction pilePlacementFunction); SchematicMetaTile[,] schematic = TileMaps[mapKey]; int labWidth = schematic.GetLength(0); int labHeight = schematic.GetLength(1); - do - { - // Pick a location based on the Underground Desert, because the Sunken Sea is based on the Underground Desert - Rectangle ugDesert = GenVars.UndergroundDesertLocation; - int placementPositionX = -1; + int sunkenSeaX = (GenVars.UndergroundDesertLocation.Left + GenVars.UndergroundDesertLocation.Right) / 2; + int sunkenSeaY = Main.maxTilesY / 2; - // Desperation generation: if 75% of attempts failed, start generating literally anywhere in the Sunken Sea - if (tries >= 1500) - placementPositionX = WorldGen.genRand.Next(ugDesert.Left, ugDesert.Right - labWidth); - // 50% chance to be on either the left or the right. - // If it's on the right then shove it left because all schematics are placed based on their top left corner. - else if (WorldGen.genRand.NextBool()) - placementPositionX = WorldGen.genRand.Next(ugDesert.Left - 20, ugDesert.Left + 10); - else - placementPositionX = WorldGen.genRand.Next(ugDesert.Right - 10, ugDesert.Right + 20) - labWidth; + int placementPositionX = sunkenSeaX < Main.maxTilesX / 2 ? sunkenSeaX - 120 : sunkenSeaX + 120; + int placementPositionY = (sunkenSeaY + (Main.maxTilesY / 4) - 25) - labHeight; - int sunkenSeaY = 0; + placementPoint = new Point(placementPositionX, placementPositionY); + Vector2 schematicSize = new Vector2(schematic.GetLength(0), schematic.GetLength(1)); - //copied the desert position code from the sunken sea's generation so the lab always generates within the sunken sea properly - for (int y = Main.maxTilesY - 200; y >= Main.worldSurface; y--) - { - if (Main.tile[placementPositionX, y].WallType == ModContent.WallType() || - Main.tile[placementPositionX, y].WallType == ModContent.WallType()) - { - sunkenSeaY = y - 80; //offset so it generates nicely - break; - } - } + /* + I do not think that this check needs to exist for now, no other structures exist in the sunken sea at the moment + Once other sunken sea structures are added, i will likely re-enable this and modify the generation so that it avoids protected areas again + This is just so i can have it generating in time for the patreon beta + */ - int placementPositionY = sunkenSeaY - labHeight; - - placementPoint = new Point(placementPositionX, placementPositionY); - Vector2 schematicSize = new Vector2(schematic.GetLength(0), schematic.GetLength(1)); - - if (structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) - { - bool hasPlacedLogAndSchematic = false; - PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref hasPlacedLogAndSchematic, new Action(FillSunkenSeaLaboratoryChest)); - CalamityUtils.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 20); - //Reverted changes to center point placement; the change caused it to not center like it should, offsetting the range at which the bio lab theme plays - CalamityWorld.SunkenSeaLabCenter = placementPoint.ToWorldCoordinates() + new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)) * 8f; - break; - } - //try again if the structure is colliding with a structure from another mod - else - tries++; - } - while (tries <= 2000); + //if (structures.CanPlace(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y))) + //{ + bool hasPlacedLogAndSchematic = false; + PlaceSchematic(mapKey, new Point(placementPoint.X, placementPoint.Y), SchematicAnchor.TopLeft, ref hasPlacedLogAndSchematic, new Action(FillSunkenSeaLaboratoryChest)); + CalamityUtils.AddProtectedStructure(new Rectangle(placementPoint.X, placementPoint.Y, (int)schematicSize.X, (int)schematicSize.Y), 20); + //Reverted changes to center point placement; the change caused it to not center like it should, offsetting the range at which the bio lab theme plays + CalamityWorld.SunkenSeaLabCenter = placementPoint.ToWorldCoordinates() + new Vector2(TileMaps[mapKey].GetLength(0), TileMaps[mapKey].GetLength(1)) * 8f; + //} } #endregion diff --git a/World/SulphurousSea.cs b/World/SulphurousSea.cs index 31735c62b1..fa42696412 100644 --- a/World/SulphurousSea.cs +++ b/World/SulphurousSea.cs @@ -681,7 +681,7 @@ namespace CalamityMod.World int cavePerlinSeed = WorldGen.genRand.Next(); int cavePerlinSeedWalls = WorldGen.genRand.Next(); - Point origin = new Point(x + (x < Main.maxTilesX / 2 ? -10 : 10), YStart + depth + 80); + Point origin = new Point(x + (x < Main.maxTilesX / 2 ? -35 : 35), YStart + depth + 80); Vector2 center = origin.ToVector2() * 16f + new Vector2(8f); float angle = MathHelper.Pi * 0.15f; @@ -705,31 +705,93 @@ namespace CalamityMod.World { if (CheckReefsCircle(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist)) { - //clear absolutely everything before generating the caverns - Main.tile[X, Y].ClearEverything(); + float percent = dist / constant; + float blurPercent = 0.98f; - //generate perlin noise caves - float horizontalOffsetNoise = CalamityUtils.PerlinNoise2D(X / 20f, Y / 20f, 5, unchecked(cavePerlinSeed + 1)) * 0.01f; - float cavePerlinValue = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 350f, 5, cavePerlinSeed) + 0.5f + horizontalOffsetNoise; - float cavePerlinValue2 = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 350f, 5, unchecked(cavePerlinSeed - 1)) + 0.5f; - float caveNoiseMap = (cavePerlinValue + cavePerlinValue2) * 0.5f; - float caveCreationThreshold = horizontalOffsetNoise * 3.5f + 0.235f; - - //kill or place tiles depending on the noise map - if (caveNoiseMap * caveNoiseMap > caveCreationThreshold) + if (percent > blurPercent) { - WorldGen.KillTile(X, Y); + } else { - WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); + //clear absolutely everything before generating the caverns + Main.tile[X, Y].ClearEverything(); + + //generate perlin noise caves + float horizontalOffsetNoise = CalamityUtils.PerlinNoise2D(X / 20f, Y / 20f, 5, unchecked(cavePerlinSeed + 1)) * 0.01f; + float cavePerlinValue = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 350f, 5, cavePerlinSeed) + 0.5f + horizontalOffsetNoise; + float cavePerlinValue2 = CalamityUtils.PerlinNoise2D(X / 1000f, Y / 350f, 5, unchecked(cavePerlinSeed - 1)) + 0.5f; + float caveNoiseMap = (cavePerlinValue + cavePerlinValue2) * 0.5f; + float caveCreationThreshold = horizontalOffsetNoise * 3.5f + 0.235f; + + //kill or place tiles depending on the noise map + if (caveNoiseMap * caveNoiseMap > caveCreationThreshold) + { + WorldGen.KillTile(X, Y); + } + else + { + WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); + } + + Main.tile[X, Y].WallType = (ushort)ModContent.WallType(); + WorldGen.PlaceWall(X, Y, ModContent.WallType()); + + Main.tile[X, Y].Get().LiquidType = LiquidID.Water; + Main.tile[X, Y].LiquidAmount = byte.MaxValue; + } + } + } + } + + //place sand + for (int X = origin.X - size - 3; X <= origin.X + size + 3; X++) + { + for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) + { + if (CheckReefsCircle(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist)) + { + bool canPlaceSand = false; + + //place sand clumps on top of exposed navystone + if (Main.tile[X, Y].TileType == ModContent.TileType() && !Main.tile[X, Y - 1].HasTile) + { + canPlaceSand = true; } - Main.tile[X, Y].WallType = (ushort)ModContent.WallType(); - WorldGen.PlaceWall(X, Y, ModContent.WallType()); + if (canPlaceSand) + { + SunkenSea.PlaceSand(X, Y, 3, ModContent.TileType()); + } + } + } + } - Main.tile[X, Y].Get().LiquidType = LiquidID.Water; - Main.tile[X, Y].LiquidAmount = byte.MaxValue; + //cleanup + for (int X = origin.X - size - 3; X <= origin.X + size + 3; X++) + { + for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) + { + if (CheckReefsCircle(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist)) + { + //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; + bool OnlyLeft = !Main.tile[X, Y - 1].HasTile && !Main.tile[X, Y + 1].HasTile && !Main.tile[X + 1, Y].HasTile; + bool OnlyDown = !Main.tile[X, Y - 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile; + bool OnlyUp = !Main.tile[X, Y + 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile; + + if (OnlyRight || OnlyLeft || OnlyDown || OnlyUp) + { + WorldGen.KillTile(X, Y); + } + + //kill random single floating tiles + if (!Main.tile[X, Y - 1].HasTile && !Main.tile[X, Y + 1].HasTile && !Main.tile[X - 1, Y].HasTile && !Main.tile[X + 1, Y].HasTile) + { + WorldGen.KillTile(X, Y); + } + + Tile.SmoothSlope(X, Y); } } } diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 66ca590223..a7e9937ef9 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -189,20 +189,6 @@ namespace CalamityMod.World } } - for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) - { - 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, Y < origin.Y)) - { - if (!Main.tile[X, Y].HasTile && Main.tile[X, Y - 1].HasTile && Main.tile[X, Y + 1].HasTile && Main.tile[X - 1, Y].HasTile && Main.tile[X + 1, Y].HasTile) - { - WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); - } - } - } - } - //place extra tiles for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) { @@ -276,7 +262,7 @@ namespace CalamityMod.World float angle = MathHelper.Pi * 0.15f; float otherAngle = MathHelper.PiOver2 - angle; - int biomeSize = 140 + (Main.maxTilesX / 180); + int biomeSize = 120 + (Main.maxTilesX / 180); float actualSize = biomeSize * 16f; float constant = actualSize * 2f / (float)Math.Sin(angle); @@ -469,13 +455,34 @@ namespace CalamityMod.World Vector2 topFoci = center - fociOffset; Vector2 bottomFoci = center + fociOffset; - for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) + //place another barrier so the gleaming burrows doesnt just burst into the gully + for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X += 10) { - for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) + for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y += 2) { if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, true)) { + float percent = dist / constant; + float blurPercent = 0.98f; + if (percent > blurPercent) + { + if (Y > origin.Y + 20) + { + ShapeData circle = new ShapeData(); + GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + + WorldUtils.Gen(new Point(X, Y + 10), new Shapes.Circle(20), Actions.Chain(new GenAction[] + { + blotchMod.Output(circle) + })); + WorldUtils.Gen(new Point(X, Y + 10), new ModShapes.All(circle), Actions.Chain(new GenAction[] + { + new Actions.Clear(), + new Actions.PlaceTile((ushort)ModContent.TileType()) + })); + } + } } } } @@ -652,84 +659,55 @@ namespace CalamityMod.World //basalt biome underneath the sunken sea public static void PlaceBasaltGully(int startPosX, int startPosY) { - Point origin = new Point(startPosX, startPosY); - Vector2 center = origin.ToVector2() * 16f + new Vector2(8f); - - float angle = MathHelper.Pi * 0.15f; - float otherAngle = MathHelper.PiOver2 - angle; - int biomeSize = 230 + (Main.maxTilesX / 180); - float actualSize = biomeSize * 16f; - float constant = actualSize * 2f / (float)Math.Sin(angle); - float fociSpacing = actualSize * (float)Math.Sin(otherAngle) / (float)Math.Sin(angle); - int verticalRadius = (int)(constant / 16f); - - Vector2 fociOffset = Vector2.UnitY * fociSpacing; - Vector2 topFoci = center - fociOffset; - Vector2 bottomFoci = center + fociOffset; - - //first, place a basalt barrier around where the gleaming burrows will be - for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) + //place area of basalt all the way down to hell + for (int X = startPosX - biomeSize; X <= startPosX + biomeSize; X += 20) { - for (int Y = (int)(origin.Y - verticalRadius * 0.4f) - 3; Y <= origin.Y + verticalRadius + 3; Y++) + for (int Y = startPosY + 20; Y <= Main.maxTilesY - 250; Y += 20) { - if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, true)) + if (Main.tile[X, Y].TileType != ModContent.TileType()) { - float percent = dist / constant; - float blurPercent = 0.98f; - - if (percent > blurPercent) + ShapeData circle = new ShapeData(); + GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + + WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(60), Actions.Chain(new GenAction[] { - if (Y > origin.Y + 75 && Main.tile[X, Y].TileType != ModContent.TileType()) + blotchMod.Output(circle) + })); + WorldUtils.Gen(new Point(X, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] + { + new Actions.Clear(), + new Actions.PlaceTile((ushort)ModContent.TileType()) + })); + + //place a giant area of basalt below the sunken sea + for (int j = Y; j <= Main.maxTilesY - 250; j += 15) + { + int radius = WorldGen.genRand.Next(30, 45); + int RandomX = Main.rand.Next(-25, 25); + + WorldUtils.Gen(new Point(X + RandomX, j), new Shapes.Circle(radius), Actions.Chain(new GenAction[] { - ShapeData circle = new ShapeData(); - GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - - WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(60), Actions.Chain(new GenAction[] - { - blotchMod.Output(circle) - })); - WorldUtils.Gen(new Point(X, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] - { - new Actions.Clear(), - new Actions.PlaceTile((ushort)ModContent.TileType()) - })); + blotchMod.Output(circle) + })); - //place a giant area of basalt below the sunken sea - for (int j = Y; j <= Main.maxTilesY - 250; j += 15) - { - int radius = WorldGen.genRand.Next(30, 45); - int RandomX = Main.rand.Next(-25, 25); - - WorldUtils.Gen(new Point(X + RandomX, j), new Shapes.Circle(radius), Actions.Chain(new GenAction[] - { - blotchMod.Output(circle) - })); - - List WallIDs = new() - { - WallID.LavaUnsafe1, WallID.LavaUnsafe2, WallID.LavaUnsafe3, WallID.LavaUnsafe4, - }; - - //place blocks - WorldUtils.Gen(new Point(X + RandomX, j), new ModShapes.All(circle), Actions.Chain(new GenAction[] - { - new Actions.Clear(), - new Actions.PlaceTile((ushort)ModContent.TileType()), - new Actions.PlaceWall(WorldGen.genRand.Next(WallIDs)) - })); - } - } + //place blocks + WorldUtils.Gen(new Point(X + RandomX, j), new ModShapes.All(circle), Actions.Chain(new GenAction[] + { + new Actions.Clear(), + new Actions.PlaceTile((ushort)ModContent.TileType()), + new Actions.PlaceWall(WallID.LavaUnsafe1) + })); } } } } //place caverns and lava - for (int X = origin.X - biomeSize - (Main.maxTilesX / 25); X <= origin.X + biomeSize + (Main.maxTilesX / 25); X++) + for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X <= startPosX + biomeSize + (Main.maxTilesX / 25); X++) { - for (int Y = origin.Y + 50; Y <= Main.maxTilesY - 210; Y++) + for (int Y = startPosY; Y <= Main.maxTilesY - 210; Y++) { if (Main.tile[X, Y].TileType == ModContent.TileType()) { @@ -751,9 +729,9 @@ namespace CalamityMod.World } //place sand blocks - for (int X = origin.X - biomeSize - (Main.maxTilesX / 25); X <= origin.X + biomeSize + (Main.maxTilesX / 25); X++) + for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X <= startPosX + biomeSize + (Main.maxTilesX / 25); X++) { - for (int Y = origin.Y + 50; Y <= Main.maxTilesY - 200; Y++) + for (int Y = startPosY; Y <= Main.maxTilesY - 210; Y++) { bool canPlaceSand = false; @@ -771,9 +749,9 @@ namespace CalamityMod.World } //cleanup - for (int X = origin.X - biomeSize - (Main.maxTilesX / 25); X <= origin.X + biomeSize + (Main.maxTilesX / 25); X++) + for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X <= startPosX + biomeSize + (Main.maxTilesX / 25); X++) { - for (int Y = origin.Y + 50; Y <= Main.maxTilesY - 210; Y++) + for (int Y = startPosY; 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; @@ -804,20 +782,13 @@ namespace CalamityMod.World public static void BasaltGullyLavaCleanup(int startPosX, int startPosY) { - Point origin = new Point(startPosX, startPosY); - int biomeSize = 230 + (Main.maxTilesX / 180); - for (int X = origin.X - biomeSize - (Main.maxTilesX / 25); X <= origin.X + biomeSize + (Main.maxTilesX / 25); X++) + for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X <= startPosX + biomeSize + (Main.maxTilesX / 25); X++) { - for (int Y = origin.Y + 50; Y <= Main.maxTilesY - 210; Y++) + for (int Y = startPosY + 50; Y <= Main.maxTilesY - 200; Y++) { - List WallIDs = new() - { - WallID.LavaUnsafe1, WallID.LavaUnsafe2, WallID.LavaUnsafe3, WallID.LavaUnsafe4, - }; - - if (WallIDs.Contains(Main.tile[X, Y].WallType)) + if (Main.tile[X, Y].WallType == WallID.LavaUnsafe1) { //get rid of water if (Main.tile[X, Y].LiquidType == LiquidID.Water) @@ -890,6 +861,12 @@ namespace CalamityMod.World WorldGen.PlaceObject(X, Y - 1, (ushort)ModContent.TileType()); } + //anemonies + if (WorldGen.genRand.NextBool(10)) + { + WorldGen.PlaceObject(X, Y - 1, (ushort)ModContent.TileType()); + } + //giant navystone piles if (WorldGen.genRand.NextBool(10)) { @@ -1186,7 +1163,7 @@ namespace CalamityMod.World if (collapse) { float distY = center.Y - point.Y; - point.Y -= distY * 3f; + point.Y -= distY * 4f; } float distance1 = Vector2.Distance(point, focus1);