Skip to content

Commit

Permalink
randomized sexless species now have epicene gender by default (space-…
Browse files Browse the repository at this point in the history
  • Loading branch information
Dutch-VanDerLinde committed Feb 19, 2024
1 parent d72254d commit 1e95c70
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions Content.Shared/Preferences/HumanoidCharacterProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,17 @@ public static HumanoidCharacterProfile RandomWithSpecies(string species = Shared
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);

Expand Down Expand Up @@ -297,16 +307,16 @@ public HumanoidCharacterProfile WithAntagPreferences(IEnumerable<string> antagPr
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);
}
Expand All @@ -319,16 +329,16 @@ public HumanoidCharacterProfile WithTraitPreference(string traitId, bool pref)
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);
}
Expand Down

0 comments on commit 1e95c70

Please sign in to comment.