Ejemplo n.º 1
0
        public static void Postfix(ref StardewValley.AnimalHouse __instance)
        {
            var animalHouse = new Decorators.AnimalHouse(__instance);

            if (animalHouse.IsFull() || animalHouse.GetIncubatorWithEggReadyToHatch() == null)
            {
                return;
            }
            animalHouse.SetIncubatorHatchEvent();
        }
        public static bool Prefix(ref StardewValley.AnimalHouse __instance, ref string name)
        {
            var moddedAnimalHouse = new Decorators.AnimalHouse(__instance);
            var moddedPlayer      = new Farmer(Game.GetPlayer());

            if (moddedAnimalHouse.GetBuilding() is StardewValley.Buildings.Barn _)
            {
                if (Event.IsFarmEventOccurring(out QuestionEvent farmEvent))
                {
                    HandleNewborn(ref moddedAnimalHouse, name, ref farmEvent, moddedPlayer);
                }
            }
            HandleHatchling(ref moddedAnimalHouse, name, moddedPlayer);
            Event.GoToNextEventCommandInLocation(Game.GetCurrentLocation());
            Game.ExitActiveMenu();
            return(false);
        }