Files
2025-04-02 23:11:36 -07:00

32 lines
1.6 KiB
C#

using CalamityMod.Items.Placeables.Furniture;
using CalamityMod.Systems;
using CalamityMod.Waters;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.BiomeManagers
{
public class ClamDenBiome : ModBiome
{
public override ModWaterStyle WaterStyle => SunkenSeaBurrowsWater.Instance;
public override ModUndergroundBackgroundStyle UndergroundBackgroundStyle => ModContent.Find<ModUndergroundBackgroundStyle>("CalamityMod/SunkenSeaBGStyle");
public override int BiomeTorchItemType => ModContent.ItemType<NavyPrismTorch>();
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 Sunken Sea background
public override string BackgroundPath => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
public override string MapBackground => "CalamityMod/Backgrounds/MapBackgrounds/AbyssBGLayer1";
// todo make this condition different than the normal burrows
public override bool IsBiomeActive(Player player)
{
bool MoreThanReefs = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaReefsTiles;
bool MoreThanPolyp = BiomeTileCounterSystem.SunkenSeaBurrowsTiles > BiomeTileCounterSystem.SunkenSeaPolypTiles;
return BiomeTileCounterSystem.SunkenSeaBurrowsTiles > 1000 && MoreThanReefs && MoreThanPolyp;
}
}
}