diff --git a/Assets/Music/Alternates/AbyssLayer3Alt.ogg b/Assets/Music/Alternates/AbyssLayer3Alt.ogg deleted file mode 100644 index 974d99b..0000000 Binary files a/Assets/Music/Alternates/AbyssLayer3Alt.ogg and /dev/null differ diff --git a/Assets/Music/Biomes/Aether.ogg b/Assets/Music/Biomes/Aether.ogg new file mode 100644 index 0000000..4ffbbcf Binary files /dev/null and b/Assets/Music/Biomes/Aether.ogg differ diff --git a/Assets/Music/Biomes/TownDay.ogg b/Assets/Music/Biomes/TownDay.ogg index 479db2d..76b6262 100644 Binary files a/Assets/Music/Biomes/TownDay.ogg and b/Assets/Music/Biomes/TownDay.ogg differ diff --git a/Assets/Music/Bosses/DukeFishron.ogg b/Assets/Music/Bosses/DukeFishron.ogg new file mode 100644 index 0000000..37a40e0 Binary files /dev/null and b/Assets/Music/Bosses/DukeFishron.ogg differ diff --git a/Assets/Music/Events/LanternFestival.ogg b/Assets/Music/Events/LanternFestival.ogg index caf1bcc..1645c04 100644 Binary files a/Assets/Music/Events/LanternFestival.ogg and b/Assets/Music/Events/LanternFestival.ogg differ diff --git a/Assets/Music/Events/PumpkinMoon.ogg b/Assets/Music/Events/PumpkinMoon.ogg new file mode 100644 index 0000000..1faacf3 Binary files /dev/null and b/Assets/Music/Events/PumpkinMoon.ogg differ diff --git a/Assets/Music/Events/Rain.ogg b/Assets/Music/Events/RainDay.ogg similarity index 100% rename from Assets/Music/Events/Rain.ogg rename to Assets/Music/Events/RainDay.ogg diff --git a/Assets/Music/Events/RainNight.ogg b/Assets/Music/Events/RainNight.ogg new file mode 100644 index 0000000..89472cb Binary files /dev/null and b/Assets/Music/Events/RainNight.ogg differ diff --git a/Assets/Music/Events/TownParty.ogg b/Assets/Music/Events/TownParty.ogg index 572016b..28db63b 100644 Binary files a/Assets/Music/Events/TownParty.ogg and b/Assets/Music/Events/TownParty.ogg differ diff --git a/Assets/Music/Events/TownRain.ogg b/Assets/Music/Events/TownRain.ogg index 37e124d..5f9ce4f 100644 Binary files a/Assets/Music/Events/TownRain.ogg and b/Assets/Music/Events/TownRain.ogg differ diff --git a/Assets/Music/Misc/FalseEpilogue.ogg b/Assets/Music/Misc/FalseEpilogue.ogg index cb49539..03f409f 100644 Binary files a/Assets/Music/Misc/FalseEpilogue.ogg and b/Assets/Music/Misc/FalseEpilogue.ogg differ diff --git a/Common/BossDetection.cs b/Common/BossDetection.cs new file mode 100644 index 0000000..ea295cf --- /dev/null +++ b/Common/BossDetection.cs @@ -0,0 +1,57 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common +{ + public class BossDetection : ModSystem + { + public static bool AreThereAnyBosses = false; + + public static bool IsABoss(NPC npc) + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (npc is null || !npc.active) + { + return false; + } + + // Add Slime God Paladins to the count + if (calamityMod) + { + if (npc.type == calamity.Find("EbonianPaladin").Type || + npc.type == calamity.Find("CrimulanPaladin").Type || + npc.type == calamity.Find("SplitEbonianPaladin").Type || + npc.type == calamity.Find("SplitCrimulanPaladin").Type) + { + return true; + } + } + + // Any boss, minus Martian Saucer, plus Eater of Worlds + return (npc.boss && + npc.type != NPCID.MartianSaucerCore) || + npc.type == NPCID.EaterofWorldsBody || + npc.type == NPCID.EaterofWorldsHead || + npc.type == NPCID.EaterofWorldsTail; + } + + public static bool AnyBossNPCS() + { + foreach (NPC npc in Main.ActiveNPCs) + { + if (IsABoss(npc)) + { + return true; + } + } + return false; + } + + public override void PreUpdateEntities() + { + AreThereAnyBosses = AnyBossNPCS(); + } + } +} diff --git a/Common/Configs/MusicConfig.cs b/Common/Configs/MusicConfig.cs index 2919cd1..cfa68ce 100644 --- a/Common/Configs/MusicConfig.cs +++ b/Common/Configs/MusicConfig.cs @@ -25,10 +25,6 @@ namespace UnCalamityModMusic.Common.Configs [DefaultValue(true)] public bool HardmodeInterlude { get; set; } - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(false)] - public bool AbyssLayer3Alt { get; set; } - [Header("$Mods.UnCalamityModMusic.Configs.MusicConfig.ConditionChangesHeader")] [BackgroundColor(192, 54, 64, 192)] diff --git a/Common/Configs/OtherConfig.cs b/Common/Configs/OtherConfig.cs index 0def5b4..28a41cc 100644 --- a/Common/Configs/OtherConfig.cs +++ b/Common/Configs/OtherConfig.cs @@ -27,11 +27,6 @@ namespace UnCalamityModMusic.Common.Configs [Header("$Mods.UnCalamityModMusic.Configs.OtherConfig.OtherChangesHeader")] - [ReloadRequired] - [BackgroundColor(192, 54, 64, 192)] - [DefaultValue(true)] - public bool MusicBoxRecipes { get; set; } - [ReloadRequired] [BackgroundColor(192, 54, 64, 192)] [DefaultValue(true)] diff --git a/Common/ModCompatibility/BossChecklistCompatibility.cs b/Common/ModCompatibility/BossChecklistCompatibility.cs index cc36000..23edf67 100644 --- a/Common/ModCompatibility/BossChecklistCompatibility.cs +++ b/Common/ModCompatibility/BossChecklistCompatibility.cs @@ -24,7 +24,7 @@ namespace UnCalamityModMusic.Common.ModCompatibility { "Terraria MoonLord", ModContent.ItemType() }, //{ "Terraria CultistBoss", ModContent.ItemType() }, //{ "Terraria HallowBoss", ModContent.ItemType() }, - //{ "Terraria DukeFishron", ModContent.ItemType() }, + { "Terraria DukeFishron", ModContent.ItemType() }, //{ "Terraria Golem", ModContent.ItemType() }, //{ "Terraria Plantera", ModContent.ItemType() }, //{ "Terraria SkeletronPrime", ModContent.ItemType() }, @@ -33,6 +33,7 @@ namespace UnCalamityModMusic.Common.ModCompatibility //{ "Terraria QueenSlimeBoss", ModContent.ItemType() }, { "Terraria WallofFlesh", ModContent.ItemType() }, { "Terraria Skeletron", ModContent.ItemType() }, + //{ "Terraria Deerclops", ModContent.ItemType() }, //{ "Terraria QueenBee", ModContent.ItemType() }, { "Terraria BrainofCthulhu", ModContent.ItemType() }, { "Terraria EaterofWorlds", ModContent.ItemType() }, @@ -46,7 +47,8 @@ namespace UnCalamityModMusic.Common.ModCompatibility //{ "Terraria LunarEvent", new List { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() } }, //{ "Terraria MartianMadness", ModContent.ItemType() }, //{ "Terraria FrostMoon", ModContent.ItemType() }, - //{ "Terraria PumpkinMoon", ModContent.ItemType() }, + { "Terraria PumpkinMoon", ModContent.ItemType() }, + //{ "Terraria OldOnesArmy ", new List { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() } }, //{ "Terraria PirateInvasion", ModContent.ItemType() }, //{ "Terraria GoblinArmy", ModContent.ItemType() }, //{ "Terraria Eclipse", ModContent.ItemType() }, diff --git a/Common/ModCompatibility/InfernumCompatibility.cs b/Common/ModCompatibility/InfernumCompatibility.cs index c459009..f532454 100644 --- a/Common/ModCompatibility/InfernumCompatibility.cs +++ b/Common/ModCompatibility/InfernumCompatibility.cs @@ -147,11 +147,8 @@ namespace UnCalamityModMusic.Common.ModCompatibility } } //Makes the VCMM Desert theme play in the Lost Colosseum after Argus is defeated, instead of vanilla music - [JITWhenModsEnabled("InfernumMode")] public class LostColosseum_Aftermath : ModSceneEffect { - public static bool downedArgus => InfernumMode.Content.Subworlds.LostColosseum.HasBereftVassalBeenDefeated; - public override int Music => MusicPathing.GetMusicSlot("Desert"); public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; @@ -164,7 +161,11 @@ namespace UnCalamityModMusic.Common.ModCompatibility if (infernumMod) { - if (downedArgus) + NPC fakeNPC = new(); + int npcType = infernum.Find("BereftVassal").Type; + fakeNPC.SetDefaults(npcType); + + if (!NPC.AnyNPCs(npcType) && Main.BestiaryTracker.Kills.GetKillCount(fakeNPC) > 0) { return PlayerFlags.ZoneLostColosseum; } diff --git a/Common/ModCompatibility/MusicDisplayCompatibility.cs b/Common/ModCompatibility/MusicDisplayCompatibility.cs index 50172b7..a8fc15e 100644 --- a/Common/ModCompatibility/MusicDisplayCompatibility.cs +++ b/Common/ModCompatibility/MusicDisplayCompatibility.cs @@ -25,10 +25,9 @@ namespace UnCalamityModMusic.Common.ModCompatibility display.Call("AddMusic", slot, Language.GetTextValue("Mods.UnCalamityModMusic.ModSupport.MusicDisplay.SongNames." + songKey), Language.GetTextValue("Mods.UnCalamityModMusic.ModSupport.MusicDisplay.Authors." + authorKey), Mod.DisplayName); } - AddMusic("AbyssLayer3Alt", "HeartPlusUp", "Alternates"); AddMusic("Space", "HeartPlusUp", "Biomes"); AddMusic("Underworld", "HeartPlusUp", "Biomes"); - //AddMusic("Aether", "", "Biomes"); + AddMusic("Aether", "Forge", "Biomes"); //AddMusic("Graveyard", "", "Biomes"); AddMusic("Meteorite", "HeartPlusUp", "Biomes"); AddMusic("WorkshopTier6", "HeartPlusUp", "Biomes"); @@ -70,7 +69,7 @@ namespace UnCalamityModMusic.Common.ModCompatibility AddMusic("MoonLord", "psykomatic", "Bosses"); //AddMusic("LunaticCultist", "", "Bosses"); //AddMusic("EmpressofLight", "", "Bosses"); - //AddMusic("DukeFishron", "", "Bosses"); + AddMusic("DukeFishron", "TYESKI", "Bosses"); //AddMusic("Golem", "", "Bosses"); //AddMusic("Plantera", "", "Bosses"); //AddMusic("Mechs", "", "Bosses"); @@ -78,8 +77,10 @@ namespace UnCalamityModMusic.Common.ModCompatibility //AddMusic("Twins", "", "Bosses"); //AddMusic("Destroyer", "", "Bosses"); //AddMusic("QueenSlime", "", "Bosses"); + //AddMusic("Dreadnautilus", "", "Bosses"); AddMusic("WallofFlesh", "HeartPlusUp", "Bosses"); AddMusic("Skeletron", "HeartPlusUp", "Bosses"); + //AddMusic("Deerclops", "", "Bosses"); //AddMusic("QueenBee", "", "Bosses"); AddMusic("BrainofCthulhu", "HeartPlusUpFeature2", "Bosses"); AddMusic("EaterofWorlds", "HeartPlusUp", "Bosses"); @@ -93,9 +94,11 @@ namespace UnCalamityModMusic.Common.ModCompatibility //AddMusic("CelestialPillarVortex", "", "Events"); //AddMusic("MartianMadness", "", "Events"); //AddMusic("FrostMoon", "", "Events"); - //AddMusic("PumpkinMoon", "", "Events"); + AddMusic("PumpkinMoon", "TYRANT", "Events"); + //AddMusic("OldOnesArmyTier3", "", "Events"); + //AddMusic("OldOnesArmyTier2", "", "Events"); + //AddMusic("OldOnesArmyTier1", "", "Events"); //AddMusic("PirateInvasion", "", "Events"); - //AddMusic("FrostLegion", "", "Events"); //AddMusic("GoblinArmy", "", "Events"); //AddMusic("SolarEclipse", "", "Events"); AddMusic("BloodMoon", "Thriplerex", "Events"); @@ -106,17 +109,18 @@ namespace UnCalamityModMusic.Common.ModCompatibility AddMusic("OceanRain", "HeartPlusUp", "Events"); //AddMusic("Thunderstorm", "", "Events"); AddMusic("TownRain", "HeartPlusUp", "Events"); - AddMusic("Rain", "HeartPlusUp", "Events"); + AddMusic("RainNight", "HeartPlusUp", "Events"); + AddMusic("RainDay", "HeartPlusUp", "Events"); AddMusic("TownParty", "HeartPlusUp", "Events"); //AddMusic("WindyDay", "", "Events"); AddMusic("LanternFestival", "HeartPlusUp", "Events"); - AddMusic("HardmodeInterlude", "Salvati", "Misc"); - AddMusic("FalseEpilogue", "HeartPlusUp", "Misc"); //AddMusic("DragonsLull", "", "Misc"); AddMusic("RainLegacy", "HeartPlusUp", "Misc"); + AddMusic("FalseEpilogue", "TYRANT", "Misc"); //AddMusic("ImpendingDoom", "", "Misc"); //AddMusic("CultistRitual", "", "Misc"); //AddMusic("MechEngaging", "", "Misc"); + AddMusic("HardmodeInterlude", "Salvati", "Misc"); } } } diff --git a/Common/ModCompatibility/RemnantsCompatibility.cs b/Common/ModCompatibility/RemnantsCompatibility.cs new file mode 100644 index 0000000..bab6a37 --- /dev/null +++ b/Common/ModCompatibility/RemnantsCompatibility.cs @@ -0,0 +1,77 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Common.Music +{ + //Ambience Scenes + public class BeeHive_Ambience_Remnants : AmbienceBaseScene + { + public override string Path => "BeeHive"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneHive && !ModContent.GetInstance().DisableBeeHiveAmbience && base.IsSceneEffectActive(player); + } + } + public class Geodes_Ambience_Remnants : AmbienceBaseScene + { + public override string Path => "Caverns"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class JungleUnderground_Ambience_Remnants : AmbienceBaseScene + { + public override string Path => "JungleUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + //Biome Scenes + public class Geodes_Remnants : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Geodes"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneGraniteCave || PlayerFlags.ZoneMarbleCave; + } + } + public class JungleUnderground_Remnants : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("JungleUnderground"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyJungle : MusicID.JungleUnderground; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneHive; + } + } +} \ No newline at end of file diff --git a/Common/Music/AmbienceScenes.cs b/Common/Music/AmbienceScenes.cs index 89129df..c66649d 100644 --- a/Common/Music/AmbienceScenes.cs +++ b/Common/Music/AmbienceScenes.cs @@ -99,29 +99,72 @@ namespace UnCalamityModMusic.Common.Music if (calamityMod) { - behindLabWall = - backWall.WallType == WallID.ObsidianBrick || - backWall.WallType == WallID.Glass || - backWall.WallType == WallID.SnowWallUnsafe || - backWall.WallType == WallID.IceUnsafe || - backWall.WallType == WallID.Waterfall || - backWall.WallType == WallID.Lavafall || - backWall.WallType == WallID.IronBrick || - backWall.WallType == calamity.Find("AstralIceWall").Type || - backWall.WallType == calamity.Find("AstralSnowWall").Type || - backWall.WallType == calamity.Find("HavocplateWall").Type || - backWall.WallType == calamity.Find("CinderplateWall").Type || - backWall.WallType == calamity.Find("ElumplateWall").Type || - backWall.WallType == calamity.Find("HazardChevronWall").Type || - backWall.WallType == calamity.Find("LaboratoryPanelWall").Type || - backWall.WallType == calamity.Find("LaboratoryPlateBeam").Type || - backWall.WallType == calamity.Find("LaboratoryPlatePillar").Type || - backWall.WallType == calamity.Find("LaboratoryPlatingWall").Type || - backWall.WallType == calamity.Find("NavyplateWall").Type || - backWall.WallType == calamity.Find("PlagueContainmentCellsWall").Type || - backWall.WallType == calamity.Find("PlaguedPlateWall").Type || - backWall.WallType == calamity.Find("RustedPlatePillar").Type || - backWall.WallType == calamity.Find("RustedPlatingWall").Type; + // When Calamity 2.1+ is not enabled + if (calamity.Version < new Version(2, 1)) + { + behindLabWall = + backWall.WallType == WallID.ObsidianBrick || + backWall.WallType == WallID.Glass || + backWall.WallType == WallID.SnowWallUnsafe || + backWall.WallType == WallID.IceUnsafe || + backWall.WallType == WallID.Waterfall || + backWall.WallType == WallID.Lavafall || + backWall.WallType == WallID.IronBrick || + backWall.WallType == calamity.Find("AstralIceWall").Type || + backWall.WallType == calamity.Find("AstralSnowWall").Type || + backWall.WallType == calamity.Find("HavocplateWall").Type || + backWall.WallType == calamity.Find("CinderplateWall").Type || + backWall.WallType == calamity.Find("ElumplateWall").Type || + backWall.WallType == calamity.Find("HazardChevronWall").Type || + backWall.WallType == calamity.Find("LaboratoryPanelWall").Type || + backWall.WallType == calamity.Find("LaboratoryPlateBeam").Type || + backWall.WallType == calamity.Find("LaboratoryPlatePillar").Type || + backWall.WallType == calamity.Find("LaboratoryPlatingWall").Type || + backWall.WallType == calamity.Find("NavyplateWall").Type || + backWall.WallType == calamity.Find("PlagueContainmentCellsWall").Type || + backWall.WallType == calamity.Find("PlaguedPlateWall").Type || + backWall.WallType == calamity.Find("RustedPlatePillar").Type || + backWall.WallType == calamity.Find("RustedPlatingWall").Type; + } + else + { + behindLabWall = + backWall.WallType == WallID.AmberGemspark || + backWall.WallType == WallID.AncientSilverBrickWall || + backWall.WallType == WallID.CopperPlating || + backWall.WallType == WallID.EmeraldGemspark || + backWall.WallType == WallID.Granite || + backWall.WallType == WallID.GrayBrick || + backWall.WallType == WallID.IridescentBrick || + backWall.WallType == WallID.IronBrick || + backWall.WallType == WallID.Lavafall || + backWall.WallType == WallID.LavaMossBlockWall || + backWall.WallType == WallID.LeadBrick || + backWall.WallType == WallID.ObsidianBrick || + backWall.WallType == WallID.RubyGemspark || + backWall.WallType == WallID.SapphireGemspark || + backWall.WallType == WallID.SilverBrick || + backWall.WallType == WallID.StoneSlab || + backWall.WallType == WallID.TinPlating || + backWall.WallType == WallID.TopazGemspark || + backWall.WallType == WallID.Waterfall || + backWall.WallType == calamity.Find("CinderplateWall").Type || + backWall.WallType == calamity.Find("ElumplateWall").Type || + backWall.WallType == calamity.Find("EutrophicGlassWall").Type || + backWall.WallType == calamity.Find("HavocplateWall").Type || + backWall.WallType == calamity.Find("HazardChevronWall").Type || + backWall.WallType == calamity.Find("LaboratoryPanelWall").Type || + backWall.WallType == calamity.Find("LaboratoryPlateBeam").Type || + backWall.WallType == calamity.Find("LaboratoryPlatePillar").Type || + backWall.WallType == calamity.Find("LaboratoryPlatingWall").Type || + backWall.WallType == calamity.Find("NavyplateWall").Type || + backWall.WallType == calamity.Find("OnyxplateWall").Type || + backWall.WallType == calamity.Find("PlagueContainmentCellsWall").Type || + backWall.WallType == calamity.Find("PlaguedPlateWall").Type || + backWall.WallType == calamity.Find("RustedPlatePillar").Type || + backWall.WallType == calamity.Find("RustedPlatingWall").Type || + backWall.WallType == calamity.Find("ShellstoneSlabWall").Type; + } nearBioLabPoint = sunkenSeaLabDistance <= labRadius || @@ -166,42 +209,45 @@ namespace UnCalamityModMusic.Common.Music { public override string Path => "RainHeavy"; - public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; public override bool IsSceneEffectActive(Player player) { - bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); - bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition3 = ModContent.GetInstance().IsSceneEffectActive(player); - return (condition1 || condition2) && Main.maxRaining >= 0.6 && base.IsSceneEffectActive(player); + return (condition1 || condition2 || condition3) && Main.maxRaining >= 0.6 && base.IsSceneEffectActive(player); } } public class RainNormal_Ambience : AmbienceBaseScene { public override string Path => "RainNormal"; - public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; public override bool IsSceneEffectActive(Player player) { - bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); - bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition3 = ModContent.GetInstance().IsSceneEffectActive(player); - return (condition1 || condition2) && Main.maxRaining >= 0.4 && Main.maxRaining < 0.6 && base.IsSceneEffectActive(player); + return (condition1 || condition2 || condition3) && Main.maxRaining >= 0.4 && Main.maxRaining < 0.6 && base.IsSceneEffectActive(player); } } public class RainLight_Ambience : AmbienceBaseScene { public override string Path => "RainLight"; - public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; public override bool IsSceneEffectActive(Player player) { - bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); - bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition3 = ModContent.GetInstance().IsSceneEffectActive(player); - return (condition1 || condition2) && Main.maxRaining < 0.4 && base.IsSceneEffectActive(player); + return (condition1 || condition2 || condition3) && Main.maxRaining < 0.4 && base.IsSceneEffectActive(player); } } public class JungleTemple_Ambience : AmbienceBaseScene @@ -435,30 +481,6 @@ namespace UnCalamityModMusic.Common.Music return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); } } - public class BeeHive_Remnants_Ambience : AmbienceBaseScene - { - public override string Path => "BeeHive"; - - public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeHigh; - - public override bool IsSceneEffectActive(Player player) - { - return PlayerFlags.ZoneHive && !ModContent.GetInstance().DisableBeeHiveAmbience && base.IsSceneEffectActive(player); - } - } - public class BeeHive_Ambience : AmbienceBaseScene - { - public override string Path => "BeeHive"; - - public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeMedium; - - public override bool IsSceneEffectActive(Player player) - { - Tile backWall = Framing.GetTileSafely((int)(player.Center.X / 16), (int)(player.Center.Y / 16)); - - return backWall.WallType == WallID.HiveUnsafe && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !player.ZoneMeteor && !ModContent.GetInstance().DisableBeeHiveAmbience && base.IsSceneEffectActive(player); - } - } public class SpiderCave_Ambience : AmbienceBaseScene { public override string Path => "SpiderCave"; @@ -472,17 +494,6 @@ namespace UnCalamityModMusic.Common.Music return backWall.WallType == WallID.SpiderUnsafe && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !player.ZoneMeteor && !ModContent.GetInstance().DisableSpiderCaveAmbience && base.IsSceneEffectActive(player); } } - public class Geodes_Remnants_Ambience : AmbienceBaseScene - { - public override string Path => "Caverns"; - - public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; - - public override bool IsSceneEffectActive(Player player) - { - return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); - } - } public class Geodes_Ambience : AmbienceBaseScene { public override string Path => "Caverns"; @@ -508,17 +519,6 @@ namespace UnCalamityModMusic.Common.Music return (condition1 || condition2) && base.IsSceneEffectActive(player); } } - public class JungleUnderground_Remnants_Ambience : AmbienceBaseScene - { - public override string Path => "JungleUnderground"; - - public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; - - public override bool IsSceneEffectActive(Player player) - { - return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); - } - } public class JungleUnderground_Ambience : AmbienceBaseScene { public override string Path => "JungleUnderground"; @@ -610,17 +610,6 @@ namespace UnCalamityModMusic.Common.Music return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); } } - public class DesertUnderground_Remnants_Ambience : AmbienceBaseScene - { - public override string Path => "DesertUnderground"; - - public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; - - public override bool IsSceneEffectActive(Player player) - { - return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); - } - } public class DesertUnderground_Ambience : AmbienceBaseScene { public override string Path => "DesertUnderground"; diff --git a/Common/Music/BiomeMusicScenes.cs b/Common/Music/BiomeMusicScenes.cs index 8d5be49..baa8f5a 100644 --- a/Common/Music/BiomeMusicScenes.cs +++ b/Common/Music/BiomeMusicScenes.cs @@ -38,15 +38,7 @@ namespace UnCalamityModMusic.Common.Music } public class Aether : ModSceneEffect { - //public override int Music => MusicPathing.GetMusicSlot("Aether"); - public override int Music - { - get - { - bool otherworldMusicActive = PlayerFlags.SwapMusic(); - return otherworldMusicActive ? MusicID.OtherworldlyUGHallow : MusicID.Shimmer; - } - } + public override int Music => MusicPathing.GetMusicSlot("Aether"); public override SceneEffectPriority Priority => SceneEffectPriority.Environment; @@ -278,19 +270,6 @@ namespace UnCalamityModMusic.Common.Music return player.ZoneUnderworldHeight && !(PlayerFlags.TownSceneActive || PlayerFlags.WorkshopSceneActive) && !(PlayerFlags.ZoneBrimstoneCrags || PlayerFlags.ZoneProfanedTemple); } } - public class AbyssLayer3Alt : ModSceneEffect - { - public override int Music => MusicPathing.GetMusicSlot("AbyssLayer3Alt"); - - public override SceneEffectPriority Priority => SceneEffectPriority.Environment; - - public override float GetWeight(Player player) => 0.51f; - - public override bool IsSceneEffectActive(Player player) - { - return PlayerFlags.ZoneDeepAbyss && !(PlayerFlags.TownSceneActive || PlayerFlags.WorkshopSceneActive) && ModContent.GetInstance().AbyssLayer3Alt; - } - } public class GlowingMushroomFields : ModSceneEffect { public override int Music => MusicPathing.GetMusicSlot("GlowingMushroomFields"); @@ -376,19 +355,6 @@ namespace UnCalamityModMusic.Common.Music return player.ZoneGraveyard; } } - public class Geodes_Remnants : ModSceneEffect - { - public override int Music => MusicPathing.GetMusicSlot("Geodes"); - - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; - - public override float GetWeight(Player player) => 0.51f; - - public override bool IsSceneEffectActive(Player player) - { - return PlayerFlags.ZoneGraniteCave || PlayerFlags.ZoneMarbleCave; - } - } public class Geodes : ModSceneEffect { public override int Music => MusicPathing.GetMusicSlot("Geodes"); @@ -429,27 +395,6 @@ namespace UnCalamityModMusic.Common.Music return /*Main.dayTime && */player.ZoneJungle && (player.ZoneOverworldHeight || PlayerFlags.onRemixedSurface) && !player.ZoneMeteor && PlayerFlags.notRaining && !LanternNight.LanternsUp; } } - public class JungleUnderground_Remnants : ModSceneEffect - { - //public override int Music => MusicPathing.GetMusicSlot("JungleUnderground"); - public override int Music - { - get - { - bool otherworldMusicActive = PlayerFlags.SwapMusic(); - return otherworldMusicActive ? MusicID.OtherworldlyJungle : MusicID.JungleUnderground; - } - } - - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; - - public override float GetWeight(Player player) => 0.51f; - - public override bool IsSceneEffectActive(Player player) - { - return PlayerFlags.ZoneHive; - } - } public class JungleUnderground : ModSceneEffect { //public override int Music => MusicPathing.GetMusicSlot("JungleUnderground"); @@ -573,27 +518,6 @@ namespace UnCalamityModMusic.Common.Music return player.ZoneDesert && !PlayerFlags.ugDesertOriginalHeight; } } - public class DesertUnderground_Remnants : ModSceneEffect - { - //public override int Music => MusicPathing.GetMusicSlot("DesertUnderground"); - public override int Music - { - get - { - bool otherworldMusicActive = PlayerFlags.SwapMusic(); - return otherworldMusicActive ? MusicID.OtherworldlyDesert : MusicID.UndergroundDesert; - } - } - - public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; - - public override float GetWeight(Player player) => 0.51f; - - public override bool IsSceneEffectActive(Player player) - { - return PlayerFlags.ZonePyramid; - } - } public class DesertUnderground : ModSceneEffect { //public override int Music => MusicPathing.GetMusicSlot("DesertUnderground"); diff --git a/Common/Music/BossMusicScenes.cs b/Common/Music/BossMusicScenes.cs index 53b7973..9d69162 100644 --- a/Common/Music/BossMusicScenes.cs +++ b/Common/Music/BossMusicScenes.cs @@ -1,5 +1,4 @@ using Microsoft.Xna.Framework; -using System; using Terraria; using Terraria.GameContent.Events; using Terraria.ID; @@ -43,7 +42,7 @@ namespace UnCalamityModMusic.Common.Music { /*public override int Music => MusicPathing.GetMusicSlot("ImpendingDoom"); - public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + public override SceneEffectPriority Priority => SceneEffectPriority.Event + 1; public override bool IsSceneEffectActive(Player player) { @@ -71,15 +70,35 @@ namespace UnCalamityModMusic.Common.Music } public class CultistRitual : ModSceneEffect { - /*public override int Music => MusicPathing.GetMusicSlot("CultistRitual"); + /*public bool AreTheyMad + { + get + { + foreach (NPC npc in Main.npc) + { + if (npc.active && npc.type == NPCID.CultistTablet && npc.localAI[0] == 2) + { + return true; + } + } + return false; + } + } - public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + public override int Music => MusicPathing.GetMusicSlot("CultistRitual"); + + public override SceneEffectPriority Priority => AreTheyMad ? SceneEffectPriority.BossLow : SceneEffectPriority.Environment + 1; public override bool IsSceneEffectActive(Player player) { - return tablet.localAI[3] == 0f && NPC.AnyNPCs(NPCID.CultistTablet) && Main.npc[NPC.FindFirstNPC(NPCID.CultistTablet)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - return Main.npc[NPC.FindFirstNPC(NPCID.CultistTablet)].localAI[3] != 0f && NPC.AnyNPCs(NPCID.CultistTablet) && Main.npc[NPC.FindFirstNPC(NPCID.CultistTablet)].Distance(player.Center) <= 1450f; - }*/ + double angerFactor = AreTheyMad ? 2.5 : 5; + + bool condition1 = NPC.AnyNPCs(NPCID.CultistTablet) && Main.npc[NPC.FindFirstNPC(NPCID.CultistTablet)].Distance(player.Center) <= PlayerFlags.MusicTileRange / angerFactor; + bool condition2 = NPC.AnyNPCs(NPCID.CultistDevote) && Main.npc[NPC.FindFirstNPC(NPCID.CultistDevote)].Distance(player.Center) <= PlayerFlags.MusicTileRange / angerFactor; + bool condition3 = NPC.AnyNPCs(NPCID.CultistArcherBlue) && Main.npc[NPC.FindFirstNPC(NPCID.CultistArcherBlue)].Distance(player.Center) <= PlayerFlags.MusicTileRange / angerFactor; + + return (condition1 || condition2 || condition3) && !BossDetection.AreThereAnyBosses; + }*/ } public class EmpressofLight : ModSceneEffect { @@ -139,15 +158,12 @@ namespace UnCalamityModMusic.Common.Music bool spazmatismActive = NPC.AnyNPCs(NPCID.Spazmatism) && Main.npc[NPC.FindFirstNPC(NPCID.Spazmatism)].Distance(player.Center) <= PlayerFlags.MusicTileRange; bool retinazerActive = NPC.AnyNPCs(NPCID.Retinazer) && Main.npc[NPC.FindFirstNPC(NPCID.Retinazer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - bool foveanatorActive = PlayerFlags.FoveanatorActive; bool destroyerHeadActive = NPC.AnyNPCs(NPCID.TheDestroyer) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; bool destroyerBodyActive = NPC.AnyNPCs(NPCID.TheDestroyerBody) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyerBody)].Distance(player.Center) <= PlayerFlags.MusicTileRange; bool destroyerTailActive = NPC.AnyNPCs(NPCID.TheDestroyerTail) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyerTail)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - bool skeletronPrime1Active = NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - bool skeletronPrime2Active = PlayerFlags.SkeletronPrime2Active; + bool skeletronPrimeActive = NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - bool skeletronPrimeActive = skeletronPrime1Active || skeletronPrime2Active; - bool twinsActive = spazmatismActive || retinazerActive || foveanatorActive; + bool twinsActive = spazmatismActive || retinazerActive; bool destroyerActive = destroyerHeadActive || destroyerBodyActive || destroyerTailActive; if (destroyerActive && twinsActive && skeletronPrimeActive) @@ -170,31 +186,25 @@ namespace UnCalamityModMusic.Common.Music { public override int Music => InfernumCompatibility.DecideOnMusicPath("SkeletronPrime", "MechBosses"); - public override SceneEffectPriority Priority => PlayerFlags.SkeletronPrime2Active ? InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossMedium) : InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); public override bool IsSceneEffectActive(Player player) { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - bool condition1 = NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - bool condition2 = PlayerFlags.SkeletronPrime2Active; - - return condition1 || condition2; + return NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= PlayerFlags.MusicTileRange; } } public class Twins : ModSceneEffect { public override int Music => InfernumCompatibility.DecideOnMusicPath("Twins", "MechBosses"); - public override SceneEffectPriority Priority => PlayerFlags.FoveanatorActive ? InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossMedium) : InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); public override bool IsSceneEffectActive(Player player) { bool condition1 = NPC.AnyNPCs(NPCID.Spazmatism) && Main.npc[NPC.FindFirstNPC(NPCID.Spazmatism)].Distance(player.Center) <= PlayerFlags.MusicTileRange; bool condition2 = NPC.AnyNPCs(NPCID.Retinazer) && Main.npc[NPC.FindFirstNPC(NPCID.Retinazer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - bool condition3 = PlayerFlags.FoveanatorActive; - return condition1 || condition2 || condition3; + return condition1 || condition2; } } public class Destroyer : ModSceneEffect @@ -216,7 +226,7 @@ namespace UnCalamityModMusic.Common.Music { /*public override int Music => MusicPathing.GetMusicSlot("MechEngaging"); - public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + public override SceneEffectPriority Priority => SceneEffectPriority.Event + 1; public override bool IsSceneEffectActive(Player player) { @@ -259,17 +269,6 @@ namespace UnCalamityModMusic.Common.Music return condition1 || condition2; } } - public class Deerclops : ModSceneEffect - { - /*public override int Music => MusicPathing.GetMusicSlot("Deerclops"); - - public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; - - public override bool IsSceneEffectActive(Player player) - { - return NPC.AnyNPCs(NPCID.Deerclops) && Main.npc[NPC.FindFirstNPC(NPCID.Deerclops)].Distance(player.Center) <= PlayerFlags.MusicTileRange; - }*/ - } public class Skeletron : ModSceneEffect { public override int Music => InfernumCompatibility.DecideOnMusicPath("Skeletron", "Skeletron"); @@ -281,7 +280,18 @@ namespace UnCalamityModMusic.Common.Music return NPC.AnyNPCs(NPCID.SkeletronHead) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronHead)].Distance(player.Center) <= PlayerFlags.MusicTileRange; } } - public class QueenBee : ModSceneEffect + public class Deerclops : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("Deerclops"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.Deerclops) && Main.npc[NPC.FindFirstNPC(NPCID.Deerclops)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + }*/ + } + public class QueenBee : ModSceneEffect { public override int Music => InfernumCompatibility.DecideOnMusicPath("QueenBee", "QueenBee"); diff --git a/Common/Music/EventMusicScenes.cs b/Common/Music/EventMusicScenes.cs index 18030e0..f42f555 100644 --- a/Common/Music/EventMusicScenes.cs +++ b/Common/Music/EventMusicScenes.cs @@ -98,18 +98,40 @@ namespace UnCalamityModMusic.Common.Music } public class PumpkinMoon : ModSceneEffect { - /*public override int Music => MusicPathing.GetMusicSlot("PumpkinMoon"); + public override int Music => MusicPathing.GetMusicSlot("PumpkinMoon"); public override SceneEffectPriority Priority => SceneEffectPriority.Event; public override bool IsSceneEffectActive(Player player) { return Main.pumpkinMoon && (PlayerFlags.onSurface || Main.remixWorld); + } + } + public class OldOnesArmyTier3 : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("OldOnesArmyTier3"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Event; + + public override bool IsSceneEffectActive(Player player) + { + return NPC.downedGolemBoss && ModContent.GetInstance().IsSceneEffectActive(player); }*/ } - public class OldOnesArmy : ModSceneEffect + public class OldOnesArmyTier2 : ModSceneEffect { - /*public override int Music => MusicPathing.GetMusicSlot("OldOnesArmy"); + /*public override int Music => MusicPathing.GetMusicSlot("OldOnesArmyTier2"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Event; + + public override bool IsSceneEffectActive(Player player) + { + return NPC.downedMechBossAny && ModContent.GetInstance().IsSceneEffectActive(player); + }*/ + } + public class OldOnesArmyTier1 : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("OldOnesArmyTier1"); public override SceneEffectPriority Priority => SceneEffectPriority.Event; @@ -172,7 +194,7 @@ namespace UnCalamityModMusic.Common.Music } public class FrostLegion : ModSceneEffect { - /*public override int Music => MusicPathing.GetMusicSlot("FrostLegion"); + /*public override int Music => MusicPathing.GetMusicSlot("Blizzard"); public override SceneEffectPriority Priority => SceneEffectPriority.Event; @@ -317,19 +339,33 @@ namespace UnCalamityModMusic.Common.Music public override bool IsSceneEffectActive(Player player) { - return PlayerFlags.inTownWithRain && PlayerFlags.notInExcludedTownBiome && !(/*Main._shouldUseStormMusic || */player.ZoneBeach || player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor || PlayerFlags.ZoneSulfurSea); + return Main.dayTime && PlayerFlags.inTownWithRain && PlayerFlags.notInExcludedTownBiome && !(/*Main._shouldUseStormMusic || */player.ZoneBeach || player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor || PlayerFlags.ZoneSulfurSea); } } - public class Rain : ModSceneEffect + public class RainNight : ModSceneEffect { - public override int Music => MusicPathing.GetMusicSlot("Rain"); + public override int Music => MusicPathing.GetMusicSlot("RainNight"); public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; public override bool IsSceneEffectActive(Player player) { - bool condition1 = !Main.remixWorld && PlayerFlags.isRaining && PlayerFlags.ZoneOverworldHeightExtra && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); - bool condition2 = Main.remixWorld && PlayerFlags.isRaining && (double)(player.position.Y / 16f) > Main.rockLayer && player.position.Y / 16f < (float)(Main.maxTilesY - 350) && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + bool condition1 = !Main.remixWorld && PlayerFlags.isRaining && !Main.dayTime && PlayerFlags.ZoneOverworldHeightExtra && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + bool condition2 = Main.remixWorld && PlayerFlags.isRaining && !Main.dayTime && (double)(player.position.Y / 16f) > Main.rockLayer && player.position.Y / 16f < (float)(Main.maxTilesY - 350) && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + + return condition1 || condition2; + } + } + public class RainDay : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("RainDay"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && PlayerFlags.isRaining && Main.dayTime && PlayerFlags.ZoneOverworldHeightExtra && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + bool condition2 = Main.remixWorld && PlayerFlags.isRaining && Main.dayTime && (double)(player.position.Y / 16f) > Main.rockLayer && player.position.Y / 16f < (float)(Main.maxTilesY - 350) && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); return condition1 || condition2; } @@ -342,10 +378,13 @@ namespace UnCalamityModMusic.Common.Music public override bool IsSceneEffectActive(Player player) { - bool condition1 = BirthdayParty.PartyIsUp && PlayerFlags.inTown && PlayerFlags.notInExcludedTownBiome && PlayerFlags.notRaining; - bool condition2 = BirthdayParty.PartyIsUp && PlayerFlags.inUgTown && PlayerFlags.notInExcludedTownBiome; + bool inTownWithWind = player.townNPCs > 2f && Main._shouldUseWindyDayMusic && player.ZoneOverworldHeight; - return condition1 || condition2; + bool condition1 = BirthdayParty.PartyIsUp && PlayerFlags.inTown && PlayerFlags.notInExcludedTownBiome && PlayerFlags.notRaining; + bool condition2 = BirthdayParty.PartyIsUp && inTownWithWind && PlayerFlags.notInExcludedTownBiome && PlayerFlags.notRaining; + bool condition3 = BirthdayParty.PartyIsUp && PlayerFlags.inUgTown && PlayerFlags.notInExcludedTownBiome; + + return condition1 || condition2 || condition3; } } public class WindyDay : ModSceneEffect diff --git a/Common/MusicBoxBase.cs b/Common/MusicBoxBase.cs index 9676be4..0d2b5f9 100644 --- a/Common/MusicBoxBase.cs +++ b/Common/MusicBoxBase.cs @@ -10,7 +10,6 @@ using Terraria.Localization; using Terraria.ModLoader; using Terraria.ObjectData; using Terraria.Utilities; -using UnCalamityModMusic.Common.Configs; namespace UnCalamityModMusic.Common { @@ -49,10 +48,7 @@ namespace UnCalamityModMusic.Common public override void AddRecipes() { - if (ModContent.GetInstance().MusicBoxRecipes) - { - MusicBoxRecipe(); - } + MusicBoxRecipe(); } } diff --git a/Common/MusicEvents.cs b/Common/MusicEvents.cs index 770e444..84152d8 100644 --- a/Common/MusicEvents.cs +++ b/Common/MusicEvents.cs @@ -10,8 +10,8 @@ using UnCalamityModMusic.Common.Configs; namespace UnCalamityModMusic.Common { - //This system was created by Nycro for the main Calamity Mod - //An altered form of it is here so VCMM doesn't have to rely on external code + // This system was created by Nycro for the main Calamity Mod + // An altered form of it is here so VCMM doesn't have to rely on external code public record class MusicEventEntry(string Id, int Song, TimeSpan Length, TimeSpan IntroSilence, TimeSpan OutroSilence, Func ShouldPlay, Func Enabled); public class MusicEvents : ModSystem @@ -59,9 +59,14 @@ namespace UnCalamityModMusic.Common #endregion #region Event Handling - public override void PostUpdateTime() { + // If the player is in Infernum's Lost Colosseum, do nothing (would prefer if this happened for all subworlds) + if (PlayerFlags.ZoneLostColosseum) + { + return; + } + // If the Boss Rush is active, any would-be music events should be cancelled out and marked as played if (PlayerFlags.bossRushActive) { diff --git a/Common/MusicPathing.cs b/Common/MusicPathing.cs index 45ce9f4..04c0a2f 100644 --- a/Common/MusicPathing.cs +++ b/Common/MusicPathing.cs @@ -12,9 +12,6 @@ namespace UnCalamityModMusic.Common { musicPaths = new Dictionary { - //Alternates - {"AbyssLayer3Alt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/AbyssLayer3Alt")}, - //Biomes {"Space", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Space")}, {"Underworld", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Underworld")}, @@ -32,7 +29,6 @@ namespace UnCalamityModMusic.Common {"TownDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/TownDay")}, {"JungleTemple", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/JungleTemple")}, {"Dungeon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Dungeon")}, - {"GlowingMushroomGrove", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/GlowingMushroomGrove")}, {"GlowingMushroomFields", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/GlowingMushroomFields")}, {"Corruption", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Corruption")}, {"CorruptionUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/CorruptionUnderground")}, @@ -71,9 +67,10 @@ namespace UnCalamityModMusic.Common {"Twins", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Twins")}, {"Destroyer", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Destroyer")}, {"QueenSlime", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/QueenSlime")}, + {"Dreadnautilus", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Dreadnautilus")}, {"WallofFlesh", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/WallofFlesh")}, - {"Deerclops", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Deerclops")}, {"Skeletron", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Skeletron")}, + {"Deerclops", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Deerclops")}, {"QueenBee", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/QueenBee")}, {"BrainofCthulhu", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/BrainofCthulhu")}, {"EaterofWorlds", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/EaterofWorlds")}, @@ -87,12 +84,13 @@ namespace UnCalamityModMusic.Common {"CelestialPillarStardust", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/CelestialPillarStardust")}, {"CelestialPillarNebula", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/CelestialPillarNebula")}, {"CelestialPillarVortex", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/CelestialPillarVortex")}, - {"OldOnesArmy", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/OldOnesArmy")}, {"MartianMadness", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/MartianMadness")}, {"FrostMoon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/FrostMoon")}, {"PumpkinMoon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/PumpkinMoon")}, + {"OldOnesArmyTier3", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/OldOnesArmyTier3")}, + {"OldOnesArmyTier2", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/OldOnesArmyTier2")}, + {"OldOnesArmyTier1", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/OldOnesArmyTier1")}, {"PirateInvasion", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/PirateInvasion")}, - {"FrostLegion", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/FrostLegion")}, {"GoblinArmy", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/GoblinArmy")}, {"SolarEclipse", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/SolarEclipse")}, {"BloodMoon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/BloodMoon")}, @@ -103,19 +101,20 @@ namespace UnCalamityModMusic.Common {"OceanRain", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/OceanRain")}, {"Thunderstorm", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/Thunderstorm")}, {"TownRain", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/TownRain")}, - {"Rain", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/Rain")}, + {"RainNight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/RainNight")}, + {"RainDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/RainDay")}, {"TownParty", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/TownParty")}, {"WindyDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/WindyDay")}, {"LanternFestival", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/LanternFestival")}, //Misc - {"HardmodeInterlude", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/HardmodeInterlude")}, - {"FalseEpilogue", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/FalseEpilogue")}, {"DragonsLull", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/DragonsLull")}, {"RainLegacy", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/RainLegacy")}, + {"FalseEpilogue", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/FalseEpilogue")}, {"ImpendingDoom", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/ImpendingDoom")}, {"CultistRitual", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/CultistRitual")}, - {"MechEngaging", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/MechEngaging")} + {"MechEngaging", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/MechEngaging")}, + {"HardmodeInterlude", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/HardmodeInterlude")}, }; ambiencePaths = new Dictionary diff --git a/Common/PlayerFlags.cs b/Common/PlayerFlags.cs index 0a0c7c8..5332a5b 100644 --- a/Common/PlayerFlags.cs +++ b/Common/PlayerFlags.cs @@ -40,9 +40,6 @@ namespace UnCalamityModMusic.Common public static bool revengeanceMode; public static bool bossRushActive; - public static bool FoveanatorActive; - public static bool SkeletronPrime2Active; - public static bool ZoneBrimstoneCrags; public static bool ZoneProfanedTemple; public static bool ZoneAstralInfection; @@ -236,10 +233,7 @@ namespace UnCalamityModMusic.Common revengeanceMode = (bool)calamity.Call("DifficultyActive", "revengeance"); bossRushActive = (bool)calamity.Call("DifficultyActive", "bossrush"); - FoveanatorActive = calamity.Version >= new Version(2, 1, 0, 1) && NPC.AnyNPCs(calamity.Find("Foveanator").Type) && Main.npc[NPC.FindFirstNPC(calamity.Find("Foveanator").Type)].Distance(player.Center) <= MusicTileRange; - SkeletronPrime2Active = NPC.AnyNPCs(calamity.Find("SkeletronPrime2").Type) && Main.npc[NPC.FindFirstNPC(calamity.Find("SkeletronPrime2").Type)].Distance(player.Center) <= MusicTileRange; - - ZoneBrimstoneCrags = (bool)calamity.Call("GetInZone", player, "crags"); + ZoneBrimstoneCrags = (bool)calamity.Call("GetInZone", player, "crags"); ZoneAstralInfection = (bool)calamity.Call("GetInZone", player, "astral"); ZoneSulfurSea = (bool)calamity.Call("GetInZone", player, "sulfur") && @@ -292,7 +286,7 @@ namespace UnCalamityModMusic.Common ZonePyramid = player.InModBiome(remnants.Find("Pyramid")); ZoneGraniteCave = player.InModBiome(remnants.Find("GraniteCave")); ZoneMarbleCave = player.InModBiome(remnants.Find("MarbleCave")); - ZoneHive = player.InModBiome(remnants.Find("Hive")); + ZoneHive = player.InModBiome(remnants.Find("Beehive")); } } diff --git a/Common/WorkshopDetection.cs b/Common/WorkshopDetection.cs index 0f72616..dc9b1cf 100644 --- a/Common/WorkshopDetection.cs +++ b/Common/WorkshopDetection.cs @@ -30,12 +30,7 @@ namespace UnCalamityModMusic.Common tileCenters[type] = centers; } - bool found = false; - for (int index = 0; index < centers.Count; index++) - { - found = true; - break; - } + bool found = centers.Count > 0; if (!found) { diff --git a/Content/Items/AbyssLayer3AltMusicBox.cs b/Content/Items/AbyssLayer3AltMusicBox.cs deleted file mode 100644 index d56e797..0000000 --- a/Content/Items/AbyssLayer3AltMusicBox.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; -using UnCalamityModMusic.Common; - -namespace UnCalamityModMusic.Content.Items -{ - [LegacyName("AbyssLowAltMusicBox")] - public class AbyssLayer3AltMusicBox : MusicBoxItem - { - public override int MusicBoxTile => ModContent.TileType(); - - public override string MusicFilePath => "AbyssLayer3Alt"; - - public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddIngredient(calamity, "PyreMantleMolten", 10) - .AddIngredient(calamity, "DepthCells", 10) - .AddIngredient(calamity, "ChaoticOre", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - } - } -} \ No newline at end of file diff --git a/Content/Items/AbyssLayer3AltMusicBox.png b/Content/Items/AbyssLayer3AltMusicBox.png deleted file mode 100644 index 1232fa2..0000000 Binary files a/Content/Items/AbyssLayer3AltMusicBox.png and /dev/null differ diff --git a/Content/Items/AetherMusicBox.cs b/Content/Items/AetherMusicBox.cs new file mode 100644 index 0000000..91fdd31 --- /dev/null +++ b/Content/Items/AetherMusicBox.cs @@ -0,0 +1,12 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class AetherMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Aether"; + } +} diff --git a/Content/Items/AetherMusicBox.png b/Content/Items/AetherMusicBox.png new file mode 100644 index 0000000..b461806 Binary files /dev/null and b/Content/Items/AetherMusicBox.png differ diff --git a/Content/Items/BloodMoonDeathMusicBox.cs b/Content/Items/BloodMoonDeathMusicBox.cs index e27b068..d597905 100644 --- a/Content/Items/BloodMoonDeathMusicBox.cs +++ b/Content/Items/BloodMoonDeathMusicBox.cs @@ -1,6 +1,3 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -12,38 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "BloodMoonDeath"; - - public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddRecipeGroup("VCMM:EvilPowderGroup", 10) - .AddIngredient(calamity, "BloodOrb", 10) - .AddIngredient(ItemID.Deathweed, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - else - { - Recipe.Create(Type, 1) - .AddRecipeGroup("VCMM:EvilPowderGroup", 10) - .AddIngredient(ItemID.Deathweed, 3) - .AddIngredient(ItemID.BloodMoonStarter, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } } } diff --git a/Content/Items/BloodMoonMusicBox.cs b/Content/Items/BloodMoonMusicBox.cs index a2d64ec..3fd3de8 100644 --- a/Content/Items/BloodMoonMusicBox.cs +++ b/Content/Items/BloodMoonMusicBox.cs @@ -1,6 +1,3 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -12,38 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "BloodMoon"; - - public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddRecipeGroup("VCMM:EvilPowderGroup", 10) - .AddIngredient(calamity, "BloodOrb", 10) - .AddIngredient(ItemID.FallenStar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - else - { - Recipe.Create(Type, 1) - .AddRecipeGroup("VCMM:EvilPowderGroup", 10) - .AddIngredient(ItemID.FallenStar, 3) - .AddIngredient(ItemID.BloodMoonStarter, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } } } diff --git a/Content/Items/BrainofCthulhuMusicBox.cs b/Content/Items/BrainofCthulhuMusicBox.cs index 844faa6..23ef050 100644 --- a/Content/Items/BrainofCthulhuMusicBox.cs +++ b/Content/Items/BrainofCthulhuMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,14 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "BrainofCthulhu"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.BrainofCthulhuTrophy, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/CavernsMusicBox.cs b/Content/Items/CavernsMusicBox.cs index 5ba370b..d225b77 100644 --- a/Content/Items/CavernsMusicBox.cs +++ b/Content/Items/CavernsMusicBox.cs @@ -13,14 +13,13 @@ namespace UnCalamityModMusic.Content.Items public override string MusicFilePath => "Caverns"; public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.StoneBlock, 10) - .AddIngredient(ItemID.SiltBlock, 10) - .AddRecipeGroup("VCMM:GoldOreGroup", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } + { + // Contingent recipe for when in Hardmode + /*Recipe.Create(Type, 1) + .AddIngredient(ModContent.ItemType()) + .AddIngredient(ModContent.ItemType()) + .AddTile(TileID.TinkerersWorkbench) + .Register();*/ + } + } } diff --git a/Content/Items/CorruptionMusicBox.cs b/Content/Items/CorruptionMusicBox.cs index b950aad..b965efa 100644 --- a/Content/Items/CorruptionMusicBox.cs +++ b/Content/Items/CorruptionMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Corruption"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Ebonwood, 10) - .AddIngredient(ItemID.RottenChunk, 10) - .AddIngredient(ItemID.VileMushroom, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/CorruptionUndergroundMusicBox.cs b/Content/Items/CorruptionUndergroundMusicBox.cs index 0cdc287..d49d28f 100644 --- a/Content/Items/CorruptionUndergroundMusicBox.cs +++ b/Content/Items/CorruptionUndergroundMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "CorruptionUnderground"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.EbonstoneBlock, 10) - .AddIngredient(ItemID.RottenChunk, 10) - .AddIngredient(ItemID.ShadowOrb, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/CrimsonMusicBox.cs b/Content/Items/CrimsonMusicBox.cs index 2b854b9..5035004 100644 --- a/Content/Items/CrimsonMusicBox.cs +++ b/Content/Items/CrimsonMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Crimson"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Shadewood, 10) - .AddIngredient(ItemID.Vertebrae, 10) - .AddIngredient(ItemID.ViciousMushroom, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/CrimsonUndergroundMusicBox.cs b/Content/Items/CrimsonUndergroundMusicBox.cs index 9f0753c..d636940 100644 --- a/Content/Items/CrimsonUndergroundMusicBox.cs +++ b/Content/Items/CrimsonUndergroundMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "CrimsonUnderground"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.CrimstoneBlock, 10) - .AddIngredient(ItemID.Vertebrae, 10) - .AddIngredient(ItemID.CrimsonHeart, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/DesertMusicBox.cs b/Content/Items/DesertMusicBox.cs index c929a6c..8fcbd08 100644 --- a/Content/Items/DesertMusicBox.cs +++ b/Content/Items/DesertMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Desert"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Cactus, 10) - .AddIngredient(ItemID.SandBlock, 10) - .AddIngredient(ItemID.Waterleaf, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/DukeFishronMusicBox.cs b/Content/Items/DukeFishronMusicBox.cs new file mode 100644 index 0000000..7a7a0a2 --- /dev/null +++ b/Content/Items/DukeFishronMusicBox.cs @@ -0,0 +1,12 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class DukeFishronMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "DukeFishron"; + } +} diff --git a/Content/Items/DukeFishronMusicBox.png b/Content/Items/DukeFishronMusicBox.png new file mode 100644 index 0000000..494d347 Binary files /dev/null and b/Content/Items/DukeFishronMusicBox.png differ diff --git a/Content/Items/DungeonMusicBox.cs b/Content/Items/DungeonMusicBox.cs index aa611e4..347c5a4 100644 --- a/Content/Items/DungeonMusicBox.cs +++ b/Content/Items/DungeonMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,32 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Dungeon"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.BlueBrick, 10) - .AddIngredient(ItemID.Bone, 10) - .AddIngredient(ItemID.GoldenKey, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - - Recipe.Create(Type, 1) - .AddIngredient(ItemID.GreenBrick, 10) - .AddIngredient(ItemID.Bone, 10) - .AddIngredient(ItemID.GoldenKey, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - - Recipe.Create(Type, 1) - .AddIngredient(ItemID.PinkBrick, 10) - .AddIngredient(ItemID.Bone, 10) - .AddIngredient(ItemID.GoldenKey, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/EaterofWorldsMusicBox.cs b/Content/Items/EaterofWorldsMusicBox.cs index bb78de3..c922881 100644 --- a/Content/Items/EaterofWorldsMusicBox.cs +++ b/Content/Items/EaterofWorldsMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,14 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "EaterofWorlds"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.EaterofWorldsTrophy, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/External/MusicBox.cs b/Content/Items/External/MusicBox.cs index 7e728cb..58a1820 100644 --- a/Content/Items/External/MusicBox.cs +++ b/Content/Items/External/MusicBox.cs @@ -1,36 +1,67 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ID; +using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common.Configs; namespace UnCalamityModMusic.Content.Items.External { - public class MusicBox : GlobalItem - { - public override void SetDefaults(Item item) - { - //Make all music boxes stack to 9999 instead of 1 - if (item.Name.Contains("Music Box")) - { - item.maxStack = 9999; - } + public class MusicBox : GlobalItem + { + public override void SetDefaults(Item item) + { + // Make the empty music box placeable when its resprite is enabled + if (item.type == ItemID.MusicBox) + { + if (ModContent.GetInstance().MusicBoxResprite) + { + item.useStyle = ItemUseStyleID.Swing; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = ModContent.TileType(); + } + } + } + } + public class MusicBoxRecipe : ModSystem + { + public static RecipeGroup CopperBarGroup; - if (item.type == ItemID.MusicBox) - { - if (ModContent.GetInstance().MusicBoxResprite) - { - item.useStyle = ItemUseStyleID.Swing; - item.useTurn = true; - item.useAnimation = 15; - item.useTime = 10; - item.autoReuse = true; - item.consumable = true; - item.createTile = ModContent.TileType(); - } - //item.value = Item.buyPrice(1, 0, 0, 0); - } - } - } + public override void Unload() + { + CopperBarGroup = null; + } + + public override void AddRecipeGroups() + { + CopperBarGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperBar)}", + ItemID.CopperBar, ItemID.TinBar + ); + RecipeGroup.RegisterGroup("VCMM:CopperBarGroup", CopperBarGroup); + } + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + // When Calamity 2.1+ is not enabled (this recipe gets deprecated) + if (calamityMod && calamity.Version < new Version(2, 1)) + { + Recipe.Create(ItemID.MusicBox, 1) + .AddRecipeGroup(RecipeGroupID.Wood, 6) + .AddRecipeGroup("VCMM:CopperBarGroup", 5) + .AddRecipeGroup(RecipeGroupID.IronBar, 2) + .AddIngredient(ItemID.LifeCrystal, 1) + .AddTile(TileID.Anvils) + .Register(); + } + } + } } + diff --git a/Content/Items/EyeofCthulhuMusicBox.cs b/Content/Items/EyeofCthulhuMusicBox.cs index ceeab3d..62ef346 100644 --- a/Content/Items/EyeofCthulhuMusicBox.cs +++ b/Content/Items/EyeofCthulhuMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,14 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "EyeofCthulhu"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.EyeofCthulhuTrophy, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/ForestDayAfternoonMusicBox.cs b/Content/Items/ForestDayAfternoonMusicBox.cs index 6fd944e..300c98e 100644 --- a/Content/Items/ForestDayAfternoonMusicBox.cs +++ b/Content/Items/ForestDayAfternoonMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "ForestDayAfternoon"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Wood, 10) - .AddIngredient(ItemID.DirtBlock, 10) - .AddIngredient(ItemID.Sunflower, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/ForestDayAfternoonMusicBox.png b/Content/Items/ForestDayAfternoonMusicBox.png index 2f7b49f..4ffa91b 100644 Binary files a/Content/Items/ForestDayAfternoonMusicBox.png and b/Content/Items/ForestDayAfternoonMusicBox.png differ diff --git a/Content/Items/ForestDayDawnMusicBox.cs b/Content/Items/ForestDayDawnMusicBox.cs index 0fbd502..0388c10 100644 --- a/Content/Items/ForestDayDawnMusicBox.cs +++ b/Content/Items/ForestDayDawnMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "ForestDayDawn"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Wood, 10) - .AddIngredient(ItemID.DirtBlock, 10) - .AddIngredient(ItemID.Daybloom, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/ForestDayDawnMusicBox.png b/Content/Items/ForestDayDawnMusicBox.png index 2efb03c..11575c6 100644 Binary files a/Content/Items/ForestDayDawnMusicBox.png and b/Content/Items/ForestDayDawnMusicBox.png differ diff --git a/Content/Items/ForestDayEveningMusicBox.cs b/Content/Items/ForestDayEveningMusicBox.cs index 397ab96..242b944 100644 --- a/Content/Items/ForestDayEveningMusicBox.cs +++ b/Content/Items/ForestDayEveningMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "ForestDayEvening"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Wood, 10) - .AddIngredient(ItemID.DirtBlock, 10) - .AddIngredient(ItemID.Mushroom, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/ForestDayEveningMusicBox.png b/Content/Items/ForestDayEveningMusicBox.png index 40e3fe5..eea2298 100644 Binary files a/Content/Items/ForestDayEveningMusicBox.png and b/Content/Items/ForestDayEveningMusicBox.png differ diff --git a/Content/Items/ForestDayMorningMusicBox.cs b/Content/Items/ForestDayMorningMusicBox.cs index 1c7eae4..93a693a 100644 --- a/Content/Items/ForestDayMorningMusicBox.cs +++ b/Content/Items/ForestDayMorningMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "ForestDayMorning"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Wood, 10) - .AddIngredient(ItemID.DirtBlock, 10) - .AddIngredient(ItemID.YellowMarigold, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/ForestDayMorningMusicBox.png b/Content/Items/ForestDayMorningMusicBox.png index 67f4656..96e5c0a 100644 Binary files a/Content/Items/ForestDayMorningMusicBox.png and b/Content/Items/ForestDayMorningMusicBox.png differ diff --git a/Content/Items/ForestNightMusicBox.cs b/Content/Items/ForestNightMusicBox.cs index 310d00b..79b8358 100644 --- a/Content/Items/ForestNightMusicBox.cs +++ b/Content/Items/ForestNightMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "ForestNight"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Wood, 10) - .AddIngredient(ItemID.DirtBlock, 10) - .AddIngredient(ItemID.FallenStar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/ForestNightMusicBox.png b/Content/Items/ForestNightMusicBox.png index 357af79..f41aab7 100644 Binary files a/Content/Items/ForestNightMusicBox.png and b/Content/Items/ForestNightMusicBox.png differ diff --git a/Content/Items/GeodesMusicBox.cs b/Content/Items/GeodesMusicBox.cs index a1583a3..533278a 100644 --- a/Content/Items/GeodesMusicBox.cs +++ b/Content/Items/GeodesMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Geodes"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Granite, 10) - .AddIngredient(ItemID.Marble, 10) - .AddRecipeGroup("VCMM:GoldBarGroup", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/GlowingMushroomFieldsMusicBox.cs b/Content/Items/GlowingMushroomFieldsMusicBox.cs index d90712b..81ab952 100644 --- a/Content/Items/GlowingMushroomFieldsMusicBox.cs +++ b/Content/Items/GlowingMushroomFieldsMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "GlowingMushroomFields"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.GlowingMushroom, 10) - .AddIngredient(ItemID.MudBlock, 10) - .AddIngredient(ItemID.MushroomGrassSeeds, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/JungleDayMusicBox.cs b/Content/Items/JungleDayMusicBox.cs index ed59861..4b5be4a 100644 --- a/Content/Items/JungleDayMusicBox.cs +++ b/Content/Items/JungleDayMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "JungleDay"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.RichMahogany, 10) - .AddIngredient(ItemID.MudBlock, 10) - .AddIngredient(ItemID.Moonglow, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/KingSlimeMusicBox.cs b/Content/Items/KingSlimeMusicBox.cs index cabf2f1..c84814e 100644 --- a/Content/Items/KingSlimeMusicBox.cs +++ b/Content/Items/KingSlimeMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,14 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "KingSlime"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.KingSlimeTrophy, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/LanternFestivalMusicBox.cs b/Content/Items/LanternFestivalMusicBox.cs index 2770ec6..1126693 100644 --- a/Content/Items/LanternFestivalMusicBox.cs +++ b/Content/Items/LanternFestivalMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "LanternFestival"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddRecipeGroup(RecipeGroupID.Wood, 10) - .AddIngredient(ItemID.ReleaseLantern, 10) - .AddIngredient(ItemID.FallenStar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/MeteoriteMusicBox.cs b/Content/Items/MeteoriteMusicBox.cs index c778353..e5eeaa2 100644 --- a/Content/Items/MeteoriteMusicBox.cs +++ b/Content/Items/MeteoriteMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,15 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Meteorite"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Meteorite, 10) - .AddIngredient(ItemID.FallenStar, 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/MoonLordMusicBox.cs b/Content/Items/MoonLordMusicBox.cs index 1c1b1f5..43ac187 100644 --- a/Content/Items/MoonLordMusicBox.cs +++ b/Content/Items/MoonLordMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,14 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "MoonLord"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.MoonLordTrophy, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/OceanDayMusicBox.cs b/Content/Items/OceanDayMusicBox.cs index ae90226..e08b31b 100644 --- a/Content/Items/OceanDayMusicBox.cs +++ b/Content/Items/OceanDayMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "OceanDay"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.PalmWood, 10) - .AddIngredient(ItemID.SandBlock, 10) - .AddIngredient(ItemID.Seashell, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/OceanNightMusicBox.cs b/Content/Items/OceanNightMusicBox.cs index 73f0168..c92f8ae 100644 --- a/Content/Items/OceanNightMusicBox.cs +++ b/Content/Items/OceanNightMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "OceanNight"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.PalmWood, 10) - .AddIngredient(ItemID.SandBlock, 10) - .AddIngredient(ItemID.Starfish, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/OceanRainMusicBox.cs b/Content/Items/OceanRainMusicBox.cs index f6fcd57..fbf912c 100644 --- a/Content/Items/OceanRainMusicBox.cs +++ b/Content/Items/OceanRainMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "OceanRain"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.PalmWood, 10) - .AddIngredient(ItemID.RainCloud, 10) - .AddIngredient(ItemID.Coral, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/PumpkinMoonMusicBox.cs b/Content/Items/PumpkinMoonMusicBox.cs new file mode 100644 index 0000000..60fd15a --- /dev/null +++ b/Content/Items/PumpkinMoonMusicBox.cs @@ -0,0 +1,12 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class PumpkinMoonMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "PumpkinMoon"; + } +} diff --git a/Content/Items/PumpkinMoonMusicBox.png b/Content/Items/PumpkinMoonMusicBox.png new file mode 100644 index 0000000..754dde9 Binary files /dev/null and b/Content/Items/PumpkinMoonMusicBox.png differ diff --git a/Content/Items/RainDayMusicBox.cs b/Content/Items/RainDayMusicBox.cs new file mode 100644 index 0000000..e33d9df --- /dev/null +++ b/Content/Items/RainDayMusicBox.cs @@ -0,0 +1,13 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("RainMusicBox")] + public class RainDayMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "RainDay"; + } +} diff --git a/Content/Items/RainDayMusicBox.png b/Content/Items/RainDayMusicBox.png new file mode 100644 index 0000000..d6b4569 Binary files /dev/null and b/Content/Items/RainDayMusicBox.png differ diff --git a/Content/Items/RainLegacyMusicBox.cs b/Content/Items/RainLegacyMusicBox.cs index 869dbbc..312ecc5 100644 --- a/Content/Items/RainLegacyMusicBox.cs +++ b/Content/Items/RainLegacyMusicBox.cs @@ -1,7 +1,6 @@ using System; using Terraria; using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -16,10 +15,16 @@ namespace UnCalamityModMusic.Content.Items public override void AddRecipes() { + // Does not play in-game Recipe.Create(Type, 1) - .AddIngredient(ModContent.ItemType(), 1) - .AddIngredient(ModContent.ItemType(), 1) - .AddTile(Recipes.musicBoxCraftingStationVanilla) + .AddIngredient(ModContent.ItemType()) + .AddIngredient(ModContent.ItemType()) + .AddTile(TileID.TinkerersWorkbench) + .Register(); + Recipe.Create(Type, 1) + .AddIngredient(ModContent.ItemType()) + .AddIngredient(ModContent.ItemType()) + .AddTile(TileID.TinkerersWorkbench) .Register(); } } diff --git a/Content/Items/RainMusicBox.cs b/Content/Items/RainMusicBox.cs deleted file mode 100644 index 973ad5c..0000000 --- a/Content/Items/RainMusicBox.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; -using UnCalamityModMusic.Common; - -namespace UnCalamityModMusic.Content.Items -{ - public class RainMusicBox : MusicBoxItem - { - public override int MusicBoxTile => ModContent.TileType(); - - public override string MusicFilePath => "Rain"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Glowstick, 10) - .AddIngredient(ItemID.RainCloud, 10) - .AddIngredient(ItemID.WaterBucket, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } -} diff --git a/Content/Items/RainMusicBox.png b/Content/Items/RainMusicBox.png deleted file mode 100644 index a72c6cb..0000000 Binary files a/Content/Items/RainMusicBox.png and /dev/null differ diff --git a/Content/Items/RainNightMusicBox.cs b/Content/Items/RainNightMusicBox.cs new file mode 100644 index 0000000..7d0789b --- /dev/null +++ b/Content/Items/RainNightMusicBox.cs @@ -0,0 +1,12 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class RainNightMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "RainNight"; + } +} \ No newline at end of file diff --git a/Content/Items/RainNightMusicBox.png b/Content/Items/RainNightMusicBox.png new file mode 100644 index 0000000..0fa4a69 Binary files /dev/null and b/Content/Items/RainNightMusicBox.png differ diff --git a/Content/Items/SandstormMusicBox.cs b/Content/Items/SandstormMusicBox.cs index 90f6146..31ecfc6 100644 --- a/Content/Items/SandstormMusicBox.cs +++ b/Content/Items/SandstormMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Sandstorm"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.AncientCloth, 10) - .AddIngredient(ItemID.SandBlock, 10) - .AddIngredient(ItemID.AncientBattleArmorMaterial, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/SkeletronMusicBox.cs b/Content/Items/SkeletronMusicBox.cs index ca2b9dd..76880f0 100644 --- a/Content/Items/SkeletronMusicBox.cs +++ b/Content/Items/SkeletronMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,14 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Skeletron"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.SkeletronTrophy, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/SlimeRainMusicBox.cs b/Content/Items/SlimeRainMusicBox.cs index 9123f6d..90269fd 100644 --- a/Content/Items/SlimeRainMusicBox.cs +++ b/Content/Items/SlimeRainMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,24 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "SlimeRain"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Gel, 10) - .AddIngredient(ItemID.PinkGel, 10) - .AddIngredient(ItemID.GoldCrown, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Gel, 10) - .AddIngredient(ItemID.PinkGel, 10) - .AddIngredient(ItemID.PlatinumCrown, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/SpaceMusicBox.cs b/Content/Items/SpaceMusicBox.cs index d5d92b6..2f08252 100644 --- a/Content/Items/SpaceMusicBox.cs +++ b/Content/Items/SpaceMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Space"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Cloud, 10) - .AddIngredient(ItemID.RainCloud, 10) - .AddIngredient(ItemID.SunplateBlock, 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/TorchGodMusicBox.cs b/Content/Items/TorchGodMusicBox.cs index ff9c5bf..30c21ce 100644 --- a/Content/Items/TorchGodMusicBox.cs +++ b/Content/Items/TorchGodMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "TorchGod"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.StoneBlock, 10) - .AddIngredient(ItemID.Torch, 10) - .AddIngredient(ItemID.UltrabrightTorch, 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/TorchGodRevengeanceMusicBox.cs b/Content/Items/TorchGodRevengeanceMusicBox.cs index d8130e7..1fd15e7 100644 --- a/Content/Items/TorchGodRevengeanceMusicBox.cs +++ b/Content/Items/TorchGodRevengeanceMusicBox.cs @@ -1,6 +1,3 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,28 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "TorchGodRevengeance"; - - public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.StoneBlock, 10) - .AddIngredient(calamity, "GloomTorch", 10) - .AddIngredient(calamity, "RefractivePrismTorch", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - } } } diff --git a/Content/Items/TownDayMusicBox.cs b/Content/Items/TownDayMusicBox.cs index 1b3e8af..b17f51d 100644 --- a/Content/Items/TownDayMusicBox.cs +++ b/Content/Items/TownDayMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "TownDay"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddRecipeGroup(RecipeGroupID.Wood, 10) - .AddIngredient(ItemID.SilverCoin, 10) - .AddIngredient(ItemID.Sunflower, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/TownNightMusicBox.cs b/Content/Items/TownNightMusicBox.cs index d83ddb9..2394484 100644 --- a/Content/Items/TownNightMusicBox.cs +++ b/Content/Items/TownNightMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "TownNight"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddRecipeGroup(RecipeGroupID.Wood, 10) - .AddIngredient(ItemID.SilverCoin, 10) - .AddIngredient(ItemID.FallenStar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/TownPartyMusicBox.cs b/Content/Items/TownPartyMusicBox.cs index df65c82..408e67f 100644 --- a/Content/Items/TownPartyMusicBox.cs +++ b/Content/Items/TownPartyMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,17 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "TownParty"; - - public override void MusicBoxRecipe() - { - //Canonically, a party requires at least 10 balloons - Recipe.Create(Type, 1) - .AddRecipeGroup("VCMM:SillyTiedBalloonGroup", 10) - .AddIngredient(ItemID.SilverCoin, 10) - .AddIngredient(ItemID.Sunflower, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/TownRainMusicBox.cs b/Content/Items/TownRainMusicBox.cs index 92acb2f..e8afafc 100644 --- a/Content/Items/TownRainMusicBox.cs +++ b/Content/Items/TownRainMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "TownRain"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.Glowstick, 10) - .AddIngredient(ItemID.SilverCoin, 10) - .AddIngredient(ItemID.WaterBucket, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/TundraMusicBox.cs b/Content/Items/TundraMusicBox.cs index 06700cc..656b8ef 100644 --- a/Content/Items/TundraMusicBox.cs +++ b/Content/Items/TundraMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Tundra"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.BorealWood, 10) - .AddIngredient(ItemID.SnowBlock, 10) - .AddIngredient(ItemID.Shiverthorn, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/TundraUndergroundMusicBox.cs b/Content/Items/TundraUndergroundMusicBox.cs index b284984..b301dcc 100644 --- a/Content/Items/TundraUndergroundMusicBox.cs +++ b/Content/Items/TundraUndergroundMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "TundraUnderground"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.IceBlock, 10) - .AddIngredient(ItemID.SlushBlock, 10) - .AddIngredient(ItemID.FlinxFur, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/UndergroundMusicBox.cs b/Content/Items/UndergroundMusicBox.cs index 0452ec9..8653da0 100644 --- a/Content/Items/UndergroundMusicBox.cs +++ b/Content/Items/UndergroundMusicBox.cs @@ -14,13 +14,12 @@ namespace UnCalamityModMusic.Content.Items public override void MusicBoxRecipe() { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.StoneBlock, 10) - .AddIngredient(ItemID.DirtBlock, 10) - .AddRecipeGroup("VCMM:CopperOreGroup", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); + // Contingent recipe for when in Hardmode + /*Recipe.Create(Type, 1) + .AddIngredient(ModContent.ItemType()) + .AddIngredient(ModContent.ItemType()) + .AddTile(TileID.TinkerersWorkbench) + .Register();*/ } } } diff --git a/Content/Items/UnderworldMusicBox.cs b/Content/Items/UnderworldMusicBox.cs index b7fb451..4253da3 100644 --- a/Content/Items/UnderworldMusicBox.cs +++ b/Content/Items/UnderworldMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,16 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "Underworld"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.AshWood, 10) - .AddIngredient(ItemID.ObsidianBrick, 10) - .AddIngredient(ItemID.Fireblossom, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/WallofFleshMusicBox.cs b/Content/Items/WallofFleshMusicBox.cs index 6bf5226..5027412 100644 --- a/Content/Items/WallofFleshMusicBox.cs +++ b/Content/Items/WallofFleshMusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -10,14 +8,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "WallofFlesh"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.WallofFleshTrophy, 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/WorkshopTier1MusicBox.cs b/Content/Items/WorkshopTier1MusicBox.cs index 06ef13b..93db3ed 100644 --- a/Content/Items/WorkshopTier1MusicBox.cs +++ b/Content/Items/WorkshopTier1MusicBox.cs @@ -1,5 +1,3 @@ -using Terraria; -using Terraria.ID; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -11,16 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "WorkshopTier1"; - - public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddRecipeGroup(RecipeGroupID.Wood, 10) - .AddIngredient(ItemID.Torch, 10) - .AddRecipeGroup(RecipeGroupID.IronBar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } } } diff --git a/Content/Items/WorkshopTier2MusicBox.cs b/Content/Items/WorkshopTier2MusicBox.cs index ea0eeeb..8335a99 100644 --- a/Content/Items/WorkshopTier2MusicBox.cs +++ b/Content/Items/WorkshopTier2MusicBox.cs @@ -1,6 +1,3 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -12,36 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "WorkshopTier2"; - - public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddIngredient(calamity, "AerialiteBar", 3) - .AddIngredient(ItemID.HellstoneBar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - else - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.SunplateBlock, 10) - .AddIngredient(ItemID.HellstoneBar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } } } diff --git a/Content/Items/WorkshopTier3MusicBox.cs b/Content/Items/WorkshopTier3MusicBox.cs index 6828503..d7a251d 100644 --- a/Content/Items/WorkshopTier3MusicBox.cs +++ b/Content/Items/WorkshopTier3MusicBox.cs @@ -13,13 +13,14 @@ namespace UnCalamityModMusic.Content.Items public override string MusicFilePath => "WorkshopTier3"; public override void MusicBoxRecipe() - { - Recipe.Create(Type, 1) - .AddRecipeGroup("VCMM:MythrilBarGroup", 3) - .AddRecipeGroup("VCMM:AdamantiteBarGroup", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } + { + // Contingent recipe for when Plantera is down + Recipe.Create(Type, 1) + .AddIngredient(ModContent.ItemType()) + .AddIngredient(ItemID.MusicBoxPlantera) + //.AddIngredient(ModContent.ItemType()) + .AddTile(TileID.TinkerersWorkbench) + .Register(); + } + } } diff --git a/Content/Items/WorkshopTier4MusicBox.cs b/Content/Items/WorkshopTier4MusicBox.cs index 8a9a919..821ad5d 100644 --- a/Content/Items/WorkshopTier4MusicBox.cs +++ b/Content/Items/WorkshopTier4MusicBox.cs @@ -1,6 +1,5 @@ using Terraria; using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -14,34 +13,13 @@ namespace UnCalamityModMusic.Content.Items public override string MusicFilePath => "WorkshopTier4"; public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddIngredient(calamity, "LivingShard", 3) - .AddIngredient(calamity, "DraedonBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - else - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.TempleKey, 1) - .AddIngredient(ItemID.ChlorophyteBar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } + { + // Contingent recipe for when Moon Lord is down + Recipe.Create(Type, 1) + .AddIngredient(ModContent.ItemType()) + .AddIngredient(ModContent.ItemType()) + .AddTile(TileID.TinkerersWorkbench) + .Register(); + } } } diff --git a/Content/Items/WorkshopTier5MusicBox.cs b/Content/Items/WorkshopTier5MusicBox.cs index 6979d64..5730933 100644 --- a/Content/Items/WorkshopTier5MusicBox.cs +++ b/Content/Items/WorkshopTier5MusicBox.cs @@ -1,6 +1,3 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -12,40 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "WorkshopTier5"; - - public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddIngredient(calamity, "BarofLife", 3) - .AddIngredient(calamity, "GalacticaSingularity", 3) - .AddIngredient(ItemID.LunarBar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - else - { - Recipe.Create(Type, 1) - .AddIngredient(ItemID.FragmentSolar, 3) - .AddIngredient(ItemID.FragmentVortex, 3) - .AddIngredient(ItemID.FragmentStardust, 3) - .AddIngredient(ItemID.FragmentNebula, 3) - .AddIngredient(ItemID.LunarBar, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - } - } + } } diff --git a/Content/Items/WorkshopTier6MusicBox.cs b/Content/Items/WorkshopTier6MusicBox.cs index 6aa55f7..37860df 100644 --- a/Content/Items/WorkshopTier6MusicBox.cs +++ b/Content/Items/WorkshopTier6MusicBox.cs @@ -1,6 +1,3 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; using UnCalamityModMusic.Common; @@ -12,28 +9,5 @@ namespace UnCalamityModMusic.Content.Items public override int MusicBoxTile => ModContent.TileType(); public override string MusicFilePath => "WorkshopTier6"; - - public override void MusicBoxRecipe() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - - if (calamityMod) - { - try - { - Recipe.Create(Type, 1) - .AddIngredient(calamity, "ExoPrism", 3) - .AddIngredient(calamity, "AscendantSpiritEssence", 3) - .AddIngredient(calamity, "AuricBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(Recipes.musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - } } } diff --git a/Content/Menus/MemoryMenuBackground.png b/Content/Menus/MemoryMenuBackground.png index 67a4cf5..824fc29 100644 Binary files a/Content/Menus/MemoryMenuBackground.png and b/Content/Menus/MemoryMenuBackground.png differ diff --git a/Content/Menus/MemoryMenuLogo.png b/Content/Menus/MemoryMenuLogo.png index 1000ec1..daad217 100644 Binary files a/Content/Menus/MemoryMenuLogo.png and b/Content/Menus/MemoryMenuLogo.png differ diff --git a/Content/Menus/Menus.cs b/Content/Menus/Menus.cs index 5aa2170..52feb04 100644 --- a/Content/Menus/Menus.cs +++ b/Content/Menus/Menus.cs @@ -10,7 +10,7 @@ using UnCalamityModMusic.Common; namespace UnCalamityModMusic.Content.Menus { - public class ResurrectionMenu : ModMenu + public class Menu1_Resurrection : ModMenu { public override int Music => MusicPathing.GetMusicSlot("HardmodeInterlude"); @@ -160,7 +160,7 @@ namespace UnCalamityModMusic.Content.Menus } } - public class MemoryMenu : ModMenu + public class Menu2_Memory : ModMenu { public override int Music => MusicPathing.GetMusicSlot("FalseEpilogue"); @@ -228,12 +228,12 @@ namespace UnCalamityModMusic.Content.Menus static Color selectCinderColor() { - if (Main.rand.NextBool(3)) + if (Main.rand.NextBool(2)) { - return Color.Lerp(Color.DarkGray, Color.LightGray, Main.rand.NextFloat()); + return Color.Lerp(Color.LightGray, Color.LightCyan, Main.rand.NextFloat()); } - return Color.Lerp(Color.Red, Color.Yellow, Main.rand.NextFloat(0.9f)); + return Color.Lerp(Color.Cyan, Color.Gold, Main.rand.NextFloat(1.1f)); } for (int i = 0; i < 5; i++) @@ -310,7 +310,7 @@ namespace UnCalamityModMusic.Content.Menus } } - internal class BlankBackground : ModSurfaceBackgroundStyle + internal class BlankBackground : ModSurfaceBackgroundStyle { public override void ModifyFarFades(float[] fades, float transitionSpeed) { diff --git a/Content/Recipes.cs b/Content/Recipes.cs deleted file mode 100644 index aebc77b..0000000 --- a/Content/Recipes.cs +++ /dev/null @@ -1,1206 +0,0 @@ -using Terraria; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; -using UnCalamityModMusic.Common.Configs; - -namespace UnCalamityModMusic.Content -{ - public class Recipes : ModSystem - { - public static int musicBoxCraftingStation = TileID.HeavyWorkBench; - public static int musicBoxCraftingStationVanilla = TileID.TinkerersWorkbench; - - public static RecipeGroup CopperOreGroup; - public static RecipeGroup GoldOreGroup; - public static RecipeGroup CobaltOreGroup; - public static RecipeGroup CopperBarGroup; - public static RecipeGroup GoldBarGroup; - public static RecipeGroup MythrilBarGroup; - public static RecipeGroup AdamantiteBarGroup; - public static RecipeGroup EvilPowderGroup; - public static RecipeGroup TombstoneGroup; - public static RecipeGroup SillyTiedBalloonGroup; - - public override void Unload() - { - CopperOreGroup = null; - GoldOreGroup = null; - CobaltOreGroup = null; - CopperBarGroup = null; - GoldBarGroup = null; - MythrilBarGroup = null; - AdamantiteBarGroup = null; - EvilPowderGroup = null; - TombstoneGroup = null; - SillyTiedBalloonGroup = null; - } - - public override void AddRecipeGroups() - { - CopperOreGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperOre)}", - ItemID.CopperOre, ItemID.TinOre - ); - RecipeGroup.RegisterGroup("VCMM:CopperOreGroup", CopperOreGroup); - - GoldOreGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.GoldOre)}", - ItemID.GoldOre, ItemID.PlatinumOre - ); - RecipeGroup.RegisterGroup("VCMM:GoldOreGroup", GoldOreGroup); - - CobaltOreGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CobaltOre)}", - ItemID.CobaltOre, ItemID.PalladiumOre - ); - RecipeGroup.RegisterGroup("VCMM:CobaltOreGroup", CobaltOreGroup); - - CopperBarGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperBar)}", - ItemID.CopperBar, ItemID.TinBar - ); - RecipeGroup.RegisterGroup("VCMM:CopperBarGroup", CopperBarGroup); - - GoldBarGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.GoldBar)}", - ItemID.GoldBar, ItemID.PlatinumBar - ); - RecipeGroup.RegisterGroup("VCMM:GoldBarGroup", GoldBarGroup); - - MythrilBarGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.MythrilBar)}", - ItemID.MythrilBar, ItemID.OrichalcumBar - ); - RecipeGroup.RegisterGroup("VCMM:MythrilBarGroup", MythrilBarGroup); - - AdamantiteBarGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.AdamantiteBar)}", - ItemID.AdamantiteBar, ItemID.TitaniumBar - ); - RecipeGroup.RegisterGroup("VCMM:AdamantiteBarGroup", AdamantiteBarGroup); - - EvilPowderGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.EvilPowder")}", - ItemID.VilePowder, ItemID.ViciousPowder - ); - RecipeGroup.RegisterGroup("VCMM:EvilPowderGroup", EvilPowderGroup); - - TombstoneGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Tombstone)}", - ItemID.Tombstone, ItemID.GraveMarker, ItemID.CrossGraveMarker, ItemID.Headstone, ItemID.Gravestone, ItemID.Obelisk, ItemID.RichGravestone1, ItemID.RichGravestone2, ItemID.RichGravestone3, ItemID.RichGravestone4, ItemID.RichGravestone5 - ); - RecipeGroup.RegisterGroup("VCMM:TombstoneGroup", TombstoneGroup); - - SillyTiedBalloonGroup = new RecipeGroup - ( - () => $"{Language.GetTextValue("LegacyMisc.37")} {Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.SillyTiedBalloon")}", - ItemID.SillyBalloonTiedPink, ItemID.SillyBalloonTiedPurple, ItemID.SillyBalloonTiedGreen - ); - RecipeGroup.RegisterGroup("VCMM:SillyTiedBalloonGroup", SillyTiedBalloonGroup); - } - - public override void AddRecipes() - { - var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); - var calamityModMusic = ModLoader.TryGetMod("CalamityModMusic", out Mod cmusic); - var calamityVanities = ModLoader.TryGetMod("CalValEX", out Mod calval); - var catalystMod = ModLoader.TryGetMod("CatalystMod", out Mod catalyst); - - if (!ModContent.GetInstance().MusicBoxRecipes) - { - return; - } - - //Empty Music Box - Recipe.Create(ItemID.MusicBox, 1) - .AddRecipeGroup(RecipeGroupID.Wood, 6) - .AddRecipeGroup("VCMM:CopperBarGroup", 5) - .AddRecipeGroup(RecipeGroupID.IronBar, 2) - .AddIngredient(ItemID.LifeCrystal, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - - #region Calamity Music Boxes - if (calamityMod) - { - //Exo Mech Selection - try - { - Recipe.Create(calamity.Find("DraedonExoSelectMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "EndothermicEnergy", 10) - .AddIngredient(calamity, "AuricBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Codebreaker - try - { - Recipe.Create(calamity.Find("DraedonTalkMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "ExoPrismPanel", 10) - .AddIngredient(calamity, "AuricBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - - if (calamityModMusic) - { - //Existing Recipes Removal - Recipe[] mainRecipe = Main.recipe; - foreach (Recipe recipeFinder in mainRecipe) - { - if (recipeFinder.HasResult(cmusic.Find("AcidRainTier1MusicBox"))) - { - recipeFinder.DisableRecipe(); - } - if (recipeFinder.HasResult(cmusic.Find("CalamitasDefeatMusicBox"))) - { - recipeFinder.DisableRecipe(); - } - } - } - - if (calamityModMusic && calamityMod) - { - //Abyss Layer 1 - try - { - Recipe.Create(cmusic.Find("AbyssLayer1MusicBox").Type, 1) - .AddIngredient(calamity, "SulphurousShale", 10) - .AddIngredient(calamity, "HardenedSulphurousSandstone", 10) - .AddIngredient(calamity, "AbyssTreasureChest", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Abyss Layer 2 - try - { - Recipe.Create(cmusic.Find("AbyssLayer2MusicBox").Type, 1) - .AddIngredient(calamity, "AbyssGravel", 10) - .AddIngredient(calamity, "PlantyMush", 10) - .AddIngredient(calamity, "StrangeOrb", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Abyss Layer 3 - try - { - Recipe.Create(cmusic.Find("AbyssLayer3MusicBox").Type, 1) - .AddIngredient(calamity, "PyreMantle", 10) - .AddIngredient(calamity, "DepthCells", 10) - .AddIngredient(calamity, "ChaoticOre", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Abyss Layer 4 - try - { - Recipe.Create(cmusic.Find("AbyssLayer4MusicBox").Type, 1) - .AddIngredient(calamity, "Voidstone", 10) - .AddIngredient(calamity, "Lumenite", 10) - .AddIngredient(calamity, "ReaperTooth", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Acid Rain Tier 1 - try - { - Recipe.Create(cmusic.Find("AcidRainTier1MusicBox").Type, 1) - .AddIngredient(calamity, "Acidwood", 10) - .AddIngredient(calamity, "SulfuricScale", 10) - .AddIngredient(calamity, "SulphurousSandstone", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Acid Rain Tier 3 - try - { - Recipe.Create(cmusic.Find("AcidRainTier3MusicBox").Type, 1) - .AddIngredient(calamity, "Acidwood", 10) - .AddIngredient(calamity, "CorrodedFossil", 10) - .AddIngredient(calamity, "MaulerTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("AcidRainTier3MusicBox").Type, 1) - .AddIngredient(calamity, "Acidwood", 10) - .AddIngredient(calamity, "CorrodedFossil", 10) - .AddIngredient(calamity, "NuclearTerrorTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Anahita - try - { - Recipe.Create(cmusic.Find("AnahitaMusicBox").Type, 1) - .AddIngredient(calamity, "AnahitaTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Anahita's Lure - try - { - Recipe.Create(cmusic.Find("AnahitasLureMusicBox").Type, 1) - .AddIngredient(calamity, "AnahitaTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Aquatic Scourge - try - { - Recipe.Create(cmusic.Find("AquaticScourgeMusicBox").Type, 1) - .AddIngredient(calamity, "AquaticScourgeTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Astral Infection - try - { - Recipe.Create(cmusic.Find("AstralInfectionMusicBox").Type, 1) - .AddIngredient(calamity, "AstralMonolith", 10) - .AddIngredient(calamity, "Stardust", 10) - .AddIngredient(ItemID.FallenStar, 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Underground Astral Infection - try - { - Recipe.Create(cmusic.Find("AstralInfectionUndergroundMusicBox").Type, 1) - .AddIngredient(calamity, "AstralStone", 10) - .AddIngredient(calamity, "Stardust", 10) - .AddIngredient(calamity, "AstralClay", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Astrum Aureus - try - { - Recipe.Create(cmusic.Find("AstrumAureusMusicBox").Type, 1) - .AddIngredient(calamity, "AstrageldonTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Astrum Deus - try - { - Recipe.Create(cmusic.Find("AstrumDeusMusicBox").Type, 1) - .AddIngredient(calamity, "AstrumDeusTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Bio Lab - try - { - Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "DubiousPlating", 10) - .AddIngredient(calamity, "Chaosplate", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "DubiousPlating", 10) - .AddIngredient(calamity, "Cinderplate", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "DubiousPlating", 10) - .AddIngredient(calamity, "Elumplate", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "DubiousPlating", 10) - .AddIngredient(calamity, "Navyplate", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "DubiousPlating", 10) - .AddIngredient(calamity, "PlagueContainmentCells", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) - .AddIngredient(calamity, "MysteriousCircuitry", 10) - .AddIngredient(calamity, "DubiousPlating", 10) - .AddIngredient(calamity, "Onyxplate", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Boss Rush Tier 1 - try - { - Recipe.Create(cmusic.Find("BossRushTier1MusicBox").Type, 1) - .AddIngredient(ItemID.WallofFleshTrophy, 1) - .AddIngredient(calamity, "ShadowspecBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Boss Rush Tier 2 - try - { - Recipe.Create(cmusic.Find("BossRushTier2MusicBox").Type, 1) - .AddIngredient(ItemID.PlanteraTrophy, 1) - .AddIngredient(calamity, "ShadowspecBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Boss Rush Tier 3 - try - { - Recipe.Create(cmusic.Find("BossRushTier3MusicBox").Type, 1) - .AddIngredient(ItemID.MoonLordTrophy, 1) - .AddIngredient(calamity, "ShadowspecBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Boss Rush Tier 4 - try - { - Recipe.Create(cmusic.Find("BossRushTier4MusicBox").Type, 1) - .AddIngredient(calamity, "DevourerofGodsTrophy", 1) - .AddIngredient(calamity, "ShadowspecBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Boss Rush Tier 5 - try - { - Recipe.Create(cmusic.Find("BossRushTier5MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) - .AddIngredient(calamity, "ShadowspecBar", 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Brimstone Crags - try - { - Recipe.Create(cmusic.Find("BrimstoneCragsMusicBox").Type, 1) - .AddIngredient(calamity, "ScorchedBone", 10) - .AddIngredient(calamity, "BrimstoneSlab", 10) - .AddIngredient(calamity, "ScorchedRemains", 10) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Brimstone Elemental - try - { - Recipe.Create(cmusic.Find("BrimstoneElementalMusicBox").Type, 1) - .AddIngredient(calamity, "BrimstoneElementalTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Calamitas Clone - try - { - Recipe.Create(cmusic.Find("CalamitasCloneMusicBox").Type, 1) - .AddIngredient(calamity, "CalamitasTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasCloneMusicBox").Type, 1) - .AddIngredient(calamity, "CataclysmTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasCloneMusicBox").Type, 1) - .AddIngredient(calamity, "CatastropheTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Calamitas Defeat - try - { - Recipe.Create(cmusic.Find("CalamitasDefeatMusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasDefeatMusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasDefeatMusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Calamitas Phase 1 - try - { - Recipe.Create(cmusic.Find("CalamitasPhase1MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasPhase1MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasPhase1MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Calamitas Phase 2 - try - { - Recipe.Create(cmusic.Find("CalamitasPhase2MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasPhase2MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasPhase2MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Calamitas Phase 3 - try - { - Recipe.Create(cmusic.Find("CalamitasPhase3MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasPhase3MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("CalamitasPhase3MusicBox").Type, 1) - .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Ceaseless Void - try - { - Recipe.Create(cmusic.Find("CeaselessVoidMusicBox").Type, 1) - .AddIngredient(calamity, "CeaselessVoidTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Crabulon - try - { - Recipe.Create(cmusic.Find("CrabulonMusicBox").Type, 1) - .AddIngredient(calamity, "CrabulonTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Cryogen - try - { - Recipe.Create(cmusic.Find("CryogenMusicBox").Type, 1) - .AddIngredient(calamity, "CryogenTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Desert Scourge - try - { - Recipe.Create(cmusic.Find("DesertScourgeMusicBox").Type, 1) - .AddIngredient(calamity, "DesertScourgeTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Devourer of Gods Phase 1 - try - { - Recipe.Create(cmusic.Find("DevourerofGodsPhase1MusicBox").Type, 1) - .AddIngredient(calamity, "DevourerofGodsTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Devourer of Gods Phase 2 - try - { - Recipe.Create(cmusic.Find("DevourerofGodsPhase2MusicBox").Type, 1) - .AddIngredient(calamity, "DevourerofGodsTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Dragonfolly - try - { - Recipe.Create(cmusic.Find("DragonfollyMusicBox").Type, 1) - .AddIngredient(calamity, "BumblebirbTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Exo Mechs - try - { - Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) - .AddIngredient(calamity, "ArtemisTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) - .AddIngredient(calamity, "ApolloTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) - .AddIngredient(calamity, "ThanatosTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - try - { - Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) - .AddIngredient(calamity, "AresTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Hive Mind - try - { - Recipe.Create(cmusic.Find("HiveMindMusicBox").Type, 1) - .AddIngredient(calamity, "HiveMindTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Leviathan - try - { - Recipe.Create(cmusic.Find("LeviathanMusicBox").Type, 1) - .AddIngredient(calamity, "LeviathanTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Old Duke - try - { - Recipe.Create(cmusic.Find("OldDukeMusicBox").Type, 1) - .AddIngredient(calamity, "OldDukeTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Perforators - try - { - Recipe.Create(cmusic.Find("PerforatorsMusicBox").Type, 1) - .AddIngredient(calamity, "PerforatorTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Plaguebringer Goliath - try - { - Recipe.Create(cmusic.Find("PlaguebringerGoliathMusicBox").Type, 1) - .AddIngredient(calamity, "PlaguebringerGoliathTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Polterghast - try - { - Recipe.Create(cmusic.Find("PolterghastMusicBox").Type, 1) - .AddIngredient(calamity, "PolterghastTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Primordial Wyrm - try - { - Recipe.Create(cmusic.Find("PrimordialWyrmMusicBox").Type, 1) - .AddIngredient(calamity, "HalibutCannon", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Profaned Guardians - try - { - Recipe.Create(cmusic.Find("ProfanedGuardiansMusicBox").Type, 1) - .AddIngredient(calamity, "ProfanedGuardianTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Providence - try - { - Recipe.Create(cmusic.Find("ProvidenceMusicBox").Type, 1) - .AddIngredient(calamity, "ProvidenceTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Ravager - try - { - Recipe.Create(cmusic.Find("RavagerMusicBox").Type, 1) - .AddIngredient(calamity, "RavagerTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Signus - try - { - Recipe.Create(cmusic.Find("SignusMusicBox").Type, 1) - .AddIngredient(calamity, "SignusTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Slime God - try - { - Recipe.Create(cmusic.Find("SlimeGodMusicBox").Type, 1) - .AddIngredient(calamity, "SlimeGodTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Storm Weaver - try - { - Recipe.Create(cmusic.Find("StormWeaverMusicBox").Type, 1) - .AddIngredient(calamity, "WeaverTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Sulphurous Sea Day - try - { - Recipe.Create(cmusic.Find("SulphurousSeaDayMusicBox").Type, 1) - .AddIngredient(calamity, "Acidwood", 10) - .AddIngredient(calamity, "SulphurousSand", 10) - .AddIngredient(ItemID.Seashell, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Sulphurous Sea Night - try - { - Recipe.Create(cmusic.Find("SulphurousSeaNightMusicBox").Type, 1) - .AddIngredient(calamity, "Acidwood", 10) - .AddIngredient(calamity, "SulphurousSand", 10) - .AddIngredient(ItemID.Starfish, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Sulphurous Sea Rain - try - { - Recipe.Create(cmusic.Find("SulphurousSeaRainMusicBox").Type, 1) - .AddIngredient(calamity, "Acidwood", 10) - .AddIngredient(ItemID.RainCloud, 10) - .AddIngredient(ItemID.Coral, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Sunken Sea - try - { - Recipe.Create(cmusic.Find("SunkenSeaMusicBox").Type, 1) - .AddIngredient(calamity, "Navystone", 10) - .AddIngredient(calamity, "SeaPrism", 10) - .AddIngredient(ItemID.WhitePearl, 3) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Yharon Phase 1 - try - { - Recipe.Create(cmusic.Find("YharonPhase1MusicBox").Type, 1) - .AddIngredient(calamity, "YharonTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - - //Yharon Phase 2 - try - { - Recipe.Create(cmusic.Find("YharonPhase2MusicBox").Type, 1) - .AddIngredient(calamity, "YharonTrophy", 1) - .AddIngredient(ItemID.MusicBox, 1) - .AddTile(musicBoxCraftingStation) - .Register(); - } - catch - { - UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); - } - } - #endregion - } - } -} \ No newline at end of file diff --git a/Content/Tiles/AbyssLayer3AltMusicBox.png b/Content/Tiles/AbyssLayer3AltMusicBox.png deleted file mode 100644 index 631b3da..0000000 Binary files a/Content/Tiles/AbyssLayer3AltMusicBox.png and /dev/null differ diff --git a/Content/Tiles/AbyssLayer3AltMusicBox_Highlight.png b/Content/Tiles/AbyssLayer3AltMusicBox_Highlight.png deleted file mode 100644 index 42c806e..0000000 Binary files a/Content/Tiles/AbyssLayer3AltMusicBox_Highlight.png and /dev/null differ diff --git a/Content/Tiles/RainMusicBox.cs b/Content/Tiles/AetherMusicBox.cs similarity index 66% rename from Content/Tiles/RainMusicBox.cs rename to Content/Tiles/AetherMusicBox.cs index 82708c4..10ab9b9 100644 --- a/Content/Tiles/RainMusicBox.cs +++ b/Content/Tiles/AetherMusicBox.cs @@ -2,7 +2,7 @@ using UnCalamityModMusic.Common; namespace UnCalamityModMusic.Content.Tiles { - public class RainMusicBox : MusicBoxTile + public class AetherMusicBox : MusicBoxTile { } } \ No newline at end of file diff --git a/Content/Tiles/AetherMusicBox.png b/Content/Tiles/AetherMusicBox.png new file mode 100644 index 0000000..4be3a5b Binary files /dev/null and b/Content/Tiles/AetherMusicBox.png differ diff --git a/Content/Tiles/AetherMusicBox_Highlight.png b/Content/Tiles/AetherMusicBox_Highlight.png new file mode 100644 index 0000000..ded11a9 Binary files /dev/null and b/Content/Tiles/AetherMusicBox_Highlight.png differ diff --git a/Content/Tiles/DukeFishronMusicBox.cs b/Content/Tiles/DukeFishronMusicBox.cs new file mode 100644 index 0000000..240234f --- /dev/null +++ b/Content/Tiles/DukeFishronMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class DukeFishronMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/DukeFishronMusicBox.png b/Content/Tiles/DukeFishronMusicBox.png new file mode 100644 index 0000000..e9644e2 Binary files /dev/null and b/Content/Tiles/DukeFishronMusicBox.png differ diff --git a/Content/Tiles/DukeFishronMusicBox_Highlight.png b/Content/Tiles/DukeFishronMusicBox_Highlight.png new file mode 100644 index 0000000..16e08c7 Binary files /dev/null and b/Content/Tiles/DukeFishronMusicBox_Highlight.png differ diff --git a/Content/Tiles/ForestDayAfternoonMusicBox.png b/Content/Tiles/ForestDayAfternoonMusicBox.png index 277cdf9..64e2b55 100644 Binary files a/Content/Tiles/ForestDayAfternoonMusicBox.png and b/Content/Tiles/ForestDayAfternoonMusicBox.png differ diff --git a/Content/Tiles/ForestDayDawnMusicBox.png b/Content/Tiles/ForestDayDawnMusicBox.png index 9a109e7..2cf618f 100644 Binary files a/Content/Tiles/ForestDayDawnMusicBox.png and b/Content/Tiles/ForestDayDawnMusicBox.png differ diff --git a/Content/Tiles/ForestDayEveningMusicBox.png b/Content/Tiles/ForestDayEveningMusicBox.png index e3e1f52..9d1e345 100644 Binary files a/Content/Tiles/ForestDayEveningMusicBox.png and b/Content/Tiles/ForestDayEveningMusicBox.png differ diff --git a/Content/Tiles/ForestDayMorningMusicBox.png b/Content/Tiles/ForestDayMorningMusicBox.png index 3f37281..dd6b883 100644 Binary files a/Content/Tiles/ForestDayMorningMusicBox.png and b/Content/Tiles/ForestDayMorningMusicBox.png differ diff --git a/Content/Tiles/ForestNightMusicBox.png b/Content/Tiles/ForestNightMusicBox.png index 79cfdd0..0caefbf 100644 Binary files a/Content/Tiles/ForestNightMusicBox.png and b/Content/Tiles/ForestNightMusicBox.png differ diff --git a/Content/Tiles/PumpkinMoonMusicBox.cs b/Content/Tiles/PumpkinMoonMusicBox.cs new file mode 100644 index 0000000..8f08e7d --- /dev/null +++ b/Content/Tiles/PumpkinMoonMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class PumpkinMoonMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/PumpkinMoonMusicBox.png b/Content/Tiles/PumpkinMoonMusicBox.png new file mode 100644 index 0000000..5ae6ef6 Binary files /dev/null and b/Content/Tiles/PumpkinMoonMusicBox.png differ diff --git a/Content/Tiles/PumpkinMoonMusicBox_Highlight.png b/Content/Tiles/PumpkinMoonMusicBox_Highlight.png new file mode 100644 index 0000000..125f937 Binary files /dev/null and b/Content/Tiles/PumpkinMoonMusicBox_Highlight.png differ diff --git a/Content/Tiles/AbyssLayer3AltMusicBox.cs b/Content/Tiles/RainDayMusicBox.cs similarity index 55% rename from Content/Tiles/AbyssLayer3AltMusicBox.cs rename to Content/Tiles/RainDayMusicBox.cs index eabc9f7..1af8c4d 100644 --- a/Content/Tiles/AbyssLayer3AltMusicBox.cs +++ b/Content/Tiles/RainDayMusicBox.cs @@ -3,8 +3,8 @@ using UnCalamityModMusic.Common; namespace UnCalamityModMusic.Content.Tiles { - [LegacyName("AbyssLowAltMusicBox")] - public class AbyssLayer3AltMusicBox : MusicBoxTile + [LegacyName("RainMusicBox")] + public class RainDayMusicBox : MusicBoxTile { } } \ No newline at end of file diff --git a/Content/Tiles/RainDayMusicBox.png b/Content/Tiles/RainDayMusicBox.png new file mode 100644 index 0000000..7c3c42f Binary files /dev/null and b/Content/Tiles/RainDayMusicBox.png differ diff --git a/Content/Tiles/RainMusicBox_Highlight.png b/Content/Tiles/RainDayMusicBox_Highlight.png similarity index 100% rename from Content/Tiles/RainMusicBox_Highlight.png rename to Content/Tiles/RainDayMusicBox_Highlight.png diff --git a/Content/Tiles/RainMusicBox.png b/Content/Tiles/RainMusicBox.png deleted file mode 100644 index 8f924a4..0000000 Binary files a/Content/Tiles/RainMusicBox.png and /dev/null differ diff --git a/Content/Tiles/RainNightMusicBox.cs b/Content/Tiles/RainNightMusicBox.cs new file mode 100644 index 0000000..c353ef9 --- /dev/null +++ b/Content/Tiles/RainNightMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class RainNightMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/RainNightMusicBox.png b/Content/Tiles/RainNightMusicBox.png new file mode 100644 index 0000000..240e03f Binary files /dev/null and b/Content/Tiles/RainNightMusicBox.png differ diff --git a/Content/Tiles/RainNightMusicBox_Highlight.png b/Content/Tiles/RainNightMusicBox_Highlight.png new file mode 100644 index 0000000..4bb7b34 Binary files /dev/null and b/Content/Tiles/RainNightMusicBox_Highlight.png differ diff --git a/Localization/en-US.hjson b/Localization/en-US.hjson index bbf641f..c536cb9 100644 --- a/Localization/en-US.hjson +++ b/Localization/en-US.hjson @@ -29,11 +29,6 @@ Mods: { ''' } - AbyssLayer3Alt: { - Label: "[i:UnCalamityModMusic/AbyssLayer3AltMusicBox] Abyss Layer 3 Alt" - Tooltip: Toggles an alternate theme for the 3rd layer of the Abyss. - } - PrioritizeInfernumMusic: { Label: "[i:WallOfFleshGoatMountItem] Prioritize Infernum Music" Tooltip: @@ -74,11 +69,6 @@ Mods: { Tooltip: Toggles ambience in Spider Caves if ambience is enabled. } - MusicBoxRecipes: { - Label: "[i:HeavyWorkBench] Music Box Recipes" - Tooltip: Toggles all music boxes recipes that require a Heavy Work Bench. - } - MusicBoxResprite: { Label: "[i:MusicBox] Empty Music Box Resprite" Tooltip: Toggles a resprite of the empty, unrecorded music box. @@ -87,9 +77,9 @@ Mods: { } Items: { - AbyssLayer3AltMusicBox: { - DisplayName: Music Box (Abyss - Layer 3 Alt) - Tooltip: Plays 'R'lyehian Depths' by Heart Plus Up! + AetherMusicBox: { + DisplayName: Music Box (Aether) + Tooltip: Plays 'Met by the Stars' by TheForge129 } BloodMoonDeathMusicBox: { @@ -137,6 +127,11 @@ Mods: { Tooltip: Plays 'Scorched to Dust' by Heart Plus Up! } + DukeFishronMusicBox: { + DisplayName: Music Box (Duke Fishron) + Tooltip: Plays 'Apex Outlaw' by TYESKI + } + DungeonMusicBox: { DisplayName: Music Box (Dungeon) Tooltip: Plays 'Chambers of the Tyrant' by Heart Plus Up! @@ -154,7 +149,7 @@ Mods: { FalseEpilogueMusicBox: { DisplayName: Music Box (False Epilogue) - Tooltip: Plays 'The Memory of a Cruel World' by Heart Plus Up! + Tooltip: Plays 'The Memory of a Cruel World' by TYRANT } ForestDayAfternoonMusicBox: { @@ -241,14 +236,24 @@ Mods: { Tooltip: Plays 'waves' by Heart Plus Up! } + PumpkinMoonMusicBox: { + DisplayName: Music Box (Pumpkin Moon) + Tooltip: Plays 'Fresh for the Harvest' by TYRANT + } + + RainDayMusicBox: { + DisplayName: Music Box (Rain Day) + Tooltip: Plays 'downpour' by Heart Plus Up! + } + RainLegacyMusicBox: { DisplayName: Music Box (Rain - Legacy) Tooltip: Plays 'Grey Sky' by Heart Plus Up! } - RainMusicBox: { - DisplayName: Music Box (Rain) - Tooltip: Plays 'downpour' by Heart Plus Up! + RainNightMusicBox: { + DisplayName: Music Box (Rain Night) + Tooltip: Plays 'downtime' by Heart Plus Up! } SandstormMusicBox: { @@ -358,14 +363,14 @@ Mods: { } Menus: { - ResurrectionMenu: Resurrection Style - MemoryMenu: Memory Style + MemoryMenu: Calamity Style - Memory + ResurrectionMenu: Calamity Style - Resurrection } ModSupport: { MusicDisplay: { SongNames: { - AbyssLayer3Alt: R'lyehian Depths + Aether: Met by the Stars BloodMoon: Congealing Shadows BloodMoonDeath: Sanguine Eclipse BrainofCthulhu: Madness Incarnate @@ -375,6 +380,7 @@ Mods: { CrimsonUnderground: Inside the Beast Caverns: Nearing the Inferno Desert: Scorched to Dust + DukeFishron: Apex Outlaw Dungeon: Chambers of the Tyrant EaterofWorlds: Menace of the Chasms EyeofCthulhu: Bloodshot Barrage @@ -395,7 +401,8 @@ Mods: { OceanDay: shoreline OceanNight: serene tides OceanRain: waves - Rain: downpour + PumpkinMoon: Fresh for the Harvest + RainDay: downpour RainLegacy: Grey Sky RainNight: downtime Sandstorm: terracotta @@ -433,15 +440,11 @@ Mods: { SkippyZii: by SkippyZii Thriplerex: by Thriplerex TYESKI: by TYESKI - Tyrant: by Tyrant + TYRANT: by TYRANT } } } - Recipes: { - EvilPowder: Evil Powder - SillyTiedBalloon: Silly Tied Balloon - NameMismatchError: There is an internal name mismatch between the items in this recipe and the items in another mod. The recipe for this item has been disabled. - } + Recipes.NameMismatchError: There is an internal name mismatch between the items in this recipe and the items in another mod. The recipe for this item has been disabled. } } diff --git a/README.md b/README.md index 34e08cd..e41dcbd 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - [Official site](https://calamitymod.com/) - [Steam Workshop](https://calamitymod.com/downloadvanillamusic/) - [Discord](https://discord.gg/2jaEwNJm9e) -- [Official Wiki](https://terrariamods.wiki.gg/wiki/Vanilla_Calamity_Mod_Music) +- [Official Wiki](https://calamitymod.wiki.gg/) - [Patreon](https://www.patreon.com/HeartPlusUp) The Vanilla Calamity Music Mod (aka VCMM) is a small Terraria mod which replaces a large swath of the vanilla Terraria soundtrack with original Calamity music, along with music boxes for each song on the soundtrack. It is intended to be used alongside the Calamity Mod, but can be used alone. The mod must be installed using [tModLoader](https://github.com/tModLoader/tModLoader). diff --git a/build.txt b/build.txt index 9491482..e94f629 100644 --- a/build.txt +++ b/build.txt @@ -1,7 +1,7 @@ author = apotofkoolaid and Heart Plus Up! -version = 2.0.1 +version = 2.1 displayName = Vanilla Calamity Mod Music -weakReferences = CalamityMod, InfernumMode +weakReferences = CalamityMod homepage = https://discord.gg/2jaEwNJm9e buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, .github\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes, Effects\Compiler\* hideCode = false diff --git a/description_workshop.txt b/description_workshop.txt index c732945..e9c7fbb 100644 --- a/description_workshop.txt +++ b/description_workshop.txt @@ -21,6 +21,7 @@ Full list of tracks: [*] Heart Plus Up! - Amidst the Minerals [*] Heart Plus Up! - Nearing the Inferno [*] Heart Plus Up! - downpour +[*] Heart Plus Up! - downtime [*] Heart Plus Up! - ~Metal, Wood, and Fire~ [*] Heart Plus Up! - Haven in the Sunlight [*] Heart Plus Up! - Moonlit Haven @@ -51,6 +52,7 @@ Full list of tracks: [*] SkippyZii - Inside the Beast [*] SkippyZii ft. Heart Plus Up! - Madness Incarnate [*] Heart Plus Up! - The Abomination's Omen +[*] TheForge129 - Met by the Stars [*] Heart Plus Up! - Wrath from the Crypt [*] Heart Plus Up! - Chambers of the Tyrant [*] Heart Plus Up! - Celebration Haven @@ -58,9 +60,10 @@ Full list of tracks: [*] Salvati - The Resurrection of a Cruel World [*] Heart Plus Up! - ~Mythic Metals and Enchanted Fires~ [*] Heart Plus Up! - ~Fruits of Your Labor~ -[*] Heart Plus Up! - R'lyehian Depths +[*] TYRANT - Fresh for the Harvest +[*] TYESKI - Apex Outlaw [*] psykomatic - Virtuous Radiance -[*] Heart Plus Up! - The Memory of a Cruel World +[*] TYRANT - The Memory of a Cruel World [*] Heart Plus Up! - ~False Gods and Ancient Elements~ [*] Heart Plus Up! - Grey Sky [*] Heart Plus Up! - ~Master's Forge~