-Kuni Warden School Scorpion -> Crab
-Added warn when the property id is unknown
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
})
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user