]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Re-enabling nukie species(except vox), added antag species blacklisting
authorJezithyr <jezithyr@gmail.com>
Fri, 5 Jul 2024 07:59:16 +0000 (00:59 -0700)
committerGitHub <noreply@github.com>
Fri, 5 Jul 2024 07:59:16 +0000 (00:59 -0700)
* Revert "Make all Nukies humans (#29693)"

This reverts commit 3e3e050aafb93daa1eb017ee06b5e2a15fb3d315.

* Implemented species blacklist

* Re-enabled all species as Nukies except for Vox because loadouts don't support breathing alternative gases yet.

Content.Server/GameTicking/Rules/AntagLoadProfileRuleSystem.cs
Content.Server/GameTicking/Rules/Components/AntagLoadProfileRuleCOmponent.cs
Resources/Prototypes/GameRules/roundstart.yml

index b93904c685f82e6354540b57e651fcace320d54a..3527e2a11c2bc60c8e9565e77bf8a66d03e6bca7 100644 (file)
@@ -31,14 +31,16 @@ public sealed class AntagLoadProfileRuleSystem : GameRuleSystem<AntagLoadProfile
             ? _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);
index 0816902ad43b68809ccd829f65077acf18b20ee7..3a4cb5fc75eaea48d604f9323dc74083812c4089 100644 (file)
@@ -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;
 }
index da198a25d09872bfd3d43881073a0e9b8ad219b9..d5cd6a3f9788b0a0badd9742d29662854c1c3fed 100644 (file)
   - 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