diff --git a/Content.Server/_DV/GameTicking/Rules/ParadoxCloneRuleSystem.DeltaV.cs b/Content.Server/_DV/GameTicking/Rules/ParadoxCloneRuleSystem.DeltaV.cs index f159861534a8..a615ec99547f 100644 --- a/Content.Server/_DV/GameTicking/Rules/ParadoxCloneRuleSystem.DeltaV.cs +++ b/Content.Server/_DV/GameTicking/Rules/ParadoxCloneRuleSystem.DeltaV.cs @@ -1,5 +1,6 @@ using Content.Server._DV.Psionics.Systems; using Content.Shared._DV.Psionics.Components; +using Content.Shared._DV.Traits.Assorted; using Content.Shared.Mind; using Content.Shared.Roles; using Content.Shared.Roles.Components; @@ -17,10 +18,12 @@ public sealed partial class ParadoxCloneRuleSystem private void FilterTargets(HashSet> minds) { // TODO: use generic IMindFilter - // no picking other antags or non-crew + // no picking other antags or non-crew and entities with no paradox clone trait minds.RemoveWhere(mind => _role.MindIsAntagonist(mind) || !_role.MindHasRole((mind, mind), out var role) || - role?.Comp1.JobPrototype == null); + role?.Comp1.JobPrototype == null || + (mind.Comp.OwnedEntity is { } entity && HasComp(entity)) + ); } private void PostClone(EntityUid mob) diff --git a/Content.Shared/_DV/Traits/Assorted/NoParadoxCloneComponent.cs b/Content.Shared/_DV/Traits/Assorted/NoParadoxCloneComponent.cs new file mode 100644 index 000000000000..77293bc9651d --- /dev/null +++ b/Content.Shared/_DV/Traits/Assorted/NoParadoxCloneComponent.cs @@ -0,0 +1,9 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared._DV.Traits.Assorted; + +/// +/// This entity will not be candidate for a paradox clone. +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class NoParadoxCloneComponent : Component; diff --git a/Resources/Locale/en-US/_DV/traits/traits.ftl b/Resources/Locale/en-US/_DV/traits/traits.ftl index e3702af46f9e..488ec811a200 100644 --- a/Resources/Locale/en-US/_DV/traits/traits.ftl +++ b/Resources/Locale/en-US/_DV/traits/traits.ftl @@ -70,3 +70,6 @@ trait-protected-desc = Due to your position, value, or circumstances, your survi trait-slavic-name = Slavic accent trait-slavic-desc = You kome from ze East, and speak vith strong Slavic accent! + +trait-no-paradox-clone-name = No Paradox Clone +trait-no-paradox-clone-desc = For whatever reason, the universe will only ever have one of you. You won't be able to have a paradox clone. diff --git a/Resources/Prototypes/_DV/Traits/meta.yml b/Resources/Prototypes/_DV/Traits/meta.yml index 680ec41d852f..b64d0fd07525 100644 --- a/Resources/Prototypes/_DV/Traits/meta.yml +++ b/Resources/Prototypes/_DV/Traits/meta.yml @@ -23,3 +23,20 @@ - !type:AddCompsEffect components: - type: TargetObjectiveImmune + +- type: trait + id: NoParadoxClone + name: trait-no-paradox-clone-name + description: trait-no-paradox-clone-desc + category: Meta + conditions: + - !type:InDepartmentCondition + department: Command + invert: true + - !type:InDepartmentCondition + department: Security + invert: true + effects: + - !type:AddCompsEffect + components: + - type: NoParadoxClone diff --git a/Resources/Prototypes/_DV/Traits/trait_categories.yml b/Resources/Prototypes/_DV/Traits/trait_categories.yml index b25db2cc8948..35e645497ee4 100644 --- a/Resources/Prototypes/_DV/Traits/trait_categories.yml +++ b/Resources/Prototypes/_DV/Traits/trait_categories.yml @@ -28,5 +28,5 @@ id: Meta name: trait-category-meta priority: 50 - maxTraits: 1 + maxTraits: 2 accentColor: "#eab308" # Yellow