internal void HorseNamer(string horseName) { // Name Horse and add to Animal Skinner 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}."); }
/// <summary>Creates a WildHorse using the save file's given information</summary> internal void LoadWildHorse(List <string> horseInfo) { // If a horse wasn't in town upon save, null information was stored for it if (horseInfo.Count == 1) { HorseInfo = null; } else if (horseInfo.Count == 4) { HorseInfo = new WildHorse(horseInfo); } else { HorseInfo = null; } }
/// <summary>Checks the chance for a WildHorse to spawn if a stable exists on the farm, and spawns one if it should. Used for new save files.</summary> internal void NewWildHorse(bool overrideChance = false) { // If the previous day had a WildHorse, remove it from the map if (HorseInfo != null) { HorseInfo.Remove(); } // Check chance for a WildHorse spawn, and spawn a new WildHorse if there should be one if (Randomizer.Next(0, 4) == 0 || overrideChance) { foreach (Building b in Game1.getFarm().buildings) { if (b is Stable || overrideChance) { HorseInfo = new WildHorse(); break; } } } }