-Kuni Warden School Scorpion -> Crab

-Added warn when the property id is unknown
This commit is contained in:
Vlyan
2021-06-25 09:26:29 +02:00
parent 08a3d2cceb
commit d54d8343a2
7 changed files with 12 additions and 6 deletions

View File

@@ -379,6 +379,7 @@ export class TwentyQuestionsDialog extends FormApplication {
}
const item = await game.l5r5e.HelpersL5r5e.getObjectGameOrPack({ id: id, type: "Item" });
if (!item) {
console.warn(`L5R5E | Unknown item id[${id}]`);
continue;
}
newStep.push(id);

View File

@@ -197,6 +197,8 @@ export class HelpersL5r5e {
const gameProp = await HelpersL5r5e.getObjectGameOrPack({ id: property.id, type: "Item" });
if (gameProp) {
return { id: gameProp.id, name: gameProp.name };
} else {
console.warn(`L5R5E | Unknown property id[${property.id}]`);
}
return property;
})

View File

@@ -43,6 +43,8 @@ export class ItemSheetL5r5e extends ItemSheet {
if (gameProp) {
sheetData.data.propertiesList.push(gameProp);
props.push({ id: gameProp.id, name: gameProp.name });
} else {
console.warn(`L5R5E | Unknown property id[${property.id}]`);
}
}
sheetData.data.data.properties = props;