Roll : Added target info in Roll

This commit is contained in:
Vlyan
2022-02-17 15:24:50 +01:00
parent 448fadeca7
commit efe1e088ed
18 changed files with 148 additions and 68 deletions

View File

@@ -225,7 +225,7 @@ export class ArmySheetL5r5e extends BaseSheetL5r5e {
* @private
*/
async _updateLinkedActorData(type, actor) {
if (!actor || actor.documentName !== "Actor" || !["character", "npc"].includes(actor.data?.type)) {
if (!actor || actor.documentName !== "Actor" || !actor.isCharacter) {
console.warn("L5R5E | Wrong actor type", actor?.data?.type, actor);
return;
}

View File

@@ -91,6 +91,12 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
)?.[0]
)
);
game.l5r5e.HelpersL5r5e.autocomplete(
html,
"data.identity.school",
game.l5r5e.HelpersL5r5e.getSchoolsList(),
","
);
game.l5r5e.HelpersL5r5e.autocomplete(
html,
"data.identity.roles",

View File

@@ -233,6 +233,7 @@ export class TwentyQuestionsDialog extends FormApplication {
)?.[0]
)
);
game.l5r5e.HelpersL5r5e.autocomplete(html, "step3.school", game.l5r5e.HelpersL5r5e.getSchoolsList(), ",");
game.l5r5e.HelpersL5r5e.autocomplete(html, "step3.roles", game.l5r5e.HelpersL5r5e.getLocalizedRolesList(), ",");
}