diff --git a/Backgrounds/SunkenSeaBGStyle.cs b/Backgrounds/SunkenSeaBGStyle.cs index 11b86c7d67..b3399fee89 100644 --- a/Backgrounds/SunkenSeaBGStyle.cs +++ b/Backgrounds/SunkenSeaBGStyle.cs @@ -15,10 +15,10 @@ namespace CalamityMod.Backgrounds if (Main.dedServ) return; - SSBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG0"); - SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG1"); - SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG2"); - SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/SunkenSeaBG3"); + SSBG0 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); + SSBG1 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); + SSBG2 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); + SSBG3 = BackgroundTextureLoader.GetBackgroundSlot("CalamityMod/Backgrounds/BlankPixel"); } public override void FillTextureArray(int[] textureSlots) diff --git a/Items/Placeables/SunkenSea/RuneSand.cs b/Items/Placeables/SunkenSea/Dunesand.cs similarity index 79% rename from Items/Placeables/SunkenSea/RuneSand.cs rename to Items/Placeables/SunkenSea/Dunesand.cs index b5c6ead314..22d04086ee 100644 --- a/Items/Placeables/SunkenSea/RuneSand.cs +++ b/Items/Placeables/SunkenSea/Dunesand.cs @@ -3,7 +3,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Placeables.SunkenSea { - public class RuneSand : ModItem, ILocalizedModType + public class Dunesand : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Placeables"; public override void SetStaticDefaults() @@ -12,6 +12,6 @@ namespace CalamityMod.Items.Placeables.SunkenSea ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } - public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); } } diff --git a/Items/Placeables/SunkenSea/RuneSand.png b/Items/Placeables/SunkenSea/Dunesand.png similarity index 100% rename from Items/Placeables/SunkenSea/RuneSand.png rename to Items/Placeables/SunkenSea/Dunesand.png diff --git a/Items/Placeables/SunkenSea/Shellstone.cs b/Items/Placeables/SunkenSea/Shellstone.cs index b3eb22c5ba..9bb1d63d01 100644 --- a/Items/Placeables/SunkenSea/Shellstone.cs +++ b/Items/Placeables/SunkenSea/Shellstone.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Items.Placeables.SunkenSea public override void SetStaticDefaults() { Item.ResearchUnlockCount = 100; - ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); + ItemID.Sets.ShimmerTransformToItem[Type] = ModContent.ItemType(); } public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index ca66d2ecf5..ebc52c1af9 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -3565,8 +3565,8 @@ Runestone: { Tooltip: "" } -RuneSand: { - DisplayName: Runesand +Dunesand: { + DisplayName: Dunesand Tooltip: "" } diff --git a/Systems/Tile/BiomeTileCounterSystem.cs b/Systems/Tile/BiomeTileCounterSystem.cs index e66ed5837c..bd77177433 100644 --- a/Systems/Tile/BiomeTileCounterSystem.cs +++ b/Systems/Tile/BiomeTileCounterSystem.cs @@ -55,8 +55,8 @@ namespace CalamityMod.Systems public override void TileCountsAvailable(ReadOnlySpan tileCounts) { BrimstoneCragTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; - SunkenSeaTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; - SunkenSeaShoresTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; + SunkenSeaTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; + SunkenSeaShoresTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; SunkenSeaPolypTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; SunkenSeaReefsTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; SunkenSeaBurrowsTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; diff --git a/Tiles/Merges/PolypSandMerge.cs b/Tiles/Merges/PolypSandMerge.cs new file mode 100644 index 0000000000..572ab6505e --- /dev/null +++ b/Tiles/Merges/PolypSandMerge.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Systems; +using CalamityMod.Tiles.SunkenSea; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Merges +{ + public sealed class PolypSandMerge : TileBlendTexture + { + public override int TileType => ModContent.TileType(); + } +} diff --git a/Tiles/Merges/PolypSandMerge.png b/Tiles/Merges/PolypSandMerge.png new file mode 100644 index 0000000000..9b36426426 Binary files /dev/null and b/Tiles/Merges/PolypSandMerge.png differ diff --git a/Tiles/Merges/RunestoneMerge.cs b/Tiles/Merges/RunestoneMerge.cs new file mode 100644 index 0000000000..08ef656bb0 --- /dev/null +++ b/Tiles/Merges/RunestoneMerge.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Systems; +using Terraria.ID; +using CalamityMod.Tiles.SunkenSea; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Merges +{ + public sealed class RunestoneMerge : TileBlendTexture + { + public override int TileType => ModContent.TileType(); + } +} diff --git a/Tiles/Merges/RunestoneMerge.png b/Tiles/Merges/RunestoneMerge.png new file mode 100644 index 0000000000..084eb1d80a Binary files /dev/null and b/Tiles/Merges/RunestoneMerge.png differ diff --git a/Tiles/Merges/ScarletSeaGrassTileMerge.cs b/Tiles/Merges/ScarletSeaGrassTileMerge.cs new file mode 100644 index 0000000000..78e03fbe21 --- /dev/null +++ b/Tiles/Merges/ScarletSeaGrassTileMerge.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Systems; +using CalamityMod.Tiles.SunkenSea; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Merges +{ + public sealed class ScarletSeaGrassTileMerge : TileBlendTexture + { + public override int TileType => ModContent.TileType(); + } +} diff --git a/Tiles/Merges/ScarletSeaGrassTileMerge.png b/Tiles/Merges/ScarletSeaGrassTileMerge.png new file mode 100644 index 0000000000..9b36426426 Binary files /dev/null and b/Tiles/Merges/ScarletSeaGrassTileMerge.png differ diff --git a/Tiles/Merges/ShellstoneMerge.cs b/Tiles/Merges/ShellstoneMerge.cs new file mode 100644 index 0000000000..a01e3366e8 --- /dev/null +++ b/Tiles/Merges/ShellstoneMerge.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CalamityMod.Systems; +using CalamityMod.Tiles.SunkenSea; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.Merges +{ + public sealed class ShellstoneMerge : TileBlendTexture + { + public override int TileType => ModContent.TileType(); + } +} diff --git a/Tiles/Merges/ShellstoneMerge.png b/Tiles/Merges/ShellstoneMerge.png new file mode 100644 index 0000000000..30e9733f65 Binary files /dev/null and b/Tiles/Merges/ShellstoneMerge.png differ diff --git a/Tiles/SunkenSea/Ambient/RefractiveHangingCoral.cs b/Tiles/SunkenSea/Ambient/RefractiveHangingCoral.cs new file mode 100644 index 0000000000..2ee129de1d --- /dev/null +++ b/Tiles/SunkenSea/Ambient/RefractiveHangingCoral.cs @@ -0,0 +1,136 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + + +namespace CalamityMod.Tiles.SunkenSea.Ambient +{ + public class RefractiveHangingCoral : 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(136, 206, 215)); + 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 NearbyEffects(int i, int j, bool closer) + { + // Baby blue + if (closer && Main.rand.NextBool(1200)) + { + Dust dust; + dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, DustID.Firefly, 0.23255825f, 10f, 0, new Color(106, 154, 238), 1.5f)]; + dust.noGravity = true; + dust.noLight = true; + dust.fadeIn = 2.5813954f; + } + // Light Cyan + if (closer && Main.rand.NextBool(1200)) + { + Dust dust; + dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, DustID.Firefly, 0.23255825f, 10f, 0, new Color(136, 206, 215), 1.7f)]; + dust.noGravity = true; + dust.noLight = true; + dust.fadeIn = 2.5813954f; + } + //Mint Green + if (closer && Main.rand.NextBool(1200)) + { + Dust dust; + dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, DustID.Firefly, 0.23255825f, 10f, 0, new Color(163, 252, 195), 1.4f)]; + dust.noGravity = true; + dust.noLight = true; + dust.fadeIn = 2.5813954f; + } + //Lilac + if (closer && Main.rand.NextBool(1200)) + { + Dust dust; + dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, DustID.Firefly, 0.23255825f, 10f, 0, new Color(236, 194, 252), 1.6f)]; + dust.noGravity = true; + dust.noLight = true; + dust.fadeIn = 2.5813954f; + } + //Dim Lilac + if (closer && Main.rand.NextBool(1200)) + { + Dust dust; + dust = Main.dust[Dust.NewDust(new Vector2(i * 16f, j * 16f), 274, 279, DustID.Firefly, 0.23255825f, 10f, 0, new Color(192, 170, 233), 1.3f)]; + dust.noGravity = true; + dust.noLight = true; + dust.fadeIn = 2.5813954f; + } + } + + 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/RefractiveHangingCoral.png b/Tiles/SunkenSea/Ambient/RefractiveHangingCoral.png new file mode 100644 index 0000000000..cd49838375 Binary files /dev/null and b/Tiles/SunkenSea/Ambient/RefractiveHangingCoral.png differ diff --git a/Tiles/SunkenSea/Basalt.cs b/Tiles/SunkenSea/Basalt.cs index 0b109e18f4..e055850547 100644 --- a/Tiles/SunkenSea/Basalt.cs +++ b/Tiles/SunkenSea/Basalt.cs @@ -34,11 +34,19 @@ namespace CalamityMod.Tiles.SunkenSea MinPick = 100; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/RunestoneMerge"); this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/MudMerge"); + + } public override bool CreateDust(int i, int j, ref int type) @@ -53,10 +61,5 @@ namespace CalamityMod.Tiles.SunkenSea frameYOffset = j % 4 * sheetHeight; } - public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) - { - // 02JUN2024: Ozzatron: unclear if this is the correct framing strategy for Basalt - return TileFramingSystem.BetterGemsparkFraming(i, j, resetFrame); - } } } diff --git a/Tiles/SunkenSea/BlackPearlPile.cs b/Tiles/SunkenSea/BlackPearlPile.cs index 0dcf0cfa49..d9f5086f7a 100644 --- a/Tiles/SunkenSea/BlackPearlPile.cs +++ b/Tiles/SunkenSea/BlackPearlPile.cs @@ -26,13 +26,17 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/RunestoneMerge"); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/MudMerge"); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Tiles/SunkenSea/CyanCoral.cs b/Tiles/SunkenSea/CyanCoral.cs index 962a945c95..55b79ea06d 100644 --- a/Tiles/SunkenSea/CyanCoral.cs +++ b/Tiles/SunkenSea/CyanCoral.cs @@ -32,11 +32,7 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); } diff --git a/Tiles/SunkenSea/Driftwood.cs b/Tiles/SunkenSea/Driftwood.cs index d8b24dbb9d..2a2c9e8314 100644 --- a/Tiles/SunkenSea/Driftwood.cs +++ b/Tiles/SunkenSea/Driftwood.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 121; AddMapEntry(new Color(136, 129, 154)); - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + // 02JUN2024: Ozzatron: Dunesand has no merge + // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); diff --git a/Tiles/SunkenSea/RuneSand.cs b/Tiles/SunkenSea/Dunesand.cs similarity index 97% rename from Tiles/SunkenSea/RuneSand.cs rename to Tiles/SunkenSea/Dunesand.cs index 41e23b8165..27ed22b353 100644 --- a/Tiles/SunkenSea/RuneSand.cs +++ b/Tiles/SunkenSea/Dunesand.cs @@ -6,7 +6,7 @@ using Terraria.ModLoader; namespace CalamityMod.Tiles.SunkenSea { - public class RuneSand : ModTile + public class Dunesand : ModTile { public override void SetStaticDefaults() { diff --git a/Tiles/SunkenSea/RuneSand.png b/Tiles/SunkenSea/Dunesand.png similarity index 100% rename from Tiles/SunkenSea/RuneSand.png rename to Tiles/SunkenSea/Dunesand.png diff --git a/Tiles/SunkenSea/EutrophicSand.cs b/Tiles/SunkenSea/EutrophicSand.cs index f5b057b04c..a70e05ea0d 100644 --- a/Tiles/SunkenSea/EutrophicSand.cs +++ b/Tiles/SunkenSea/EutrophicSand.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Tiles.SunkenSea CalamityUtils.MergeWithDesert(Type); // Tile blends with sandstone, which it is set to merge with here Main.tileShine[Type] = 1800; - Main.tileShine2[Type] = true; TileID.Sets.ChecksForMerge[Type] = true; TileID.Sets.CanBeDugByShovel[Type] = true; @@ -35,6 +34,9 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 108; AddMapEntry(new Color(158, 203, 234)); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); diff --git a/Tiles/SunkenSea/LimeCoral.cs b/Tiles/SunkenSea/LimeCoral.cs index b4536f301a..4b8ae8463b 100644 --- a/Tiles/SunkenSea/LimeCoral.cs +++ b/Tiles/SunkenSea/LimeCoral.cs @@ -27,11 +27,7 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); } diff --git a/Tiles/SunkenSea/Limestone.cs b/Tiles/SunkenSea/Limestone.cs index 2b154ba374..d030eb3c26 100644 --- a/Tiles/SunkenSea/Limestone.cs +++ b/Tiles/SunkenSea/Limestone.cs @@ -1,4 +1,5 @@ using CalamityMod.Systems; +using CalamityMod.Tiles.Merges; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -22,11 +23,9 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 22; AddMapEntry(new Color(154, 119, 119)); - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ScarletSeaGrassTile"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/PolypSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); } diff --git a/Tiles/SunkenSea/MagentaCoral.cs b/Tiles/SunkenSea/MagentaCoral.cs index 85794d1b39..e52d0794eb 100644 --- a/Tiles/SunkenSea/MagentaCoral.cs +++ b/Tiles/SunkenSea/MagentaCoral.cs @@ -32,11 +32,7 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); } diff --git a/Tiles/SunkenSea/Navystone.cs b/Tiles/SunkenSea/Navystone.cs index 6f44b254a0..584153ab2f 100644 --- a/Tiles/SunkenSea/Navystone.cs +++ b/Tiles/SunkenSea/Navystone.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Tiles.SunkenSea AddMapEntry(new Color(17, 53, 77)); HitSound = SoundID.Tink; - this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); diff --git a/Tiles/SunkenSea/OrangeCoral.cs b/Tiles/SunkenSea/OrangeCoral.cs index d1b7a8e2e4..d0b16ad1cb 100644 --- a/Tiles/SunkenSea/OrangeCoral.cs +++ b/Tiles/SunkenSea/OrangeCoral.cs @@ -27,11 +27,7 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); } diff --git a/Tiles/SunkenSea/PinkPearlPile.cs b/Tiles/SunkenSea/PinkPearlPile.cs index 3bafcf5afb..df98c0e44b 100644 --- a/Tiles/SunkenSea/PinkPearlPile.cs +++ b/Tiles/SunkenSea/PinkPearlPile.cs @@ -26,13 +26,17 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/RunestoneMerge"); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/MudMerge"); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Tiles/SunkenSea/PolypSand.cs b/Tiles/SunkenSea/PolypSand.cs index be11c3400a..402b4c4eea 100644 --- a/Tiles/SunkenSea/PolypSand.cs +++ b/Tiles/SunkenSea/PolypSand.cs @@ -33,6 +33,7 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 147; AddMapEntry(new Color(221, 180, 182)); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); diff --git a/Tiles/SunkenSea/Runestone.cs b/Tiles/SunkenSea/Runestone.cs index 15e98180a0..ad184759d3 100644 --- a/Tiles/SunkenSea/Runestone.cs +++ b/Tiles/SunkenSea/Runestone.cs @@ -27,10 +27,7 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); diff --git a/Tiles/SunkenSea/ScarletSeaGrassTile.cs b/Tiles/SunkenSea/ScarletSeaGrassTile.cs index 0805070787..414f0cc730 100644 --- a/Tiles/SunkenSea/ScarletSeaGrassTile.cs +++ b/Tiles/SunkenSea/ScarletSeaGrassTile.cs @@ -34,6 +34,7 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 147; AddMapEntry(new Color(187, 43, 44)); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); diff --git a/Tiles/SunkenSea/SeaPrism.cs b/Tiles/SunkenSea/SeaPrism.cs index 9d2e787ab4..11ab03d85d 100644 --- a/Tiles/SunkenSea/SeaPrism.cs +++ b/Tiles/SunkenSea/SeaPrism.cs @@ -32,6 +32,7 @@ namespace CalamityMod.Tiles.SunkenSea MinPick = 55; this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); } public override void NumDust(int i, int j, bool fail, ref int num) diff --git a/Tiles/SunkenSea/Shellstone.cs b/Tiles/SunkenSea/Shellstone.cs index d5abcfe4a7..5470b1eb3b 100644 --- a/Tiles/SunkenSea/Shellstone.cs +++ b/Tiles/SunkenSea/Shellstone.cs @@ -1,4 +1,5 @@ using CalamityMod.Systems; +using CalamityMod.Tiles.SunkenSea.Ambient; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; @@ -24,18 +25,32 @@ namespace CalamityMod.Tiles.SunkenSea DustType = 17; AddMapEntry(new Color(113, 117, 160)); - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); - this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); - this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); - this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) { 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/ShellstoneSlab.cs b/Tiles/SunkenSea/ShellstoneSlab.cs index 19caa0a57f..f103397152 100644 --- a/Tiles/SunkenSea/ShellstoneSlab.cs +++ b/Tiles/SunkenSea/ShellstoneSlab.cs @@ -19,6 +19,10 @@ namespace CalamityMod.Tiles.SunkenSea HitSound = SoundID.Tink; DustType = 17; AddMapEntry(new Color(156, 191, 199)); + + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/RunestoneMerge"); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Tiles/SunkenSea/WhitePearlPile.cs b/Tiles/SunkenSea/WhitePearlPile.cs index 6bd9a076bb..bac0193136 100644 --- a/Tiles/SunkenSea/WhitePearlPile.cs +++ b/Tiles/SunkenSea/WhitePearlPile.cs @@ -27,13 +27,22 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); + // 02JUN2024: Ozzatron: Dunesand has no merge + // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/RunestoneMerge"); + this.RegisterUniversalMerge(TileID.Sandstone, "CalamityMod/Tiles/Merges/SandstoneMerge"); + this.RegisterUniversalMerge(TileID.Sand, "CalamityMod/Tiles/Merges/SandMerge"); + this.RegisterUniversalMerge(TileID.HardenedSand, "CalamityMod/Tiles/Merges/HardenedSandMerge"); + this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge"); + this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/AshMerge"); + this.RegisterUniversalMerge(TileID.Ash, "CalamityMod/Tiles/Merges/MudMerge"); } public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) diff --git a/Tiles/SunkenSea/YellowCoral.cs b/Tiles/SunkenSea/YellowCoral.cs index c098f500ce..6aa9e8773e 100644 --- a/Tiles/SunkenSea/YellowCoral.cs +++ b/Tiles/SunkenSea/YellowCoral.cs @@ -27,11 +27,7 @@ namespace CalamityMod.Tiles.SunkenSea TileID.Sets.CanBeDugByShovel[Type] = true; - // 02JUN2024: Ozzatron: RuneSand has no merge - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out tileAdjacency); - // 02JUN2024: Ozzatron: Shellstone has no merge tile sheet defined - // TileFraming.SetUpUniversalMerge(Type, ModContent.TileType(), out secondTileAdjacency); - + this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/ShellstoneMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/EutrophicSandMerge"); this.RegisterUniversalMerge(ModContent.TileType(), "CalamityMod/Tiles/Merges/NavystoneMerge"); } diff --git a/Utilities/TileUtils.cs b/Utilities/TileUtils.cs index 64ca80e336..f5432f2ec3 100644 --- a/Utilities/TileUtils.cs +++ b/Utilities/TileUtils.cs @@ -443,7 +443,7 @@ namespace CalamityMod TileType(), TileType(), TileType(), - TileType(), + TileType(), TileType(), TileType(), TileType(), @@ -523,7 +523,7 @@ namespace CalamityMod TileType(), TileType(), TileType(), - TileType(), + TileType(), TileType(), TileType(), TileType(), diff --git a/Walls/DriftwoodWall.png b/Walls/DriftwoodWall.png index f33778a6fe..8e691a4d26 100644 Binary files a/Walls/DriftwoodWall.png and b/Walls/DriftwoodWall.png differ diff --git a/Walls/EutrophicGlassWall.png b/Walls/EutrophicGlassWall.png index d1ac8acd11..983a2380b9 100644 Binary files a/Walls/EutrophicGlassWall.png and b/Walls/EutrophicGlassWall.png differ diff --git a/Walls/ScarletSeaGrassWall.cs b/Walls/ScarletSeaGrassWall.cs index 053b457495..1c527ec631 100644 --- a/Walls/ScarletSeaGrassWall.cs +++ b/Walls/ScarletSeaGrassWall.cs @@ -26,8 +26,8 @@ namespace CalamityMod.Walls WallID.Sets.Conversion.Grass[Type] = true; - AddMapEntry(new Color(104, 24, 24)); - this.AddMapEntryWithWaterVisibility(new Color(87, 20, 38)); + AddMapEntry(new Color(103, 24, 24)); + this.AddMapEntryWithWaterVisibility(new Color(89, 49, 108)); if (!Main.dedServ) { leafTexture = ModContent.Request("CalamityMod/Walls/ScarletSeaGrassWall_Leaves"); diff --git a/Walls/ScarletSeaGrassWall.png b/Walls/ScarletSeaGrassWall.png index 6e379e77c2..5e0085193a 100644 Binary files a/Walls/ScarletSeaGrassWall.png and b/Walls/ScarletSeaGrassWall.png differ diff --git a/World/SunkenSea.cs b/World/SunkenSea.cs index 8aece43e6e..e315f8fc49 100644 --- a/World/SunkenSea.cs +++ b/World/SunkenSea.cs @@ -9,6 +9,7 @@ using Microsoft.Xna.Framework; using ReLogic.Threading; using ReLogic.Utilities; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.WorldBuilding; @@ -30,15 +31,14 @@ namespace CalamityMod.World /* ena todo - fix the fucking forest being shaved + fix the fucking forest being shaved (done - HPU) cut a half oval out of the top of forest in anticipation of structure placement - change the type of noise both reefs and forest use (reefs more jagged, forest more flat) - cut a curve out of the top of shores (the desert part) + change the type of noise both reefs and forest use (reefs more jagged, forest more flat) (done - HPU) + cut a curve out of the top of shores (the desert part) (done - HPU) extend basalt to hell - DONE - convert normal terrain blocks below basalt into basalt + convert normal terrain blocks below basalt into basalt (maybe??? - HPU) BLOTCHES EVERYWHERE */ - public static void NormalForLoop(int fromInclusive, int toExclusive, int step, Action action) { for (int i = fromInclusive; i < toExclusive; i += step) @@ -81,7 +81,7 @@ namespace CalamityMod.World // // Places a trapezoid of circles to serve as the main area for the biome. // - const float steepness = 15f; + const float steepness = 25f; static float trapezoidLateralSteep(float x) { if (x <= 1f / steepness) @@ -91,14 +91,14 @@ namespace CalamityMod.World else return -steepness * x + steepness; } - ForLoop.Invoke(startPosX - biomeSize - 20, startPosX + biomeSize + 20, 15, (X) => + ForLoop.Invoke(startPosX - biomeSize - 5, startPosX + biomeSize + 20, 15, (X) => { float height = MathHelper.Lerp( startPosY + 35, //top startPosY - 15, //bottom trapezoidLateralSteep(Utils.GetLerpValue(startPosX - biomeSize - 20, startPosX + biomeSize + 20, X))); - for (int Y = startPosY + 50; Y >= height; Y -= 10) + for (int Y = startPosY + 25; Y >= height; Y -= 10) { ShapeData circle = new ShapeData(); WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(30), Actions.Chain(new GenAction[] @@ -114,14 +114,14 @@ namespace CalamityMod.World // Makes the bottom borders of the Timeless Shores curved downwards. // const int totalCuveDepth = 90; - ForLoop.Invoke(startPosX - biomeSize - 20, startPosX - biomeSize + 200, 10, (x) => + ForLoop.Invoke(startPosX - biomeSize - 10, startPosX - 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 + 25; y <= startPosY + 50 + curveDepth; y += 5) + for (int y = startPosY + 50; y <= startPosY + 70 + curveDepth; y += 5) { ShapeData circle = new(); WorldUtils.Gen(new Point(x, y), new Shapes.Slime(30), Actions.Chain(new GenAction[] @@ -132,14 +132,14 @@ namespace CalamityMod.World WorldUtils.Gen(new Point(x, y), new ModShapes.All(circle), new Actions.SetTile((ushort)ModContent.TileType())); } }); - ForLoop.Invoke(startPosX + biomeSize - 200, startPosX + biomeSize + 20, 5, (x) => + ForLoop.Invoke(startPosX + biomeSize - 200, startPosX + 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 + 50 + curveDepth; y += 5) + for (int y = startPosY + 50; y <= startPosY + 70 + curveDepth; y += 5) { ShapeData circle = new(); WorldUtils.Gen(new Point(x, y), new Shapes.Slime(30), Actions.Chain(new GenAction[] @@ -153,7 +153,7 @@ namespace CalamityMod.World //clear a smaller square out of the center where the biomes stuff will be //Added curves to the top of the biome via curve depth -hpu 02/19/25 - ForLoop.Invoke(startPosX - biomeSize + 35, startPosX + biomeSize - 35, 1, (X) => + ForLoop.Invoke(startPosX - biomeSize + 10, startPosX + biomeSize - 10, 1, (X) => { int curveDepth = (int)MathHelper.Lerp( totalCuveDepth, @@ -183,26 +183,29 @@ namespace CalamityMod.World // // Places slopes at the sides of the shores to actually make shores. // - ForLoop.Invoke(startPosX - biomeSize + 20, startPosX - biomeSize + 200, 20, (moundX) => + ForLoop.Invoke(startPosX - biomeSize - 15, startPosX - biomeSize + 200, 20, (moundX) => { + int RandomX = Main.rand.Next(15, 20); ShapeData mound = new(); GenAction blotchMod = new Modifiers.Blotches().Output(mound); - int moundY = startPosY + 60; + int moundY = startPosY + 75; int moundHeight = (int)MathHelper.Lerp(60f, 5f, MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize + 27, startPosX - 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.SetTile((ushort)ModContent.TileType())); + WorldUtils.Gen(new Point(moundX, moundY), new ModShapes.All(mound), new Actions.PlaceWall((ushort)ModContent.WallType())); }); - ForLoop.Invoke(startPosX + biomeSize - 200, startPosX + biomeSize - 20, 20, (moundX) => + ForLoop.Invoke(startPosX + biomeSize - 200, startPosX + biomeSize - 15, 20, (moundX) => { ShapeData mound = new(); GenAction blotchMod = new Modifiers.Blotches().Output(mound); - int moundY = startPosY + 60; + int moundY = startPosY + 75; int moundHeight = (int)MathHelper.Lerp(60f, 5f, MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize - 27, startPosX + 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())); }); + // // Makes a large platform in the middle of the Timeless Shores. @@ -219,7 +222,7 @@ namespace CalamityMod.World { WorldUtils.Gen(new Point(platformX, platformY), new Shapes.Circle(5), Actions.Chain(new GenAction[] { - new Actions.Clear(), // Clears all tiles and walls. + new Actions.ClearTile(), // Clears all tiles new Actions.PlaceTile((ushort)ModContent.TileType()) // Places tiles. })); } @@ -229,44 +232,76 @@ namespace CalamityMod.World float interpolator = CalamityUtils.Convert01To010(Utils.GetLerpValue(startPosX - platformSize / 2, startPosX + 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(), })); + }); + const int furthestDistanceFromCenter = 100; + const int shortestDistanceFromCenter = 60; + const int holeStart = 10; + const int holeDepth = 80; + // Platu + ForLoop.Invoke(startPosX - biomeSize, startPosX + 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) + { + // 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); + + 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)); + + WorldUtils.Gen(new Point(randomDisplacement + wallPillarX + pillarWidth / 2, wallPillarY), new Shapes.Circle(RandomX - pillarWidth + 3, RandomX), Actions.Chain(new GenAction[] + { + blotchFilter.Output(rectangle), // Applies a blotch filter to the rectangle. + })); + + WorldUtils.Gen(new Point(randomDisplacement + wallPillarX + pillarWidth / 4, wallPillarY), new ModShapes.All(rectangle), Actions.Chain(new GenAction[] + { + new Actions.SetTile((ushort)ModContent.TileType()) + })) + ; + } + }); - // - // Makes a hole into the actual Sunken Sea at the botoom-left and bottom-right of the middle platform of the Timeless Shores. - // - const int furthestDistanceFromCenter = 55; - const int shortestDistanceFromCenter = 35; - const int holeStart = 50; - const int holeDepth = 32; + //Makes a hole into the actual Sunken Sea at the bottom - left and bottom-right of the middle platform of the Timeless Shores. + + ForLoop.Invoke(startPosX - furthestDistanceFromCenter, startPosX - shortestDistanceFromCenter, 1, (holeX) => { - for (int holeY = startPosY + holeStart; holeY <= startPosY + holeStart + holeDepth; holeY += 3) + for (int holeY = startPosY + holeStart; holeY <= startPosY + holeDepth; holeY += 1) { - ShapeData circle = new(); + ShapeData circle = new ShapeData(); + GenAction blotchFilter = new Modifiers.Blotches(6, 1.9); - // As the hole gets deeper, we want the holes to be bigger and more blurry, so it's not so monotonous. - int sizeIncrement = (int)Utils.Remap(holeY, startPosY + holeStart, startPosY + holeStart + holeDepth, 1, 5); + //WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Circle(2, 3), Actions.Chain(new GenAction[] + //{ + // blotchFilter.Output(circle), // Applies a blotch filter to the rectangle. + //})); - // may or may not be useful later - //GenAction dither = new Modifiers.RadialDither(2 * sizeIncrement, 5 * sizeIncrement); - - WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Tail(sizeIncrement, new Vector2D(6,20)), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(holeX / 2, holeY / 2), new Shapes.Circle(2, 3), Actions.Chain(new GenAction[] { new Actions.ClearTile(), // The shape removes tiles. new Actions.SetLiquid() // The shape adds liquid (Default to max water). })); } }); - ForLoop.Invoke(startPosX + shortestDistanceFromCenter, startPosX + furthestDistanceFromCenter, 1, (holeX) => + ForLoop.Invoke(startPosX - furthestDistanceFromCenter, startPosX + furthestDistanceFromCenter, 1, (holeX) => { - for (int holeY = startPosY + holeStart; holeY <= startPosY + holeStart + holeDepth; holeY += 3) + for (int holeY = startPosY + holeStart; holeY <= startPosY + holeDepth; holeY += 1) { - ShapeData circle = new(); + ShapeData circle = new ShapeData(); + GenAction blotchFilter = new Modifiers.Blotches(6, 1.9); - // As the hole gets deeper, we want the holes to be bigger and more blurry, so it's not so monotonous. - int sizeIncrement = (int)Utils.Remap(holeY, startPosY + holeStart, startPosY + holeStart + holeDepth, 1, 20); + //WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Circle(2, 3), Actions.Chain(new GenAction[] + //{ + // blotchFilter.Output(circle), // Applies a blotch filter to the rectangle. + //})); - WorldUtils.Gen(new Point(holeX, holeY), new Shapes.Tail(sizeIncrement, new Vector2D(6, 20)), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(holeX / 2, holeY / 2), new Shapes.Circle(2, 3), Actions.Chain(new GenAction[] { new Actions.ClearTile(), // The shape removes tiles. new Actions.SetLiquid() // The shape adds liquid (Default to max water). @@ -283,35 +318,15 @@ namespace CalamityMod.World Main.tile[WaterX, WaterY].LiquidAmount = byte.MaxValue; } }); - - //place layer of sand on valid runestone blocks - ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 1, (X) => - { - for (int Y = startPosY - 50; Y <= startPosY + 50; Y++) - { - bool canPlaceSand = false; - - if (Main.tile[X, Y].TileType == ModContent.TileType() && !Main.tile[X, Y - 1].HasTile && !Main.tile[X, Y - 2].HasTile && - !Main.tile[X, Y - 3].HasTile && !Main.tile[X, Y - 4].HasTile && !Main.tile[X, Y - 5].HasTile) - { - canPlaceSand = true; - } - - if (canPlaceSand) - { - PlaceSand(X, Y, 5, ModContent.TileType()); - } - } - }); - // // Generates pillars made out of walls at random points in the Timeless Shores. // - ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 100, (wallPillarX) => + ForLoop.Invoke(startPosX - (biomeSize / 2) - furthestDistanceFromCenter, startPosX + (biomeSize / 2) + furthestDistanceFromCenter, 100, (wallPillarX) => { - int randomDisplacementX = WorldGen.genRand.Next(-40, 80); + int randomDisplacementX = WorldGen.genRand.Next(-10, 10); + int RandomX = Main.rand.Next(3, 6); - for (int wallPillarY = startPosY - 75; wallPillarY <= startPosY + 120; wallPillarY += 10) + for (int wallPillarY = startPosY - 75; wallPillarY <= startPosY + 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); @@ -329,7 +344,8 @@ namespace CalamityMod.World WorldUtils.Gen(new Point(randomDisplacementX + wallPillarX + pillarWidth / 2, wallPillarY), new ModShapes.All(rectangle), Actions.Chain(new GenAction[] { new Actions.PlaceWall((ushort)ModContent.WallType()) // The shape places walls. - })); + })) + ; } }); @@ -357,7 +373,7 @@ namespace CalamityMod.World new Modifiers.OnlyTiles(TileID.Sand, TileID.HardenedSand), new Modifiers.Dither(ditherStrength + 0f), new Actions.ClearTile(), - new Actions.PlaceTile((ushort)ModContent.TileType()), + new Actions.PlaceTile((ushort)ModContent.TileType()), })); // changing these makes the walls dither higher up than tiles, to prevent the biome from changing earlier than expected. still looks nice imo :) interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 200, y, true); @@ -381,6 +397,15 @@ namespace CalamityMod.World new Actions.ClearTile(), new Actions.PlaceTile((ushort)ModContent.TileType()), })); + interpolator = Utils.GetLerpValue(startPosY - 90, startPosY - 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[] + { + new Modifiers.OnlyTiles((ushort)ModContent.TileType()), + new Modifiers.Dither(ditherStrength), + new Actions.ClearTile(), + new Actions.PlaceTile((ushort)ModContent.TileType()), + })); 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)); @@ -394,6 +419,64 @@ namespace CalamityMod.World })); } } + + //place layer of sand on valid runestone blocks + ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 1, (X) => + { + for (int Y = startPosY - 100; Y <= startPosY + 100; Y++) + { + bool canPlaceSand = false; + + if (Main.tile[X, Y].TileType == ModContent.TileType() && !Main.tile[X, Y - 1].HasTile && !Main.tile[X, Y - 2].HasTile && + !Main.tile[X, Y - 3].HasTile && !Main.tile[X, Y - 4].HasTile && !Main.tile[X, Y - 5].HasTile) + { + canPlaceSand = true; + } + + if (canPlaceSand) + { + PlaceSand(X, Y, 5, ModContent.TileType()); + } + //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); + } + //Timeless Shores ambiant tiles + if (Main.tile[X, Y].TileType == ModContent.TileType()) + { + //Driftwood Ambiance + if (WorldGen.genRand.NextBool(150)) + { + ushort[] DriftwoodPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; + + WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(DriftwoodPiles)); + } + } + if (Main.tile[X, Y].TileType == ModContent.TileType()) + { + //Driftwood Ambiance + if (WorldGen.genRand.NextBool(150)) + { + ushort[] DriftwoodPiles = new ushort[] { (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType() }; + + WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(DriftwoodPiles)); + } + } + } + + }); //slope tiles @@ -486,7 +569,7 @@ namespace CalamityMod.World } } }); - bool runonce = false; + bool runonce = false; // this is used to make the wall on the left side go boom on the second run //generate the actual caverns for (int X = origin.X - biomeSize - 3; X <= origin.X + biomeSize + 3; X++) { @@ -654,7 +737,7 @@ namespace CalamityMod.World int cavePerlinSeed = WorldGen.genRand.Next(); int cavePerlinSeedWalls = WorldGen.genRand.Next(); - Point origin = new Point(startPosX, startPosY); + Point origin = new Point(startPosX, startPosY - 200); Vector2 center = origin.ToVector2() * 16f + new Vector2(8f); float angle = MathHelper.Pi * 0.15f; @@ -674,9 +757,10 @@ namespace CalamityMod.World //place the polyp forest caverns 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++) + 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)) + // Modify this part so that the generation happens from bottom to top + if (CheckInBiomeArea(new Point(X, Y), topFoci, bottomFoci, constant, center, out float dist, false, Y < origin.Y)) { float percent = dist / constant; float blurPercent = 0.98f; @@ -684,10 +768,11 @@ namespace CalamityMod.World //biome "blending" on the edges (disabled for now) if (percent > blurPercent) { + if (Main.tile[X, Y].HasTile && Main.tile[X, Y].TileType != ModContent.TileType()) { ShapeData circle = new ShapeData(); - GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + GenAction blotchMod = new Modifiers.Blotches(4, 0.7); WorldUtils.Gen(new Point(X, Y), new Shapes.Slime(WorldGen.genRand.Next(1, 3)), Actions.Chain(new GenAction[] { blotchMod.Output(circle) @@ -898,7 +983,7 @@ namespace CalamityMod.World ShapeData circle = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(10, 0.4); - WorldUtils.Gen(new Point(X, Y + 5), new Shapes.Slime(20), Actions.Chain(new GenAction[] + WorldUtils.Gen(new Point(X, Y + 5), new Shapes.Rectangle(10, 10), Actions.Chain(new GenAction[] { blotchMod.Output(circle) })); @@ -1085,49 +1170,73 @@ namespace CalamityMod.World //basalt biome underneath the sunken sea public static void PlaceBasaltGully(int startPosX, int startPosY) { - int biomeSize = 200 + (Main.maxTilesX / 180); + int biomeSize = 250 + (Main.maxTilesX / 180); + + int XLeft = GenVars.UndergroundDesertLocation.Left + 40; + int XRight = GenVars.UndergroundDesertLocation.Right - 70; - int XLeft = GenVars.UndergroundDesertLocation.Left + 53; - int XRight = GenVars.UndergroundDesertLocation.Right - 53; - //place circles of basalt along the 2 edges of the area - for (int Y = startPosY - 120; Y <= Main.maxTilesY - 230; Y += 20) - { - ShapeData circle = new ShapeData(); - GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + //for (int Y = startPosY - 50; Y <= Main.maxTilesY - 200; Y += 20) + //{ + // ShapeData circle = new ShapeData(); + // GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - int radius = WorldGen.genRand.Next(30, 45); - int RandomX = Main.rand.Next(-25, 25); + // int radius = WorldGen.genRand.Next(30, 45); + // int RandomX = Main.rand.Next(-25, 25); - WorldUtils.Gen(new Point(XLeft, Y), new Shapes.Slime(radius), Actions.Chain(new GenAction[] - { - blotchMod.Output(circle) - })); + // WorldUtils.Gen(new Point(XLeft, Y), new Shapes.Rectangle(radius, (radius)), Actions.Chain(new GenAction[] + // { + // blotchMod.Output(circle) + // })); - WorldUtils.Gen(new Point(XLeft, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] - { - new Actions.Clear(), - new Actions.PlaceTile((ushort)ModContent.TileType()), - new Actions.PlaceWall(WallID.LavaUnsafe1) - })); + // WorldUtils.Gen(new Point(XLeft, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] + // { + // new Actions.Clear(), + // new Actions.PlaceTile((ushort)ModContent.TileType()), + // new Actions.PlaceWall(WallID.LavaUnsafe1) + // })); - WorldUtils.Gen(new Point(XRight, Y), new Shapes.Slime(radius), Actions.Chain(new GenAction[] - { - blotchMod.Output(circle) - })); + // WorldUtils.Gen(new Point(XRight, Y), new Shapes.Rectangle(radius, (radius)), Actions.Chain(new GenAction[] + // { + // blotchMod.Output(circle) + // })); - WorldUtils.Gen(new Point(XRight, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] - { - new Actions.Clear(), - new Actions.PlaceTile((ushort)ModContent.TileType()), - new Actions.PlaceWall(WallID.LavaUnsafe1) - })); - } + // WorldUtils.Gen(new Point(XRight, Y), new ModShapes.All(circle), Actions.Chain(new GenAction[] + // { + // new Actions.Clear(), + // new Actions.PlaceTile((ushort)ModContent.TileType()), + // new Actions.PlaceWall(WallID.LavaUnsafe1) + // })); + //} + //place blocks of basalt all the way down to hell, here it just places one block and wall so it doesnt hurt preformance ForLoop.Invoke(startPosX - biomeSize - 25, startPosX + biomeSize + 25, 1, (X) => { - for (int Y = startPosY - 30; Y <= Main.maxTilesY - 250; Y++) + //const int totalCuveDepth = -120; + //const int totalCuveDepth2 = 120; + int basaltbordernoise = Main.rand.Next(180, 185); + int basaltbordernoisetop = Main.rand.Next(145, 150); + const int totalCuveDepth = -220; + const int totalCuveDepth2 = 80; + 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 - 20, startPosX - biomeSize + 200, X, true))); + int curveDepthtop = (int)MathHelper.Lerp( + totalCuveDepth2, + 0f, + MathF.Sqrt(Utils.GetLerpValue(startPosX + biomeSize + 20, startPosX + biomeSize - 200, X, true))); + int curveDepth2top = (int)MathHelper.Lerp( + totalCuveDepth2, + 0f, + MathF.Sqrt(Utils.GetLerpValue(startPosX - biomeSize - 20, startPosX - biomeSize + 200, X, true))); + + for (int Y = startPosY - basaltbordernoisetop + curveDepthtop + curveDepth2top; Y <= Main.maxTilesY - basaltbordernoise + curveDepth + curveDepth2; Y++) { Main.tile[X, Y].ClearEverything(); WorldGen.PlaceTile(X, Y, (ushort)ModContent.TileType()); @@ -1135,31 +1244,10 @@ namespace CalamityMod.World } }); - //place another wall of circles along the bottom of the biome so it doesnt just end unnaturally - ForLoop.Invoke(startPosX - biomeSize, startPosX + biomeSize, 20, (X) => - { - int Y = Main.maxTilesY - 230; - - ShapeData circle = new ShapeData(); - GenAction blotchMod = new Modifiers.Blotches(2, 0.4); - - WorldUtils.Gen(new Point(X, Y), new Shapes.Slime(25), 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()), - new Actions.PlaceWall(WallID.LavaUnsafe1) - })); - }); - //place caverns and lava for (int X = startPosX - biomeSize - (Main.maxTilesX / 25); X <= startPosX + biomeSize + (Main.maxTilesX / 25); X++) { - for (int Y = startPosY; Y <= Main.maxTilesY - 210; Y++) + for (int Y = startPosY; Y <= Main.maxTilesY - 190; Y++) { if (Main.tile[X, Y].TileType == ModContent.TileType()) { @@ -1290,7 +1378,7 @@ namespace CalamityMod.World })); } //Timeless Shores ambiant tiles - if (Main.tile[X, Y].TileType == ModContent.TileType()) + if (Main.tile[X, Y].TileType == ModContent.TileType()) { //Driftwood Ambiance if (WorldGen.genRand.NextBool(5)) @@ -1479,6 +1567,13 @@ namespace CalamityMod.World } if (Main.tile[X, Y].TileType == ModContent.TileType()) { + if (WorldGen.genRand.NextBool(100) && !Main.tile[X - 1, Y].HasTile) + WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(7), Actions.Chain(new GenAction[] + { + new Modifiers.OnlyTiles((ushort)ModContent.TileType(),(ushort)ModContent.TileType()), + new Actions.ClearTile(), + new Actions.PlaceTile((ushort)ModContent.TileType()), + })); //BranchCoralsOnSand if (WorldGen.genRand.NextBool(55)) { @@ -1570,6 +1665,13 @@ namespace CalamityMod.World //radiant reefs ambient tiles if (Main.tile[X, Y].TileType == ModContent.TileType()) { + if (WorldGen.genRand.NextBool(100) && !Main.tile[X - 1, Y].HasTile) + WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(7), Actions.Chain(new GenAction[] + { + new Modifiers.OnlyTiles((ushort)ModContent.TileType()), + new Actions.ClearTile(), + new Actions.PlaceTile((ushort)ModContent.TileType()), + })); //Driftwood Ambiance if (WorldGen.genRand.NextBool(15)) { @@ -1617,6 +1719,17 @@ namespace CalamityMod.World WorldGen.PlaceObject(X, Y - 1, WorldGen.genRand.Next(MiscCorals)); } } + 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) + { + if (WorldGen.genRand.NextBool(1)) + { + 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) @@ -1652,6 +1765,26 @@ namespace CalamityMod.World WorldGen.PlaceTile(X - 2, Y, WorldGen.genRand.Next(WallCorals), true, false, -1, 0); } } + if (Main.tile[X, Y].TileType == ModContent.TileType()) + { + if (WorldGen.genRand.NextBool(100) && !Main.tile[X - 1, Y].HasTile) + WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(7), Actions.Chain(new GenAction[] + { + new Modifiers.OnlyTiles((ushort)ModContent.TileType()), + new Actions.ClearTile(), + new Actions.PlaceTile((ushort)ModContent.TileType()), + })); + } + if (Main.tile[X, Y].TileType == ModContent.TileType()) + { + if (WorldGen.genRand.NextBool(60) && !Main.tile[X - 1, Y].HasTile) + WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(7), Actions.Chain(new GenAction[] + { + new Modifiers.OnlyTiles((ushort)ModContent.TileType()), + new Actions.ClearTile(), + new Actions.PlaceTile((ushort)ModContent.TileType()), + })); + } } } } @@ -1702,6 +1835,7 @@ namespace CalamityMod.World ShapeData circle3 = new ShapeData(); GenAction blotchMod = new Modifiers.Blotches(2, 0.4); + GenAction blotchMod2 = new Modifiers.Blotches(1, 0.1); //first circle of navystone WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(radius), Actions.Chain(new GenAction[] @@ -1728,7 +1862,7 @@ namespace CalamityMod.World //clear out the middle of the circle WorldUtils.Gen(new Point(X, Y), new Shapes.Circle(radius - 9), Actions.Chain(new GenAction[] { - blotchMod.Output(circle3) + blotchMod2.Output(circle3) })); WorldUtils.Gen(new Point(X, Y), new ModShapes.All(circle3), Actions.Chain(new GenAction[] { @@ -1755,6 +1889,11 @@ namespace CalamityMod.World (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), + (ushort)ModContent.TileType(), }; void getAttachedPoints(int x, int y, List points)