Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -17,10 +18,12 @@ public sealed partial class ParadoxCloneRuleSystem
private void FilterTargets(HashSet<Entity<MindComponent>> 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<JobRoleComponent>((mind, mind), out var role) ||
role?.Comp1.JobPrototype == null);
role?.Comp1.JobPrototype == null ||
(mind.Comp.OwnedEntity is { } entity && HasComp<NoParadoxCloneComponent>(entity))
);
}

private void PostClone(EntityUid mob)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Robust.Shared.GameStates;

namespace Content.Shared._DV.Traits.Assorted;

/// <summary>
/// This entity will not be candidate for a paradox clone.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class NoParadoxCloneComponent : Component;
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/_DV/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
17 changes: 17 additions & 0 deletions Resources/Prototypes/_DV/Traits/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Resources/Prototypes/_DV/Traits/trait_categories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
id: Meta
name: trait-category-meta
priority: 50
maxTraits: 1
maxTraits: 2
accentColor: "#eab308" # Yellow
Loading