diff --git a/changelog.md b/changelog.md index a7f00ec..421b4f9 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ # Changelog ## 3.1.x folders +## 3.1.7 anyOf fix +- fix drop items on anyOf as player. ## 3.1.6 v11 fixes - fix chat message - fix close RecipeCompendium diff --git a/module.json b/module.json index 452673b..352623d 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "title": "Beaver's Crafting Module", "description": "A Crafting Module for DnD", "id": "beavers-crafting", - "version": "3.1.6", + "version": "3.1.7", "authors": [ { "name": "angryBeaver", diff --git a/package.json b/package.json index 450a67e..ed892eb 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "beavers-crafting", "title": "Beaver's Crafting", - "version": "3.1.6", + "version": "3.1.7", "description": "Crafting", - "devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules", - "#devDir": "C:\\data\\Data\\modules", + "#devDir": "C:\\Users\\Riess\\AppData\\Local\\FoundryVTT\\Data\\modules", + "devDir": "C:\\data\\Data\\modules", "main": "src/main.js", "scripts": { "build": "npx gulp", diff --git a/src/apps/CraftingApp.ts b/src/apps/CraftingApp.ts index 05c570a..fcfcd84 100644 --- a/src/apps/CraftingApp.ts +++ b/src/apps/CraftingApp.ts @@ -200,8 +200,11 @@ export class CraftingApp extends Application { drop: this._onDrop.bind(this) } }); - if(this._dragDrop.length > 1){ - this._dragDrop.pop(); + for(const x in this._dragDrop){ + if(this._dragDrop[x].dropSelector === dropFilter.dropSelector){ + this._dragDrop[x].bind(html[0]); + return; + } } this._dragDrop.push(dropFilter); dropFilter.bind(html[0]); @@ -229,7 +232,7 @@ export class CraftingApp extends Application { } async _onDropAnyOf(anyOf:AnyOf, key:string, e:DragEvent) { - if (this.data.recipe === undefined){ + if (this.data.recipe === undefined || e["isHandled"] ){ return; } const data = getDataFrom(e); @@ -256,7 +259,8 @@ export class CraftingApp extends Application { }) ); this.data.recipe.ingredients = ingredients; - void this.renderRecipeSheet(); + e["isHandled"] = true; + window.setTimeout(this.renderRecipeSheet.bind(this),100); } } @@ -293,6 +297,10 @@ export class CraftingApp extends Application { } return preCastData; } + + protected _canDragDrop(selector: string): boolean { + return true; + } }