fix: aligner le JS avec l'API Foundry v14
- effects.mjs: remove e._getSourceName() (removed in v14, now a getter) - fight.mjs: convert VermineCombatTracker from AppV1 (get template/getData) to AppV2 PARTS + _prepareContext/_prepareTurnContext - fight.mjs: VermineCombat.rollInitiative v14 options-object signature - hooks.mjs: renderPause -> renderGamePause; getSceneControlButtons now uses controls.tokens and tools record (v14 names/structure) - roll.mjs: ChatMessage.create uses rolls array (v14 removed 'roll' key) - item.mjs: getRollData returns system when no actor (v14 expects object) - vermine2047.mjs: correct unregisterSheet API for ActorSheetV2 - base-item-sheet.mjs: call super._onRender
This commit is contained in:
@@ -69,8 +69,8 @@ export const registerHooks = function () {
|
||||
});
|
||||
|
||||
// changement de la pause
|
||||
Hooks.on("renderPause", async function () {
|
||||
const pauseEl = document.getElementById("pause");
|
||||
Hooks.on("renderGamePause", async function (element) {
|
||||
const pauseEl = element ?? document.getElementById("pause");
|
||||
if (!pauseEl || pauseEl.className !== "paused") return;
|
||||
pauseEl.querySelectorAll("img").forEach(img => {
|
||||
img.src = 'systems/vermine2047/assets/images/ui/vermine_pause.webp';
|
||||
@@ -94,9 +94,9 @@ export const registerHooks = function () {
|
||||
});
|
||||
|
||||
Hooks.on('getSceneControlButtons', async (controls) => {
|
||||
const tokenControls = controls.token;
|
||||
const tokenControls = controls.tokens;
|
||||
if (tokenControls && tokenControls.tools) {
|
||||
tokenControls.tools.push({
|
||||
tokenControls.tools['dice-roller'] = {
|
||||
name: 'Dice Roller',
|
||||
title: game.i18n.localize("VERMINE.RollTool"),
|
||||
icon: 'fas fa-dice-d10',
|
||||
@@ -104,7 +104,7 @@ export const registerHooks = function () {
|
||||
onClick() {
|
||||
RollDialog.create().then(d => d.render(true));
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user