Change character names to use datasets prototypes (#3259)
* Remove old name lists in .txts * Fix tests * LATEST MASTER TECHNOLOGY
This commit is contained in:
@@ -3,14 +3,15 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Prototypes;
|
||||
using Content.Shared.Roles;
|
||||
using Content.Shared.Text;
|
||||
using Content.Shared.Utility;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Localization.Macros;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Localization.Macros;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Shared.Preferences
|
||||
{
|
||||
@@ -93,10 +94,9 @@ namespace Content.Shared.Preferences
|
||||
var sex = random.Prob(0.5f) ? Sex.Male : Sex.Female;
|
||||
var gender = sex == Sex.Male ? Gender.Male : Gender.Female;
|
||||
|
||||
var firstName = random.Pick(sex == Sex.Male
|
||||
? Names.MaleFirstNames
|
||||
: Names.FemaleFirstNames);
|
||||
var lastName = random.Pick(Names.LastNames);
|
||||
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
||||
var firstName = random.Pick(sex.FirstNames(prototypeManager).Values);
|
||||
var lastName = random.Pick(prototypeManager.Index<DatasetPrototype>("names_last"));
|
||||
var name = $"{firstName} {lastName}";
|
||||
var age = random.Next(MinimumAge, MaximumAge);
|
||||
|
||||
@@ -286,7 +286,7 @@ namespace Content.Shared.Preferences
|
||||
}
|
||||
|
||||
public string Summary =>
|
||||
Loc.GetString(" This is {0}. {2:They} {2:are} {1} years old.", Name, Age, this);
|
||||
Loc.GetString(" This is {0}. {2:They} {2:are} {1} years old.", Name, Age, this);
|
||||
|
||||
public bool MemberwiseEquals(ICharacterProfile maybeOther)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user