/* -------------------------------------------- */ import { RdDUtility } from "./rdd-utility.js"; /* -------------------------------------------- */ export class RdDTokenHud { /* -------------------------------------------- */ static addTokenHudExtensions( app, html, data ) { let token = canvas.tokens.get(data._id); // Affichage seulement si le token est un combat if ( token.inCombat) { this.addInitiativeTokenTip(html, token); } } /* -------------------------------------------- */ static async addInitiativeTokenTip(html, token ) { // Helper actor and sanity check let actor = token.actor; if (actor === undefined) return; // Get combatant stuff let combatant = game.combat.data.combatants.find(c => c.tokenId == token.data._id ); if ( combatant ) { console.log("Token !!!", combatant); // Create space for Hud Extensions next to combat icon let divTokenHudExt = '