From: Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com> Date: Mon, 19 Feb 2024 22:38:06 +0000 (-0500) Subject: randomized sexless species now have epicene gender by default (#25282) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=1e95c700ebb6d8db77014bea8057105482a90904;p=space-station-14.git randomized sexless species now have epicene gender by default (#25282) Fikss --- diff --git a/Content.Shared/Preferences/HumanoidCharacterProfile.cs b/Content.Shared/Preferences/HumanoidCharacterProfile.cs index 09fb007225..22c37dcfe9 100644 --- a/Content.Shared/Preferences/HumanoidCharacterProfile.cs +++ b/Content.Shared/Preferences/HumanoidCharacterProfile.cs @@ -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(_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(_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); }