Change character names to use datasets prototypes (#3259)
* Remove old name lists in .txts * Fix tests * LATEST MASTER TECHNOLOGY
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using Content.Shared.Preferences;
|
||||
using Content.Shared.Text;
|
||||
using Content.Shared.Prototypes;
|
||||
using Content.Shared.Utility;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Client.UserInterface
|
||||
@@ -7,6 +9,7 @@ namespace Content.Client.UserInterface
|
||||
public partial class HumanoidProfileEditor
|
||||
{
|
||||
private readonly IRobustRandom _random;
|
||||
private readonly IPrototypeManager _prototypeManager;
|
||||
|
||||
private void RandomizeEverything()
|
||||
{
|
||||
@@ -21,10 +24,8 @@ namespace Content.Client.UserInterface
|
||||
|
||||
private void RandomizeName()
|
||||
{
|
||||
var firstName = _random.Pick(Profile.Sex == Sex.Male
|
||||
? Names.MaleFirstNames
|
||||
: Names.FemaleFirstNames);
|
||||
var lastName = _random.Pick(Names.LastNames);
|
||||
var firstName = _random.Pick(Profile.Sex.FirstNames(_prototypeManager).Values);
|
||||
var lastName = _random.Pick(_prototypeManager.Index<DatasetPrototype>("names_last"));
|
||||
SetName($"{firstName} {lastName}");
|
||||
UpdateNameEdit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user