From ccc81d439f9bc5815611e3305545951fef564470 Mon Sep 17 00:00:00 2001 From: Vlyan Date: Thu, 10 Mar 2022 09:04:13 +0100 Subject: [PATCH] 20Q : Ignore autocomplete clan/school for pow template --- .../scripts/actors/twenty-questions-dialog.js | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/system/scripts/actors/twenty-questions-dialog.js b/system/scripts/actors/twenty-questions-dialog.js index 85785a5..769838b 100644 --- a/system/scripts/actors/twenty-questions-dialog.js +++ b/system/scripts/actors/twenty-questions-dialog.js @@ -223,16 +223,18 @@ export class TwentyQuestionsDialog extends FormApplication { }); // Autocomplete - game.l5r5e.HelpersL5r5e.autocomplete(html, "step1.clan", game.l5r5e.HelpersL5r5e.getLocalizedClansList()); - game.l5r5e.HelpersL5r5e.autocomplete( - html, - "step2.family", - CONFIG.l5r5e.families.get( - Object.entries(game.i18n.translations.l5r5e.clans).find( - ([k, v]) => v === this.object.data.step1.clan - )?.[0] - ) - ); + if (this.object.data.template !== "pow") { + game.l5r5e.HelpersL5r5e.autocomplete(html, "step1.clan", game.l5r5e.HelpersL5r5e.getLocalizedClansList()); + game.l5r5e.HelpersL5r5e.autocomplete( + html, + "step2.family", + CONFIG.l5r5e.families.get( + Object.entries(game.i18n.translations.l5r5e.clans).find( + ([k, v]) => v === this.object.data.step1.clan + )?.[0] + ) + ); + } game.l5r5e.HelpersL5r5e.autocomplete(html, "step3.school", game.l5r5e.HelpersL5r5e.getSchoolsList(), ","); game.l5r5e.HelpersL5r5e.autocomplete(html, "step3.roles", game.l5r5e.HelpersL5r5e.getLocalizedRolesList(), ","); }