diff --git a/Content.Server/Objectives/ObjectivesSystem.cs b/Content.Server/Objectives/ObjectivesSystem.cs index 39effb9bdb..1b20d65c45 100644 --- a/Content.Server/Objectives/ObjectivesSystem.cs +++ b/Content.Server/Objectives/ObjectivesSystem.cs @@ -244,8 +244,10 @@ public sealed class ObjectivesSystem : SharedObjectivesSystem var objectives = group.Weights.ShallowClone(); while (_random.TryPickAndTake(objectives, out var objectiveProto)) { - if (TryCreateObjective((mindId, mind), objectiveProto, out var objective) - && Comp(objective.Value).Difficulty <= maxDifficulty) + if (!_prototypeManager.Index(objectiveProto).TryGetComponent(out var objectiveComp, EntityManager.ComponentFactory)) + continue; + + if (objectiveComp.Difficulty <= maxDifficulty && TryCreateObjective((mindId, mind), objectiveProto, out var objective)) return objective; } }