Skip to content

Commit

Permalink
implement added skills to a career
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-man committed Sep 15, 2024
1 parent c501d46 commit 63b8016
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/actor/sheet/character-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class ActorSheetWFRP4eCharacter extends ActorSheetWFRP4e {
}

// Find skills that have been trained or haven't, add advancement indicators or greyed out options (untrainedSkills)
for (let sk of career.skills) {
for (let sk of career.skills.concat(career.system.addedSkills)) {
let trainedSkill = sheetData.actor.getItemTypes("skill").find(s => s.name.toLowerCase() == sk.toLowerCase())
if (trainedSkill)
trainedSkill.system._addCareerData(career)
Expand Down
2 changes: 1 addition & 1 deletion modules/system/advancement.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class Advancement
if (item instanceof Item)
{
let currentCareer = actor.currentCareer
if (currentCareer.system.skills.find(i => i == item.name))
if (currentCareer.system.skills.concat(currentCareer.system.addedSkills).find(i => i == item.name))
{
career = true;
}
Expand Down

0 comments on commit 63b8016

Please sign in to comment.