public static string GetFirstName(this Sex sex, SpeciesPrototype speciesProto, IPrototypeManager?protoManager = null, IRobustRandom?random = null) { IoCManager.Resolve(ref protoManager); IoCManager.Resolve(ref random); switch (sex) { case Sex.Male: return(random.Pick(protoManager.Index <DatasetPrototype>(speciesProto.MaleFirstNames).Values)); case Sex.Female: return(random.Pick(protoManager.Index <DatasetPrototype>(speciesProto.FemaleFirstNames).Values)); default: throw new ArgumentOutOfRangeException(); } }
public static string GetLastName(this Sex sex, SpeciesPrototype speciesProto, IPrototypeManager?protoManager = null, IRobustRandom?random = null) { IoCManager.Resolve(ref protoManager); IoCManager.Resolve(ref random); return(random.Pick(protoManager.Index <DatasetPrototype>(speciesProto.LastNames).Values)); }