Preparation du passage en v12

This commit is contained in:
2024-05-05 18:06:29 +02:00
parent fac158e0ad
commit 8af9c582bf
121 changed files with 440 additions and 424 deletions

View File

@ -114,6 +114,26 @@ export class HawkmoonUtility {
let logoPause = "systems/fvtt-hawkmoon-cyd/assets/logos/" + game.settings.get("fvtt-hawkmoon-cyd", "hawkmoon-pause-logo") + ".webp"
let logoImg = document.querySelector('#pause').children[0]
logoImg.setAttribute('style', `content: url(${logoPause})`)
game.system.hawkmoon.config.listeNiveauSkill = this.createDirectOptionList(0, 10)
game.system.hawkmoon.config.listeNiveauCreature = this.createDirectOptionList(0, 35)
game.system.hawkmoon.config.listeNiveauContact = this.createDirectOptionList(1, 3)
}
/* -------------------------------------------- */
static createDirectOptionList(min, max) {
let options = {};
for (let i = min; i <= max; i++) {
options[`${i}`] = `${i}`;
}
return options;
}
static createArrayOptionList(min, max) {
let options = [];
for (let i = min; i <= max; i++) {
options.push({key:`${i}`, label:`${i}`});
}
return options;
}
/* -------------------------------------------- */
@ -172,10 +192,7 @@ export class HawkmoonUtility {
'systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-list-niveau-creature.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-sante-etat.html',
'systems/fvtt-hawkmoon-cyd/templates/partial-automation.html',
'systems/fvtt-hawkmoon-cyd/templates/hud-adversites.html',
]
@ -611,7 +628,7 @@ export class HawkmoonUtility {
/* -------------------------------------------- */
static getBasicRollData() {
let rollData = {
rollId: randomID(16),
rollId: foundry.utils.randomID(16),
rollMode: game.settings.get("core", "rollMode"),
modificateursOptions: this.getModificateurOptions(),
pointAmeOptions: this.getPointAmeOptions(),