forked from space-syndicate/space-station-14
Allow removing species from the RNG pool of a new player's initial auto-generated character (#41678)
* First commit * Fix it! * Requested Changes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -5,5 +5,8 @@
|
||||
Human: 5
|
||||
Reptilian: 4
|
||||
SlimePerson: 4
|
||||
Moth: 4
|
||||
Dwarf: 2
|
||||
Diona: 2
|
||||
Vox: 1
|
||||
Vulpkanin: 4
|
||||
|
||||
Reference in New Issue
Block a user