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

@@ -99,9 +99,9 @@ export class CharacterGeneratorDialog extends FormApplication {
return {
...super.getData(options),
isNpc: this.actor.type === "npc",
clanList: [{ id: "random", label: game.i18n.localize("l5r5e.random") }, ...clans],
clanList: [{ id: "random", label: game.i18n.localize("l5r5e.global.random") }, ...clans],
genderList: [
{ id: "random", label: game.i18n.localize("l5r5e.random") },
{ id: "random", label: game.i18n.localize("l5r5e.global.random") },
{ id: "male", label: game.i18n.localize("l5r5e.social.gender.male") },
{ id: "female", label: game.i18n.localize("l5r5e.social.gender.female") },
],

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;
}
/**