some change on items

This commit is contained in:
Vlyan
2020-12-17 23:01:22 +01:00
parent 889a3d0656
commit efca6cd083
24 changed files with 328 additions and 94 deletions

View File

@@ -128,21 +128,21 @@ export class TwentyQuestionsDialog extends FormApplication {
let data;
try {
data = JSON.parse(event.dataTransfer.getData("text/plain"));
if (data.type !== "Item") return;
const item = game.items.get(data.id);
if (item.data.type !== type) {
if (data.type !== "Item") {
return;
}
const item = game.items.get(data.id);
if (item || item.data.type !== type) {
return;
}
// TODO
console.log("** OK ", item);
// sub_type === 'peculiarity'
} catch (err) {
return false;
console.warn(err);
}
// TODO
return false;
}