Skip to content

Commit

Permalink
feat: paradox anomaly opt-out consent toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
mazziechai committed Jan 7, 2025
1 parent ac42961 commit 1f7e05c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using System.Diagnostics.CodeAnalysis;
using Content.Server.Consent;


namespace Content.Server.DeltaV.ParadoxAnomaly.Systems;

Expand All @@ -26,6 +28,7 @@ namespace Content.Server.DeltaV.ParadoxAnomaly.Systems;
/// </summary>
public sealed class ParadoxAnomalySystem : EntitySystem
{
[Dependency] private readonly ConsentSystem _consent = default!;
[Dependency] private readonly GenericAntagSystem _genericAntag = default!;
[Dependency] private readonly GhostRoleSystem _ghostRole = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
Expand Down Expand Up @@ -81,6 +84,9 @@ private bool TrySpawnParadoxAnomaly(string rule, [NotNullWhen(true)] out EntityU
if (_role.MindIsAntagonist(mindId))
continue;

if (_consent.HasConsent(uid, "NoClone"))
continue;

// TODO: when metempsychosis real skip whoever has Karma

candidates.Add((uid, mindId, species, profile));
Expand Down
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/Blep/consent.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ consent-Digestion-desc = Allow yourself to be digested. WARNING: BEING DIGESTED
consent-Hypno-name = Hypnosis
consent-Hypno-desc = Allow yourself to be hypnotized.
consent-NoClone-name = Disallow Paradox Anomaly
consent-NoClone-desc = Disallow yourself to be the target of a paradox anomaly clone.
3 changes: 3 additions & 0 deletions Resources/Prototypes/consent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@

- type: consentToggle
id: Hypno

- type: consentToggle
id: NoClone

0 comments on commit 1f7e05c

Please sign in to comment.