Skip to content

Commit

Permalink
Update pf1.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed Jun 20, 2024
1 parent b53a9ba commit a37c7fc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/module/providers/pf1.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,21 @@ export default class pf1LanguageProvider extends LanguageProvider {
font: "Qijomi",
},
};

getUserLanguages(actor) {
let knownLanguages = new Set();
let literateLanguages = new Set();
if (actor.system?.traits?.languages) {
for (let lang of actor.system.traits.languages.value) {
knownLanguages.add(lang);
}
if (actor.system.traits.languages.customTotal) {
for (let lang of actor.system.traits.languages.customTotal) {
const key = lang.trim().toLowerCase();
knownLanguages.add(key);
}
}
}
return [knownLanguages, literateLanguages];
}
}

0 comments on commit a37c7fc

Please sign in to comment.