using CustomNPCFramework.Framework.Enums; using StardewValley; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace CustomNPCFramework.Framework { /// /// Used as a class to hold all of the possible npc names. /// public class NPCNames { /// /// Holds all of the npc male names. /// public static List maleNames = new List() { "Freddy", "Josh", "Ash" }; /// /// Holds all of the npc female names. /// public static List femaleNames = new List() { "Rebecca", "Sierra", "Lisa" }; /// /// Holds all of the npc gender non-binary names. /// public static List otherGenderNames = new List() { "Jayden", "Ryanne", "Skylar" }; /// /// Get a gender appropriate name from the pool of npc names. /// /// /// public static string getRandomNPCName(Genders gender) { if (gender == Genders.female) { int rand = Game1.random.Next(0, femaleNames.Count - 1); return femaleNames.ElementAt(rand); } if (gender == Genders.male) { int rand = Game1.random.Next(0, maleNames.Count - 1); return maleNames.ElementAt(rand); } if (gender == Genders.other) { int rand = Game1.random.Next(0, otherGenderNames.Count - 1); return otherGenderNames.ElementAt(rand); } return ""; } } }