Disallow drop on non editable sheet

This commit is contained in:
Vlyan
2021-01-24 14:54:47 +01:00
parent 2c233a37df
commit 740d5cd8a6
4 changed files with 16 additions and 0 deletions

View File

@@ -217,6 +217,11 @@ export class TwentyQuestionsDialog extends FormApplication {
* Handle dropped items
*/
async _onDropItem(type, event) {
// *** Everything below here is only needed if the sheet is editable ***
if (!this.options.editable) {
return;
}
if (!["item", "technique", "peculiarity"].includes(type)) {
return;
}