Skip to content

Commit

Permalink
Merge pull request #463 from mazziechai/feature/clone-consent
Browse files Browse the repository at this point in the history
Paradox Anomaly Opt-Out Consent Toggle
  • Loading branch information
Fansana authored Jan 8, 2025
2 parents ea5ea5a + 1f7e05c commit ad88cc0
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 ad88cc0

Please sign in to comment.