2 using System.Collections.Immutable;
5 using Microsoft.Xna.Framework;
37 public readonly ImmutableHashSet<TalentMigration>
Migrations;
56 ? Option.Some((trackedStat, trackedMax))
60 if (!nameIdentifier.IsEmpty)
68 Color colorOverride = element.
GetAttributeColor(
"coloroverride", Color.TransparentBlack);
71 ? Option<Color>.Some(colorOverride)
72 : Option<Color>.None();
75 var migrations = ImmutableHashSet.CreateBuilder<TalentMigration>();
77 foreach (var subElement
in element.Elements())
79 switch (subElement.Name.ToString().ToLowerInvariant())
86 TextManager.ConstructDescription(ref tempDescription, subElement);
90 foreach (var migrationElement
in subElement.Elements())
94 var migration = TalentMigration.FromXML(migrationElement);
95 migrations.Add(migration);
99 DebugConsole.ThrowError($
"Error while loading talent migration for talent \"{Identifier}\".", e,
109 if (element.GetAttribute(
"description") !=
null)
111 string description = element.GetAttributeString(
"description",
string.Empty);
Color GetAttributeColor(string key, in Color def)
bool GetAttributeBool(string key, bool def)
int GetAttributeInt(string key, int def)
Identifier GetAttributeIdentifier(string key, string def)
LocalizedString Fallback(LocalizedString fallback, bool useDefaultLanguageIfFound=true)
Use this text instead if the original text cannot be found.
readonly Identifier Identifier
Prefab that has a property serves as a deterministic hash of a prefab's identifier....
readonly ImmutableHashSet< TalentMigration > Migrations
static readonly PrefabCollection< TalentPrefab > TalentPrefabs
LocalizedString DisplayName
readonly Option<(Identifier PermanentStatIdentifier, int Max)> TrackedStat
When set to a value the talent tooltip will display a text showing the current value of the stat and ...
TalentPrefab(ContentXElement element, TalentsFile file)
readonly Option< Color > ColorOverride
bool AbilityEffectsStackWithSameTalent
When set to false the AbilityEffects of multiple of the same talent will not be checked and only the ...
LocalizedString Description
ContentXElement ConfigElement