Re-enabling nukie species(except vox), added antag species blacklisting
* Revert "Make all Nukies humans (#29693)"
This reverts commit 3e3e050aaf.
* Implemented species blacklist
* Re-enabled all species as Nukies except for Vox because loadouts don't support breathing alternative gases yet.
This commit is contained in:
@@ -31,16 +31,18 @@ public sealed class AntagLoadProfileRuleSystem : GameRuleSystem<AntagLoadProfile
|
||||
? _prefs.GetPreferences(args.Session.UserId).SelectedCharacter as HumanoidCharacterProfile
|
||||
: HumanoidCharacterProfile.RandomWithSpecies();
|
||||
|
||||
SpeciesPrototype? species;
|
||||
if (ent.Comp.SpeciesOverride != null)
|
||||
{
|
||||
species = _proto.Index(ent.Comp.SpeciesOverride.Value);
|
||||
}
|
||||
else if (profile?.Species is not { } speciesId || !_proto.TryIndex(speciesId, out species))
|
||||
|
||||
if (profile?.Species is not { } speciesId || !_proto.TryIndex(speciesId, out var species))
|
||||
{
|
||||
species = _proto.Index<SpeciesPrototype>(SharedHumanoidAppearanceSystem.DefaultSpecies);
|
||||
}
|
||||
|
||||
if (ent.Comp.SpeciesOverride != null
|
||||
&& (ent.Comp.SpeciesOverrideBlacklist?.Contains(new ProtoId<SpeciesPrototype>(species.ID)) ?? false))
|
||||
{
|
||||
species = _proto.Index(ent.Comp.SpeciesOverride.Value);
|
||||
}
|
||||
|
||||
args.Entity = Spawn(species.Prototype);
|
||||
_humanoid.LoadProfile(args.Entity.Value, profile?.WithSpecies(species.ID));
|
||||
}
|
||||
|
||||
@@ -10,8 +10,14 @@ namespace Content.Server.GameTicking.Rules.Components;
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,11 @@
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user