Added translation for npc subtype

This commit is contained in:
Vlyan
2020-12-25 11:06:28 +01:00
parent 6820ea7684
commit 139b6eb54d
7 changed files with 44 additions and 26 deletions

View File

@@ -4,7 +4,10 @@ import { BaseSheetL5r5e } from "./base-sheet.js";
* NPC Sheet
*/
export class NpcSheetL5r5e extends BaseSheetL5r5e {
static types = ["minion", "adversary"];
/**
* Sub Types
*/
static types = ["adversary", "minion"];
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
@@ -20,7 +23,10 @@ export class NpcSheetL5r5e extends BaseSheetL5r5e {
getData() {
const sheetData = super.getData();
sheetData.data.types = NpcSheetL5r5e.types;
sheetData.data.types = NpcSheetL5r5e.types.map((e) => ({
id: e,
label: game.i18n.localize("l5r5e.npc.types." + e),
}));
return sheetData;
}

View File

@@ -308,7 +308,7 @@ export class TwentyQuestions {
const exceed = {};
TwentyQuestions[listName].forEach((formName) => {
const id = getProperty(this.data, formName);
if (id === "none") {
if (!id || id === "none") {
return;
}
if (!store[id]) {