Fix init/fight HUD
This commit is contained in:
parent
97f70e6978
commit
8091b5a2e1
@ -7,7 +7,7 @@ export class RdDTokenHud {
|
|||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static addTokenHudExtensions(app, html, data) {
|
static async addTokenHudExtensions(app, html, data) {
|
||||||
let token = canvas.tokens.get(data._id);
|
let token = canvas.tokens.get(data._id);
|
||||||
let actor = token.actor;
|
let actor = token.actor;
|
||||||
let combatant = game.combat.data.combatants.find(c => c.tokenId == token.data._id);
|
let combatant = game.combat.data.combatants.find(c => c.tokenId == token.data._id);
|
||||||
@ -17,10 +17,10 @@ export class RdDTokenHud {
|
|||||||
if (!token.inCombat) return;
|
if (!token.inCombat) return;
|
||||||
if (!combatant) return;
|
if (!combatant) return;
|
||||||
|
|
||||||
const data = { combatant: combatant, armes: RdDTokenHud.buildListeActionsCombat(combatant) };
|
const dataUp = { combatant: combatant, armes: RdDTokenHud.buildListeActionsCombat(combatant) };
|
||||||
|
|
||||||
// initiative
|
// initiative
|
||||||
await RdDTokenHud._configureSubMenu(html.find('.control-icon.combat'), 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', data,
|
await RdDTokenHud._configureSubMenu(html.find('.control-icon.combat'), 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', dataUp,
|
||||||
(event) => {
|
(event) => {
|
||||||
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
||||||
let combatantId = event.currentTarget.attributes['data-combatant-id'].value;
|
let combatantId = event.currentTarget.attributes['data-combatant-id'].value;
|
||||||
@ -29,7 +29,7 @@ export class RdDTokenHud {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// combat
|
// combat
|
||||||
await RdDTokenHud._configureSubMenu(html.find('.control-icon.target'), 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html', data,
|
await RdDTokenHud._configureSubMenu(html.find('.control-icon.target'), 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html', dataUp,
|
||||||
(event) => {
|
(event) => {
|
||||||
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
||||||
let arme = armesList[armeIndex];
|
let arme = armesList[armeIndex];
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "foundryvtt-reve-de-dragon",
|
"name": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"description": "Rêve de Dragon RPG for FoundryVTT",
|
"description": "Rêve de Dragon RPG for FoundryVTT",
|
||||||
"version": "1.1.15",
|
"version": "1.1.16",
|
||||||
"minimumCoreVersion": "0.7.5",
|
"minimumCoreVersion": "0.7.5",
|
||||||
"compatibleCoreVersion": "0.7.8",
|
"compatibleCoreVersion": "0.7.8",
|
||||||
"templateVersion": 72,
|
"templateVersion": 72,
|
||||||
|
Loading…
Reference in New Issue
Block a user