]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
randomized sexless species now have epicene gender by default (#25282)
authorMr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
Mon, 19 Feb 2024 22:38:06 +0000 (17:38 -0500)
committerGitHub <noreply@github.com>
Mon, 19 Feb 2024 22:38:06 +0000 (15:38 -0700)
Fikss

Content.Shared/Preferences/HumanoidCharacterProfile.cs

index 09fb0072258fe2ea6717a6402ac6d16572373ba2..22c37dcfe9ed7db66ced5979eb83d0eaf4f2c312 100644 (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);
                 }