Talents automation + management

This commit is contained in:
2022-10-28 21:44:49 +02:00
parent e4d7ff4ca3
commit 6551a93791
14 changed files with 453 additions and 89 deletions

View File

@@ -4,7 +4,7 @@
*/
import { HawkmoonUtility } from "./hawkmoon-utility.js";
import { HawkmoonRollDialog } from "./hawkmoon-roll-dialog.js";
import { HawkmoonAutomation } from "./hawkmoon-automation.js";
/* -------------------------------------------- */
export class HawkmoonActorSheet extends ActorSheet {
@@ -149,11 +149,18 @@ export class HawkmoonActorSheet extends ActorSheet {
}
/* -------------------------------------------- */
/*async _onDropItem(event, dragData) {
let item = await HawkmoonUtility.searchItem( dragData)
this.actor.preprocessItem( event, item, true )
super._onDropItem(event, dragData)
}*/
async _onDropItem(event, dragData) {
let data = event.dataTransfer.getData('text/plain')
let dataItem = JSON.parse( data)
let item = fromUuidSync(dataItem.uuid)
if (item.pack) {
item = await HawkmoonUtility.searchItem(item)
}
let autoresult = HawkmoonAutomation.processAutomations("on-drop", item, this.actor)
if ( autoresult.isValid ) {
super._onDropItem(event, dragData)
}
}
/* -------------------------------------------- */
/** @override */