]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Allow removing species from the RNG pool of a new player's initial auto-generated...
authorUpAndLeaves <92269094+Alpha-Two@users.noreply.github.com>
Mon, 8 Dec 2025 01:37:06 +0000 (01:37 +0000)
committerGitHub <noreply@github.com>
Mon, 8 Dec 2025 01:37:06 +0000 (01:37 +0000)
* First commit

* Fix it!

* Requested Changes

Content.Server/GameTicking/GameTicker.RoundFlow.cs
Content.Server/Preferences/Managers/ServerPreferencesManager.cs
Content.Shared/CCVar/CCVars.Ic.cs
Resources/Prototypes/Species/species_weights.yml

index 6d2f3fac5208f2df7efe24be598e6ffa54eefdb5..00b0c0ff321599f8433f4f2b9645f88133493194 100644 (file)
@@ -394,7 +394,9 @@ namespace Content.Server.GameTicking
                 }
                 else
                 {
-                    profile = HumanoidCharacterProfile.Random();
+                    var speciesToBlacklist =
+                        new HashSet<string>(_cfg.GetCVar(CCVars.ICNewAccountSpeciesBlacklist).Split(","));
+                    profile = HumanoidCharacterProfile.Random(speciesToBlacklist);
                 }
                 readyPlayerProfiles.Add(userId, profile);
             }
index 7ece769d54ed7ea2da71773616d652bf5f612377..10380f6b7fc4c809e7aaa4fe7a271890bfbef799 100644 (file)
@@ -334,7 +334,9 @@ namespace Content.Server.Preferences.Managers
             var prefs = await _db.GetPlayerPreferencesAsync(userId, cancel);
             if (prefs is null)
             {
-                return await _db.InitPrefsAsync(userId, HumanoidCharacterProfile.Random(), cancel);
+                var speciesToBlacklist =
+                    new HashSet<string>(_cfg.GetCVar(CCVars.ICNewAccountSpeciesBlacklist).Split(","));
+                return await _db.InitPrefsAsync(userId, HumanoidCharacterProfile.Random(speciesToBlacklist), cancel);
             }
 
             return prefs;
index 5f8d108a22123791d803c943323098564826538e..a075bb0144609df91202a9431098670e3e15e8fa 100644 (file)
@@ -65,6 +65,13 @@ public sealed partial class CCVars
     public static readonly CVarDef<string> ICRandomSpeciesWeights =
         CVarDef.Create("ic.random_species_weights", "SpeciesWeights", CVar.SERVER);
 
+    /// <summary>
+    ///     The list of species that will NOT be given to new account joins when they are assigned a random character.
+    ///     This only affects the first time a character is made for an account, nothing else.
+    /// </summary>
+    public static readonly CVarDef<string> ICNewAccountSpeciesBlacklist =
+        CVarDef.Create("ic.blacklist_species_new_account", "Diona,Vulpkanin,Vox,SlimePerson", CVar.SERVER);
+
     /// <summary>
     ///     Control displaying SSD indicators near players
     /// </summary>
index e226d2064ab5db2060e269e5747e52c10ca39b97..a516795ffb6928386476770219505c77f3a02af7 100644 (file)
@@ -5,5 +5,8 @@
     Human: 5
     Reptilian: 4
     SlimePerson: 4
+    Moth: 4
+    Dwarf: 2
     Diona: 2
+    Vox: 1
     Vulpkanin: 4