public static bool BirthingEvent_tickUpdate_Prefix(GameTime time, BirthingEvent __instance, ref bool __result, ref int ___timer, string ___soundName, ref bool ___playedSound, string ___message, ref bool ___naming, bool ___getBabyName, bool ___isMale, string ___babyName)
        {
            if (!Config.EnableMod || !___getBabyName)
            {
                return(true);
            }

            Game1.player.CanMove   = false;
            ___timer              += time.ElapsedGameTime.Milliseconds;
            Game1.fadeToBlackAlpha = 1f;

            if (!___naming)
            {
                Game1.activeClickableMenu = new NamingMenu(new NamingMenu.doneNamingBehavior(__instance.returnBabyName), Game1.content.LoadString(___isMale ? "Strings\\Events:BabyNamingTitle_Male" : "Strings\\Events:BabyNamingTitle_Female"), "");
                ___naming = true;
            }
            if (___babyName != null && ___babyName != "" && ___babyName.Length > 0)
            {
                double chance = (lastBirthingSpouse.Name.Equals("Maru") || lastBirthingSpouse.Name.Equals("Krobus")) ? 0.5 : 0.0;
                chance += (Game1.player.hasDarkSkin() ? 0.5 : 0.0);
                bool   isDarkSkinned = new Random((int)Game1.uniqueIDForThisGame + (int)Game1.stats.DaysPlayed).NextDouble() < chance;
                string newBabyName   = ___babyName;
                DisposableList <NPC> all_characters = Utility.getAllCharacters();
                bool collision_found = false;
                do
                {
                    collision_found = false;
                    using (DisposableList <NPC> .Enumerator enumerator = all_characters.GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            if (enumerator.Current.Name.Equals(newBabyName))
                            {
                                newBabyName    += " ";
                                collision_found = true;
                                break;
                            }
                        }
                    }
                }while (collision_found);
                Child baby = new Child(newBabyName, ___isMale, isDarkSkinned, Game1.player)
                {
                    Age      = 0,
                    Position = new Vector2(16f, 4f) * 64f + new Vector2(0f + myRand.Next(-64, 48), -24f + myRand.Next(-24, 24)),
                };
                baby.modData["aedenthorn.FreeLove/OtherParent"] = lastBirthingSpouse.Name;

                Utility.getHomeOfFarmer(Game1.player).characters.Add(baby);
                Game1.playSound("smallSelect");
                Game1.getCharacterFromName(lastBirthingSpouse.Name).daysAfterLastBirth = 5;
                Game1.player.friendshipData[lastBirthingSpouse.Name].NextBirthingDate  = null;
                if (Game1.player.getChildrenCount() == 2)
                {
                    Game1.getCharacterFromName(lastBirthingSpouse.Name).shouldSayMarriageDialogue.Value = true;
                    Game1.getCharacterFromName(lastBirthingSpouse.Name).currentMarriageDialogue.Insert(0, new MarriageDialogueReference("Data\\ExtraDialogue", "NewChild_SecondChild" + myRand.Next(1, 3), true, new string[0]));
                    Game1.getSteamAchievement("Achievement_FullHouse");
                }
                else if (lastBirthingSpouse.isGaySpouse())
                {
                    Game1.getCharacterFromName(lastBirthingSpouse.Name).currentMarriageDialogue.Insert(0, new MarriageDialogueReference("Data\\ExtraDialogue", "NewChild_Adoption", true, new string[]
                    {
                        ___babyName
                    }));
                }
                else
                {
                    Game1.getCharacterFromName(lastBirthingSpouse.Name).currentMarriageDialogue.Insert(0, new MarriageDialogueReference("Data\\ExtraDialogue", "NewChild_FirstChild", true, new string[]
                    {
                        ___babyName
                    }));
                }
                Game1.morningQueue.Enqueue(delegate
                {
                    mp.globalChatInfoMessage("Baby", new string[]
                    {
                        Lexicon.capitalize(Game1.player.Name),
                        Game1.player.spouse,
                        Lexicon.getGenderedChildTerm(___isMale),
                        Lexicon.getPronoun(___isMale),
                        baby.displayName
                    });
                });
                if (Game1.keyboardDispatcher != null)
                {
                    Game1.keyboardDispatcher.Subscriber = null;
                }
                Game1.player.Position = Utility.PointToVector2(Utility.getHomeOfFarmer(Game1.player).getBedSpot()) * 64f;
                Game1.globalFadeToClear(null, 0.02f);
                lastBirthingSpouse = null;
                __result           = true;
                return(false);
            }
            __result = false;
            return(false);
        }