@@ -36,7 +36,7 @@ public sealed class CharacterInfoSystem : EntitySystem
|
|||||||
if (_minds.TryGetMind(entity, out var mindId, out var mind))
|
if (_minds.TryGetMind(entity, out var mindId, out var mind))
|
||||||
{
|
{
|
||||||
// Get objectives
|
// Get objectives
|
||||||
foreach (var objective in mind.AllObjectives)
|
foreach (var objective in mind.Objectives)
|
||||||
{
|
{
|
||||||
var info = _objectives.GetInfo(objective, mindId, mind);
|
var info = _objectives.GetInfo(objective, mindId, mind);
|
||||||
if (info == null)
|
if (info == null)
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ public sealed partial class DragonSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var mind = Comp<MindComponent>(mindContainer.Mind.Value);
|
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))
|
if (_objQuery.TryGetComponent(objId, out var obj))
|
||||||
{
|
{
|
||||||
@@ -247,7 +247,7 @@ public sealed partial class DragonSystem : EntitySystem
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var mind = Comp<MindComponent>(mindContainer.Mind.Value);
|
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))
|
if (_objQuery.TryGetComponent(objId, out var obj))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace Content.Server.Objectives.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
shell.WriteLine($"Objectives for player {player.UserId}:");
|
shell.WriteLine($"Objectives for player {player.UserId}:");
|
||||||
var objectives = mind.AllObjectives.ToList();
|
var objectives = mind.Objectives.ToList();
|
||||||
if (objectives.Count == 0)
|
if (objectives.Count == 0)
|
||||||
{
|
{
|
||||||
shell.WriteLine("None.");
|
shell.WriteLine("None.");
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public sealed class HelpProgressConditionSystem : EntitySystem
|
|||||||
if (!TryComp<MindComponent>(traitor, out var mind))
|
if (!TryComp<MindComponent>(traitor, out var mind))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
foreach (var objective in mind.AllObjectives)
|
foreach (var objective in mind.Objectives)
|
||||||
{
|
{
|
||||||
if (HasComp<HelpProgressConditionComponent>(objective))
|
if (HasComp<HelpProgressConditionComponent>(objective))
|
||||||
removeList.Add(traitor);
|
removeList.Add(traitor);
|
||||||
@@ -88,7 +88,7 @@ public sealed class HelpProgressConditionSystem : EntitySystem
|
|||||||
|
|
||||||
if (TryComp<MindComponent>(target, out var mind))
|
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.
|
// 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);
|
var info = _objectives.GetInfo(objective, target, mind);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public sealed class ObjectiveBlacklistRequirementSystem : EntitySystem
|
|||||||
if (args.Cancelled)
|
if (args.Cancelled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (var objective in args.Mind.AllObjectives)
|
foreach (var objective in args.Mind.Objectives)
|
||||||
{
|
{
|
||||||
if (_whitelistSystem.IsBlacklistPass(comp.Blacklist, objective))
|
if (_whitelistSystem.IsBlacklistPass(comp.Blacklist, objective))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ public abstract class SharedMindSystem : EntitySystem
|
|||||||
if (Resolve(mindId, ref mind))
|
if (Resolve(mindId, ref mind))
|
||||||
{
|
{
|
||||||
var query = GetEntityQuery<T>();
|
var query = GetEntityQuery<T>();
|
||||||
foreach (var uid in mind.AllObjectives)
|
foreach (var uid in mind.Objectives)
|
||||||
{
|
{
|
||||||
if (query.TryGetComponent(uid, out objective))
|
if (query.TryGetComponent(uid, out objective))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user