Talents automation + management
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user