]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Remove uses of AllObjectives (#30077)
authorCojoke <83733158+Cojoke-dot@users.noreply.github.com>
Tue, 16 Jul 2024 07:17:18 +0000 (02:17 -0500)
committerGitHub <noreply@github.com>
Tue, 16 Jul 2024 07:17:18 +0000 (10:17 +0300)
Remove the uses of AllObjectives

Content.Server/CharacterInfo/CharacterInfoSystem.cs
Content.Server/Dragon/DragonSystem.cs
Content.Server/Objectives/Commands/ListObjectivesCommand.cs
Content.Server/Objectives/Systems/HelpProgressConditionSystem.cs
Content.Server/Objectives/Systems/ObjectiveBlacklistRequirementSystem.cs
Content.Shared/Mind/SharedMindSystem.cs

index df8718a022e34fa17f7a9521f80b256f4f690eab..cb2216b5e3b49927251c26770b2d8f41c58ee4ba 100644 (file)
@@ -36,7 +36,7 @@ public sealed class CharacterInfoSystem : EntitySystem
         if (_minds.TryGetMind(entity, out var mindId, out var mind))
         {
             // Get objectives
-            foreach (var objective in mind.AllObjectives)
+            foreach (var objective in mind.Objectives)
             {
                 var info = _objectives.GetInfo(objective, mindId, mind);
                 if (info == null)
index 96ca8d3614a22a5c807ec61e718d7301588b809b..e626edeb26901e8dc2b1bb5629b832016bd2b880 100644 (file)
@@ -225,7 +225,7 @@ public sealed partial class DragonSystem : EntitySystem
             return;
 
         var mind = Comp<MindComponent>(mindContainer.Mind.Value);
-        foreach (var objId in mind.AllObjectives)
+        foreach (var objId in mind.Objectives)
         {
             if (_objQuery.TryGetComponent(objId, out var obj))
             {
@@ -247,7 +247,7 @@ public sealed partial class DragonSystem : EntitySystem
             return;
 
         var mind = Comp<MindComponent>(mindContainer.Mind.Value);
-        foreach (var objId in mind.AllObjectives)
+        foreach (var objId in mind.Objectives)
         {
             if (_objQuery.TryGetComponent(objId, out var obj))
             {
index 97fc943269a44933ab90fc1d5c1efda66763f62b..88dcdcedf65a552cc36c9530b97188115725d723 100644 (file)
@@ -33,7 +33,7 @@ namespace Content.Server.Objectives.Commands
             }
 
             shell.WriteLine($"Objectives for player {player.UserId}:");
-            var objectives = mind.AllObjectives.ToList();
+            var objectives = mind.Objectives.ToList();
             if (objectives.Count == 0)
             {
                 shell.WriteLine("None.");
index e4455c038136324c8f6671ef0ecc283abfc4ea5b..e0a56149b3e2525540f9f5f1b1afef1807b928bf 100644 (file)
@@ -59,7 +59,7 @@ public sealed class HelpProgressConditionSystem : EntitySystem
             if (!TryComp<MindComponent>(traitor, out var mind))
                 continue;
 
-            foreach (var objective in mind.AllObjectives)
+            foreach (var objective in mind.Objectives)
             {
                 if (HasComp<HelpProgressConditionComponent>(objective))
                     removeList.Add(traitor);
@@ -88,7 +88,7 @@ public sealed class HelpProgressConditionSystem : EntitySystem
 
         if (TryComp<MindComponent>(target, out var mind))
         {
-            foreach (var objective in mind.AllObjectives)
+            foreach (var objective in mind.Objectives)
             {
                 // this has the potential to loop forever, anything setting target has to check that there is no HelpProgressCondition.
                 var info = _objectives.GetInfo(objective, target, mind);
index 8fe7e7e203150ef3c048821707e3bcda44e624c1..0671c6b67e4949ab3bd6a9067f349537a5bcb34b 100644 (file)
@@ -23,7 +23,7 @@ public sealed class ObjectiveBlacklistRequirementSystem : EntitySystem
         if (args.Cancelled)
             return;
 
-        foreach (var objective in args.Mind.AllObjectives)
+        foreach (var objective in args.Mind.Objectives)
         {
             if (_whitelistSystem.IsBlacklistPass(comp.Blacklist, objective))
             {
index bf1065c1b1d6f17c43426a76c445a416ba9e13b3..ba365daf15cfe60b3055676e4a3dcd1b1825c8a1 100644 (file)
@@ -370,7 +370,7 @@ public abstract class SharedMindSystem : EntitySystem
         if (Resolve(mindId, ref mind))
         {
             var query = GetEntityQuery<T>();
-            foreach (var uid in mind.AllObjectives)
+            foreach (var uid in mind.Objectives)
             {
                 if (query.TryGetComponent(uid, out objective))
                 {