3 using System.Collections.Immutable;
10 private readonly ImmutableArray<Identifier> identifiers;
11 private readonly ImmutableArray<Identifier> tags;
22 DebugConsole.ThrowError($
"Error in talent \"{characterTalent}\". No identifiers, tags or category defined.",
32 itemPrefab = abilityItemPrefab;
36 itemPrefab = abilityItem.
Prefab;
39 if (itemPrefab !=
null)
54 if (!itemPrefab.
Category.HasFlag(category)) {
return false; }
57 if (identifiers.Any())
59 if (!identifiers.Any(t => itemPrefab.
Identifier == t))
64 return !tags.Any() || tags.Any(t => itemPrefab.
Tags.Any(p => t == p));
void LogAbilityConditionError(AbilityObject abilityObject, Type expectedData)
CharacterTalent characterTalent
bool MatchesItem(ItemPrefab itemPrefab)
AbilityConditionItem(CharacterTalent characterTalent, ContentXElement conditionElement)
override bool MatchesConditionSpecific(AbilityObject abilityObject)
Identifier[] GetAttributeIdentifierArray(Identifier[] def, params string[] keys)
ContentPackage? ContentPackage
override ImmutableHashSet< Identifier > Tags
override MapEntityCategory Category
Prefab(ContentFile file, Identifier identifier)
readonly Identifier Identifier