diff --git a/BiomeManagers/BasaltGullyBiome.cs b/BiomeManagers/BasaltGullyBiome.cs index 5f4b388829..e2ce89ae56 100644 --- a/BiomeManagers/BasaltGullyBiome.cs +++ b/BiomeManagers/BasaltGullyBiome.cs @@ -1,9 +1,29 @@ -using Terraria.ModLoader; +using CalamityMod.Systems; +using CalamityMod.Waters; +using Terraria.ID; +using Terraria; +using Terraria.ModLoader; +using CalamityMod.Items.Placeables.Furniture; namespace CalamityMod.BiomeManagers { public class BasaltGullyBiome : ModBiome { + public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance; + public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find("CalamityMod/SunkenSeaBGStyle"); + public override int BiomeTorchItemType => ModContent.ItemType(); + public override int Music => CalamityMod.Instance.GetMusicFromMusicMod("SunkenSea") ?? MusicID.OceanNight; + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + public override string BestiaryIcon => "CalamityMod/BiomeManagers/SunkenSeaIcon"; + // Placeholder until we get a dedicated Basalt Gully background + public override string BackgroundPath => "Terraria/Images/MapBG3"; + public override string MapBackground => "Terraria/Images/MapBG3"; + public override bool IsBiomeActive(Player player) + { + bool MoreThanBurrows = BiomeTileCounterSystem.SunkenSeaBasaltTiles > BiomeTileCounterSystem.SunkenSeaBurrowsTiles; + + return BiomeTileCounterSystem.SunkenSeaBasaltTiles > 1000 && MoreThanBurrows; + } } } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 1a4039340b..8e81031fe3 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -7191,8 +7191,8 @@ namespace CalamityMod.NPCs continue; WeightedRandom pool = new WeightedRandom(); - pool.Add(NPCID.None, 0f); - pool.Add(NPCType(), 0.25f); + pool.Add(NPCID.None, 1f); + pool.Add(NPCType(), 0.05f); int typeToSpawn = pool.Get(); if (typeToSpawn != NPCID.None) diff --git a/NPCs/SunkenSea/Steampod.cs b/NPCs/SunkenSea/Steampod.cs index 455a4e6b7a..d11cb25289 100644 --- a/NPCs/SunkenSea/Steampod.cs +++ b/NPCs/SunkenSea/Steampod.cs @@ -494,8 +494,8 @@ namespace CalamityMod.NPCs.SunkenSea public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { Texture2D tex = TextureAssets.Npc[NPC.type].Value; - spriteBatch.Draw(tex, NPC.Center - Main.screenPosition + Vector2.UnitY * NPC.gfxOffY, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(tex.Width / 2, tex.Height / 2 / Main.npcFrameCount[NPC.type]), NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : 0, 0); - spriteBatch.Draw(glowTex.Value, NPC.Center - Main.screenPosition + Vector2.UnitY * NPC.gfxOffY, NPC.frame, Color.White, NPC.rotation, new Vector2(tex.Width / 2, tex.Height / 2 / Main.npcFrameCount[NPC.type]), NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : 0, 0); + spriteBatch.Draw(tex, NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, new Vector2(tex.Width / 2, tex.Height / 2 / Main.npcFrameCount[NPC.type]), NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : 0, 0); + spriteBatch.Draw(glowTex.Value, NPC.Center - screenPos + Vector2.UnitY * NPC.gfxOffY, NPC.frame, Color.White, NPC.rotation, new Vector2(tex.Width / 2, tex.Height / 2 / Main.npcFrameCount[NPC.type]), NPC.scale, NPC.spriteDirection == 1 ? SpriteEffects.FlipHorizontally : 0, 0); return false; } diff --git a/Systems/Tile/BiomeTileCounterSystem.cs b/Systems/Tile/BiomeTileCounterSystem.cs index bd77177433..01ee1780ba 100644 --- a/Systems/Tile/BiomeTileCounterSystem.cs +++ b/Systems/Tile/BiomeTileCounterSystem.cs @@ -23,6 +23,7 @@ namespace CalamityMod.Systems public static int SunkenSeaPolypTiles = 0; public static int SunkenSeaReefsTiles = 0; public static int SunkenSeaBurrowsTiles = 0; + public static int SunkenSeaBasaltTiles = 0; public static int ArsenalLabTiles = 0; public static int AbyssTiles = 0; public static int FloralParadiseTiles = 0; @@ -41,6 +42,7 @@ namespace CalamityMod.Systems SunkenSeaPolypTiles = 0; SunkenSeaReefsTiles = 0; SunkenSeaBurrowsTiles = 0; + SunkenSeaBasaltTiles = 0; SulphurTiles = 0; AbyssTiles = 0; ArsenalLabTiles = 0; @@ -60,6 +62,7 @@ namespace CalamityMod.Systems 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()]; + SunkenSeaBasaltTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; AbyssTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; SulphurTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()]; FloralParadiseTiles = tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()] + tileCounts[ModContent.TileType()];