Unstable 1.1.14.0
This commit is contained in:
@@ -133,6 +133,14 @@ namespace Barotrauma
|
||||
|
||||
if (IsTalentLocked(talentIdentifier)) { return false; }
|
||||
|
||||
if (character.Info.GetUnlockedTalentsInTree().Contains(talentIdentifier))
|
||||
{
|
||||
//if the character already has the talent, it must be viable?
|
||||
//needed for backwards compatibility, otherwise if we remove e.g. a tier 1 or tier 2 talent,
|
||||
//all the already-unlocked higher-tier talents will be considered invalid which'll break the talent selection
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (var subTree in talentTree!.TalentSubTrees)
|
||||
{
|
||||
if (subTree.AllTalentIdentifiers.Contains(talentIdentifier) && subTree.HasMaxTalents(selectedTalents)) { return false; }
|
||||
@@ -143,11 +151,12 @@ namespace Barotrauma
|
||||
{
|
||||
return !talentOptionStage.HasMaxTalents(selectedTalents) && TalentTreeMeetsRequirements(talentTree, subTree, selectedTalents);
|
||||
}
|
||||
//if a previous stage hasn't been completed, this talent can't be selected yet
|
||||
bool optionStageCompleted = talentOptionStage.HasEnoughTalents(selectedTalents);
|
||||
if (!optionStageCompleted)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user