From 8adcb379649a1bc79b352d3023a27ee2e7772d48 Mon Sep 17 00:00:00 2001 From: Jezithyr Date: Fri, 5 Jul 2024 00:59:16 -0700 Subject: [PATCH] Re-enabling nukie species(except vox), added antag species blacklisting * 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. --- .../GameTicking/Rules/AntagLoadProfileRuleSystem.cs | 12 +++++++----- .../Components/AntagLoadProfileRuleCOmponent.cs | 8 +++++++- Resources/Prototypes/GameRules/roundstart.yml | 5 +++++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Content.Server/GameTicking/Rules/AntagLoadProfileRuleSystem.cs b/Content.Server/GameTicking/Rules/AntagLoadProfileRuleSystem.cs index b93904c685..3527e2a11c 100644 --- a/Content.Server/GameTicking/Rules/AntagLoadProfileRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/AntagLoadProfileRuleSystem.cs @@ -31,14 +31,16 @@ public sealed class AntagLoadProfileRuleSystem : GameRuleSystem(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(species.ID)) ?? false)) { - species = _proto.Index(SharedHumanoidAppearanceSystem.DefaultSpecies); + species = _proto.Index(ent.Comp.SpeciesOverride.Value); } args.Entity = Spawn(species.Prototype); diff --git a/Content.Server/GameTicking/Rules/Components/AntagLoadProfileRuleCOmponent.cs b/Content.Server/GameTicking/Rules/Components/AntagLoadProfileRuleCOmponent.cs index 0816902ad4..3a4cb5fc75 100644 --- a/Content.Server/GameTicking/Rules/Components/AntagLoadProfileRuleCOmponent.cs +++ b/Content.Server/GameTicking/Rules/Components/AntagLoadProfileRuleCOmponent.cs @@ -10,8 +10,14 @@ namespace Content.Server.GameTicking.Rules.Components; public sealed partial class AntagLoadProfileRuleComponent : Component { /// - /// 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. /// [DataField] public ProtoId? SpeciesOverride; + + /// + /// List of species that trigger the override + /// + [DataField] + public HashSet>? SpeciesOverrideBlacklist; } diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml index da198a25d0..d5cd6a3f97 100644 --- a/Resources/Prototypes/GameRules/roundstart.yml +++ b/Resources/Prototypes/GameRules/roundstart.yml @@ -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 -- 2.51.2