? _prefs.GetPreferences(args.Session.UserId).SelectedCharacter as HumanoidCharacterProfile
: HumanoidCharacterProfile.RandomWithSpecies();
- SpeciesPrototype? species;
- if (ent.Comp.SpeciesOverride != null)
+
+ if (profile?.Species is not { } speciesId || !_proto.TryIndex(speciesId, out var species))
{
- species = _proto.Index(ent.Comp.SpeciesOverride.Value);
+ species = _proto.Index<SpeciesPrototype>(SharedHumanoidAppearanceSystem.DefaultSpecies);
}
- else if (profile?.Species is not { } speciesId || !_proto.TryIndex(speciesId, out species))
+
+ if (ent.Comp.SpeciesOverride != null
+ && (ent.Comp.SpeciesOverrideBlacklist?.Contains(new ProtoId<SpeciesPrototype>(species.ID)) ?? false))
{
- species = _proto.Index<SpeciesPrototype>(SharedHumanoidAppearanceSystem.DefaultSpecies);
+ species = _proto.Index(ent.Comp.SpeciesOverride.Value);
}
args.Entity = Spawn(species.Prototype);
public sealed partial class AntagLoadProfileRuleComponent : Component
{
/// <summary>
- /// If specified, the profile loaded will be made into this species.
+ /// If specified, the profile loaded will be made into this species if the chosen species matches the blacklist.
/// </summary>
[DataField]
public ProtoId<SpeciesPrototype>? SpeciesOverride;
+
+ /// <summary>
+ /// List of species that trigger the override
+ /// </summary>
+ [DataField]
+ public HashSet<ProtoId<SpeciesPrototype>>? SpeciesOverrideBlacklist;
}
- type: AntagSelection
- type: AntagLoadProfileRule
speciesOverride: Human
+ speciesOverrideBlacklist:
+ #Species that do not work with nukies should be included in this list.
+ #Once the issues are fixed the species should be removed from this list to be enabled.
+ #Balance concerns are not a valid reason to disable a species, except for high-impact Nukie-specific exploits.
+ - Vox
- type: entity
parent: BaseNukeopsRule