diff --git a/GeneralMods/HappyBirthday/GiftManager.cs b/GeneralMods/HappyBirthday/GiftManager.cs index f2631695..5157cce9 100644 --- a/GeneralMods/HappyBirthday/GiftManager.cs +++ b/GeneralMods/HappyBirthday/GiftManager.cs @@ -94,7 +94,10 @@ namespace Omegasis.HappyBirthday if (File.Exists(Path.Combine(HappyBirthday.ModHelper.DirectoryPath, villagerGifts))) this.defaultBirthdayGifts = HappyBirthday.ModHelper.Data.ReadJsonFile>(villagerGifts); else + { HappyBirthday.ModHelper.Data.WriteJsonFile>(villagerGifts, this.defaultBirthdayGifts); + this.defaultBirthdayGifts = HappyBirthday.ModHelper.Data.ReadJsonFile>(villagerGifts); + } } else { @@ -109,6 +112,9 @@ namespace Omegasis.HappyBirthday { HappyBirthday.ModMonitor.Log("No birthday gift information found. Loading from internal birthday list and generating villagerGifts.json"); HappyBirthday.ModHelper.Data.WriteJsonFile>(villagerGifts, this.defaultBirthdayGifts); + HappyBirthday.Config.useLegacyBirthdayFiles = false; + this.defaultBirthdayGifts = HappyBirthday.ModHelper.Data.ReadJsonFile>(villagerGifts); + HappyBirthday.ModHelper.WriteConfig(HappyBirthday.Config); } } }