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:
parent
220f59c457
commit
b5c44c0621
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -354,7 +354,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>
|
||||
|
|
|
|||
|
|
@ -12,3 +12,6 @@
|
|||
Feroxi: 3 # DeltaV - Feroxi, see Prototypes/_DV/Entities/Mobs/Species/feroxi.yml
|
||||
Diona: 2
|
||||
Chitinid: 3 # DeltaV - Chitinid, see Prototypes/_DV/Entities/Mobs/Species/chitinid.yml
|
||||
Moth: 4
|
||||
#Dwarf: 2 # DeltaV - No Dwarfs
|
||||
Vox: 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue