From 1a1fd42c88133c58882826e1224d2ec0f11cf28a Mon Sep 17 00:00:00 2001 From: TheGrimbeeper Date: Sun, 9 Feb 2025 15:05:04 +1100 Subject: [PATCH 1/2] Don't allow changelings to be sacrifice targets This doesn't stop targets from later becoming changelings, e.g from rolling after the heretic, but is an improvement over what already exists. --- .../_Goobstation/Heretic/EntitySystems/HereticSystem.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs b/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs index 332a6c3ecdf7..fe9f1a4b7891 100644 --- a/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs +++ b/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs @@ -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; @@ -54,7 +55,7 @@ public override void Initialize() SubscribeLocalEvent(OnBeforeDamage); SubscribeLocalEvent(OnDamage); - + } public override void Update(float frameTime) @@ -123,7 +124,7 @@ private void OnRerollTargets(Entity 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(t) && !HasComp(t)).ToList(); + eligibleTargets = eligibleTargets.Where(t => !HasComp(t) && !HasComp(t) && !HasComp(t)).ToList(); var pickedTargets = new List(); From b500ec1f7bd5f2560e799bdd44ed8b7e9120eeaf Mon Sep 17 00:00:00 2001 From: AftrLite <61218133+AftrLite@users.noreply.github.com> Date: Sun, 9 Feb 2025 22:19:04 +1300 Subject: [PATCH 2/2] Update HereticSystem.cs Why were there's &&'s? Surely these should've been ||'s. --- .../_Goobstation/Heretic/EntitySystems/HereticSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs b/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs index fe9f1a4b7891..66c5ef1dff2a 100644 --- a/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs +++ b/Content.Server/_Goobstation/Heretic/EntitySystems/HereticSystem.cs @@ -124,7 +124,7 @@ private void OnRerollTargets(Entity 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(t) && !HasComp(t) && !HasComp(t)).ToList(); + eligibleTargets = eligibleTargets.Where(t => !HasComp(t) || !HasComp(t) || !HasComp(t)).ToList(); var pickedTargets = new List();