Ajout zone libre, macros et tirage de carte

This commit is contained in:
2023-02-26 15:38:44 +01:00
parent b2a9d8cb75
commit cb8e70c6c1
13 changed files with 78 additions and 34 deletions

View File

@ -7,7 +7,7 @@ export class MaleficesUtility {
/* -------------------------------------------- */
static async init() {
static async ready() {
Hooks.on('renderChatLog', (log, html, data) => MaleficesUtility.chatListeners(html));
/*Hooks.on("dropCanvasData", (canvas, data) => {
MaleficesUtility.dropItemOnToken(canvas, data)
@ -51,6 +51,10 @@ export class MaleficesUtility {
default: { npcList: [], x: 200, y: 200 },
type: Object
})
const tarots = await MaleficesUtility.loadCompendium("fvtt-malefices.malefices-tarots")
this.tarots = tarots.map(i => i.toObject())
}
/*-------------------------------------------- */
@ -67,13 +71,6 @@ export class MaleficesUtility {
return this.tarots.find(t => t._id == tId)
}
/* -------------------------------------------- */
static async ready() {
const tarots = await MaleficesUtility.loadCompendium("fvtt-malefices.malefices-tarots")
this.tarots = tarots.map(i => i.toObject())
}
/* -------------------------------------------- */
static async loadCompendiumData(compendium) {
const pack = game.packs.get(compendium)