v10 branch - Update manifest
This commit is contained in:
@@ -55,20 +55,6 @@ export class SoSUtility {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static data(it) {
|
||||
if (it instanceof Actor || it instanceof Item || it instanceof Combatant) {
|
||||
return it.data;
|
||||
}
|
||||
return it;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static templateData(it) {
|
||||
return SoSUtility.data(it)?.data ?? {}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async loadCompendiumData(compendium) {
|
||||
const pack = game.packs.get(compendium);
|
||||
@@ -411,13 +397,14 @@ export class SoSUtility {
|
||||
/* -------------------------------------------- */
|
||||
static async processItemDropEvent(actorSheet, event) {
|
||||
let dragData = JSON.parse(event.dataTransfer.getData("text/plain"));
|
||||
let dropID = $(event.target).parents(".item").attr("data-item-id"); // Only relevant if container drop
|
||||
let objectID = dragData.id || dragData.data._id;
|
||||
//console.log("drag/drop", dragData, actorSheet.actor._id, dropID, objectID);
|
||||
if (dragData.type == 'Item' && dropID) {
|
||||
actorSheet.actor.addObjectToContainer(objectID, dropID );
|
||||
const item = fromUuidSync(dragData.uuid)
|
||||
let dropId = $(event.target).parents(".item").attr("data-item-id"); // Only relevant if container drop
|
||||
let objectId = item.id
|
||||
console.log("ID", dragData, dropId, objectId)
|
||||
if (dragData.type == 'Item' && dropId) {
|
||||
actorSheet.actor.addObjectToContainer(objectId, dropId );
|
||||
}
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user