Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paradox Anomaly Opt-Out Consent Toggle #463

Merged
merged 1 commit into from
Jan 8, 2025
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
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
Loading