]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
make objective blacklist work (#20256)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sat, 16 Sep 2023 21:25:56 +0000 (22:25 +0100)
committerGitHub <noreply@github.com>
Sat, 16 Sep 2023 21:25:56 +0000 (14:25 -0700)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Server/Objectives/Systems/ObjectiveBlacklistRequirementSystem.cs

index 5318b2e4548804f75e0c2619b7990306680b305c..56b245ce8479dbd6050114e49dce24615abfaf18 100644 (file)
@@ -20,7 +20,13 @@ public sealed class ObjectiveBlacklistRequirementSystem : EntitySystem
         if (args.Cancelled)
             return;
 
-        if (comp.Blacklist.IsValid(uid, EntityManager))
-            args.Cancelled = true;
+        foreach (var objective in args.Mind.AllObjectives)
+        {
+            if (comp.Blacklist.IsValid(objective, EntityManager))
+            {
+                args.Cancelled = true;
+                return;
+            }
+        }
     }
 }