Minor fixes :

- Translated properties in item generator
- Families check : Agasha/Kaito
- Lang l5r5e.random -> l5r5e.global.random
This commit is contained in:
Vlyan
2022-03-13 15:54:13 +01:00
parent 002ec8c218
commit 638ea5859f
3 changed files with 14 additions and 10 deletions

View File

@@ -93,13 +93,17 @@ export class CharacterGenerator {
console.log(`L5R5E | Pack not found[${packName}]`);
return;
}
let document;
if (id) {
return comp.getDocument(id);
document = await comp.getDocument(id);
} else {
if (!comp.indexed) {
await comp.getDocuments();
}
document = comp.getDocument(CharacterGenerator._getRandomArrayValue(Array.from(comp.keys())));
}
if (!comp.indexed) {
await comp.getDocuments();
}
return comp.getDocument(CharacterGenerator._getRandomArrayValue(Array.from(comp.keys())));
await game.l5r5e.HelpersL5r5e.refreshItemProperties(document);
return document;
}
/**