[tweak] ru names, datasets

# Conflicts:
#	Content.IntegrationTests/Tests/Preferences/ServerDbSqliteTests.cs
#	Content.Server/GameTicking/GameTicker.Spawning.cs
#	Content.Shared/Humanoid/Prototypes/SpeciesPrototype.cs
#	Resources/Prototypes/Datasets/Names/cargo_shuttle.yml
#	Resources/Prototypes/Datasets/Names/military.yml
#	Resources/Prototypes/Datasets/Names/regalrat.yml
#	Resources/Prototypes/Datasets/Names/skeleton_first.yml
#	Resources/Prototypes/Datasets/tips.yml
#	Resources/Prototypes/Datasets/verbs.yml
This commit is contained in:
rhailrake
2023-04-23 21:45:19 +06:00
committed by Remuchi
parent c4f378b4a8
commit ca64b5ee5d
30 changed files with 7370 additions and 4949 deletions

View File

@@ -28,14 +28,14 @@ namespace Content.Shared.Humanoid
{
case SpeciesNaming.TheFirstofLast:
return Loc.GetString("namepreset-thefirstoflast",
("first", GetFirstName(speciesProto, gender)), ("last", GetLastName(speciesProto)));
("first", GetFirstName(speciesProto, gender)), ("last", GetLastName(speciesProto, gender)));
case SpeciesNaming.FirstDashFirst:
return Loc.GetString("namepreset-firstdashfirst",
("first1", GetFirstName(speciesProto, gender)), ("first2", GetFirstName(speciesProto, gender)));
case SpeciesNaming.FirstLast:
default:
return Loc.GetString("namepreset-firstlast",
("first", GetFirstName(speciesProto, gender)), ("last", GetLastName(speciesProto)));
("first", GetFirstName(speciesProto, gender)), ("last", GetLastName(speciesProto, gender)));
}
}
@@ -55,9 +55,22 @@ namespace Content.Shared.Humanoid
}
}
public string GetLastName(SpeciesPrototype speciesProto)
public string GetLastName(SpeciesPrototype speciesProto, Gender? gender = null)
{
return _random.Pick(_prototypeManager.Index<DatasetPrototype>(speciesProto.LastNames).Values);
// WD-EDIT
switch (gender)
{
case Gender.Male:
return _random.Pick(_prototypeManager.Index<DatasetPrototype>(speciesProto.MaleLastNames).Values);
case Gender.Female:
return _random.Pick(_prototypeManager.Index<DatasetPrototype>(speciesProto.FemaleLastNames).Values);
default:
if (_random.Prob(0.5f))
return _random.Pick(_prototypeManager.Index<DatasetPrototype>(speciesProto.MaleLastNames).Values);
else
return _random.Pick(_prototypeManager.Index<DatasetPrototype>(speciesProto.FemaleLastNames).Values);
}
// WD-EDIT
}
}
}