randomized sexless species now have epicene gender by default (#25282)

Fikss
This commit is contained in:
Mr. 27
2024-02-19 17:38:06 -05:00
committed by GitHub
parent d72254d17f
commit 1e95c700eb

View File

@@ -181,7 +181,17 @@ namespace Content.Shared.Preferences
age = random.Next(speciesPrototype.MinAge, speciesPrototype.OldAge); // people don't look and keep making 119 year old characters with zero rp, cap it at middle aged
}
var gender = sex == Sex.Male ? Gender.Male : Gender.Female;
var gender = Gender.Epicene;
switch (sex)
{
case Sex.Male:
gender = Gender.Male;
break;
case Sex.Female:
gender = Gender.Female;
break;
}
var name = GetName(species, gender);
@@ -297,16 +307,16 @@ namespace Content.Shared.Preferences
public HumanoidCharacterProfile WithAntagPreference(string antagId, bool pref)
{
var list = new List<string>(_antagPreferences);
if(pref)
if (pref)
{
if(!list.Contains(antagId))
if (!list.Contains(antagId))
{
list.Add(antagId);
}
}
else
{
if(list.Contains(antagId))
if (list.Contains(antagId))
{
list.Remove(antagId);
}
@@ -319,16 +329,16 @@ namespace Content.Shared.Preferences
var list = new List<string>(_traitPreferences);
// TODO: Maybe just refactor this to HashSet? Same with _antagPreferences
if(pref)
if (pref)
{
if(!list.Contains(traitId))
if (!list.Contains(traitId))
{
list.Add(traitId);
}
}
else
{
if(list.Contains(traitId))
if (list.Contains(traitId))
{
list.Remove(traitId);
}