Skip to content

Commit

Permalink
Merge pull request #1620 from TheGrimbeeper/heretic-no-ling-target
Browse files Browse the repository at this point in the history
Don't allow changelings to be sacrifice targets
  • Loading branch information
AftrLite authored Feb 9, 2025
2 parents 4eb81fd + b500ec1 commit 0b02dd4
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
using Content.Shared.Roles.Jobs;
using Robust.Shared.Prototypes;
using Content.Shared.Roles;
using Content.Shared.Changeling;

namespace Content.Server.Heretic.EntitySystems;

Expand Down Expand Up @@ -54,7 +55,7 @@ public override void Initialize()
SubscribeLocalEvent<HereticComponent, BeforeDamageChangedEvent>(OnBeforeDamage);
SubscribeLocalEvent<HereticComponent, DamageModifyEvent>(OnDamage);


}

public override void Update(float frameTime)
Expand Down Expand Up @@ -123,7 +124,7 @@ private void OnRerollTargets(Entity<HereticComponent> ent, ref EventHereticRerol
eligibleTargets.Add(target.AttachedEntity!.Value); // it can't be null because see .Where(HasValue)

// no heretics or other baboons
eligibleTargets = eligibleTargets.Where(t => !HasComp<GhoulComponent>(t) && !HasComp<HereticComponent>(t)).ToList();
eligibleTargets = eligibleTargets.Where(t => !HasComp<GhoulComponent>(t) || !HasComp<HereticComponent>(t) || !HasComp<ChangelingComponent>(t)).ToList();

var pickedTargets = new List<EntityUid?>();

Expand Down

0 comments on commit 0b02dd4

Please sign in to comment.