4 using System.Collections.Generic;
5 using System.Collections.Immutable;
13 public override string DebugTag => $
"{Identifier}";
22 public bool Wear {
get;
set; }
35 private readonly ImmutableArray<Identifier> gearTags;
36 private readonly ImmutableHashSet<Identifier> ignoredTags;
37 private bool subObjectivesCreated;
49 protected override void Act(
float deltaTime)
51 if (subObjectivesCreated) {
return; }
55 int count = gearTags.Count(t => t == tag);
57 TryAddSubObjective(ref getItem, () =>
65 ignoredIdentifiersOrTags = ignoredTags,
93 RemoveSubObjective(ref getItem);
100 subObjectivesCreated =
true;
106 subObjectivesCreated =
false;
static IEnumerable< Identifier > ParseIgnoredTags(IEnumerable< Identifier > identifiersOrTags)
readonly ImmutableHashSet< Identifier > IdentifiersOrTags
static IEnumerable< Identifier > ParseGearTags(IEnumerable< Identifier > identifiersOrTags)
Func< Item, bool > ItemFilter
override bool AllowWhileHandcuffed
override bool AllowMultipleInstances
AIObjectiveGetItems(Character character, AIObjectiveManager objectiveManager, IEnumerable< Identifier > identifiersOrTags, float priorityModifier=1)
bool EvaluateCombatPriority
Func< Item, Identifier, bool >? ItemFilter
T1 = item to check, T2 = tag we're trying to find a suitable item for
override void Act(float deltaTime)
bool RequireDivingSuitAdequate
readonly HashSet< Item > achievedItems
bool CheckPathForEachItem
override bool CheckObjectiveState()
Should return whether the objective is completed or not.
override Identifier Identifier
override bool KeepDivingGearOn
readonly Character character
readonly List< AIObjective > subObjectives
readonly AIObjectiveManager objectiveManager