/********* ** Private methods *********/ /// <summary>The method to call after <see cref="SObject.DayUpdate"/>.</summary> public static void After_DayUpdate(SObject __instance, GameLocation location) { if (!__instance.bigCraftable.Value || __instance.ParentSheetIndex != ObjectPatcher.GetStatueId()) { return; } __instance.MinutesUntilReady = 1; __instance.heldObject.Value = ObjectPatcher.GetRandomGift(); }
/********* ** Private methods *********/ /// <summary>The method to call after <see cref="SObject.DayUpdate"/>.</summary> public static void After_DayUpdate(SObject __instance, GameLocation location) { if (!__instance.bigCraftable.Value || __instance.ParentSheetIndex != ObjectPatcher.GetStatueId()) { return; } NPC npc = Utility.getTodaysBirthdayNPC(Game1.currentSeason, Game1.dayOfMonth) ?? Utility.getRandomTownNPC(); Game1.NPCGiftTastes.TryGetValue(npc.Name, out string str); string[] favs = str.Split('/')[1].Split(' '); __instance.MinutesUntilReady = 1; __instance.heldObject.Value = new SObject(int.Parse(favs[Game1.random.Next(favs.Length)]), 1); }