diff --git a/CalamityMod.cs b/CalamityMod.cs index 62b15634c1..7ac3568177 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -132,8 +132,10 @@ namespace CalamityMod internal static CalamityMod Instance; // TODO -- Mod references should be contained in a ModSystem (example name "ModLoadedChecker") - internal Mod musicMod = null; // This is Calamity's official music mod, CalamityModMusic - internal bool MusicAvailable => !(musicMod is null); + + // This is Calamity's official music mod, CalamityModMusic. It is now a hard dependency. + internal Mod musicMod = null; + internal bool MusicAvailable => musicMod is not null; // Please keep this in alphabetical order so it's easy to read internal Mod ancientsAwakened = null; diff --git a/NPCs/TownNPCs/FAP.cs b/NPCs/TownNPCs/FAP.cs index 90bf0ba3b2..b46e82b6f0 100644 --- a/NPCs/TownNPCs/FAP.cs +++ b/NPCs/TownNPCs/FAP.cs @@ -885,11 +885,14 @@ namespace CalamityMod.NPCs.TownNPCs public override void AddShops() { - Condition potionSells = CalamityConditions.PotionSellingConfig; - Condition downedAureus = CalamityConditions.DownedAstrumAureus; + Mod musicMod = CalamityMod.Instance.musicMod; + ModItem interlude1Box = musicMod.Find("Interlude1MusicBox"); + ModItem interlude2Box = musicMod.Find("Interlude2MusicBox"); + ModItem interlude3Box = musicMod.Find("Interlude3MusicBox"); + ModItem eulogyBox = musicMod.Find("DevourerofGodsEulogyMusicBox"); NPCShop shop = new(Type); - shop.AddWithCustomValue(ItemID.LovePotion, Item.buyPrice(silver: 25), potionSells, Condition.HappyEnough) + shop.AddWithCustomValue(ItemID.LovePotion, Item.buyPrice(silver: 25), CalamityConditions.PotionSellingConfig, Condition.HappyEnough) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(silver: 30)) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 1)) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 2)) @@ -905,9 +908,9 @@ namespace CalamityMod.NPCs.TownNPCs .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 8), Condition.DownedPlantera) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 8), Condition.DownedPlantera) .AddWithCustomValue(ItemID.EmpressButterfly, Item.buyPrice(gold: 10), Condition.DownedPlantera) - .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 3), downedAureus) - .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 4), downedAureus, Condition.BloodMoon) - .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 6), downedAureus, Condition.TimeNight) + .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 3), CalamityConditions.DownedAstrumAureus) + .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 4), CalamityConditions.DownedAstrumAureus, Condition.BloodMoon) + .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 6), CalamityConditions.DownedAstrumAureus, Condition.TimeNight) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 2), Condition.DownedGolem) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 8), Condition.DownedGolem) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 8), Condition.DownedGolem) @@ -921,6 +924,10 @@ namespace CalamityMod.NPCs.TownNPCs .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 50)) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 50)) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(1)) + .AddWithCustomValue(interlude1Box.Type, Item.buyPrice(gold: 10), CalamityConditions.DownedCalamitasClone) + .AddWithCustomValue(interlude2Box.Type, Item.buyPrice(gold: 10), Condition.DownedMoonLord) + .AddWithCustomValue(interlude3Box.Type, Item.buyPrice(gold: 10), CalamityConditions.DownedYharon) + .AddWithCustomValue(eulogyBox.Type, Item.buyPrice(gold: 10), CalamityConditions.DownedDevourerOfGods) .AddWithCustomValue(ItemID.UnicornHorn, Item.buyPrice(0, 2, 50), Condition.HappyEnough, Condition.InHallow) .AddWithCustomValue(ItemID.Milkshake, Item.buyPrice(gold: 5), Condition.HappyEnough, Condition.InHallow, Condition.NpcIsPresent(NPCID.Stylist)) .AddWithCustomValue(ModContent.ItemType(), Item.buyPrice(gold: 25), Condition.HappyEnough, Condition.NpcIsPresent(NPCID.Stylist), Condition.NpcIsPresent(NPCID.BestiaryGirl))