/// <summary>Creates a WildHorse instance</summary> internal void PlaceWildHorse(object sender, UpdateTickedEventArgs e) { if (!Game1.hasLoadedGame || !ModEntry.AssetsLoaded) { return; } HorseInfo = new WildHorse(); ModEntry.SHelper.Events.GameLoop.UpdateTicked -= this.PlaceWildHorse; }
/********************************* ** H O R S E A D O P T I O N ** *********************************/ /// <summary>Adopts and names the wild horse being interacted with. Called in the CheckHorse event handler.</summary> internal void HorseNamer(string horseName) { // Name Horse and add to Adopt & Skin database HorseInfo.HorseInstance.Name = horseName; HorseInfo.HorseInstance.displayName = horseName; Earth.AddCreature(HorseInfo.HorseInstance, HorseInfo.SkinID); // Horse is no longer a WildHorse to keep track of HorseInfo = null; // Exit the naming menu Game1.drawObjectDialogue($"Adopted {horseName}."); }