#181 Gestion potions (fabrication)

This commit is contained in:
2021-04-10 21:07:53 +02:00
parent 1cea9753a9
commit 1b3c5f524d
9 changed files with 82 additions and 23 deletions

View File

@ -139,6 +139,7 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/enum-categorie-vehicule.html',
'systems/foundryvtt-reve-de-dragon/templates/enum-competence.html',
'systems/foundryvtt-reve-de-dragon/templates/enum-herbesoin-ingredient.html',
'systems/foundryvtt-reve-de-dragon/templates/enum-categorie-potion.html',
'systems/foundryvtt-reve-de-dragon/templates/enum-initpremierround.html',
'systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html',
'systems/foundryvtt-reve-de-dragon/templates/sort-draconic.html',
@ -188,7 +189,8 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-turn-summary.html',
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-competence-xp.html',
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-carac-xp.html',
'systems/foundryvtt-reve-de-dragon/templates/chat-potionenchantee-chateaudormant.html'
'systems/foundryvtt-reve-de-dragon/templates/chat-potionenchantee-chateaudormant.html',
'systems/foundryvtt-reve-de-dragon/templates/chat-fabriquer-potion-base.html'
];
Handlebars.registerHelper('upperFirst', str => Misc.upperFirst(str ?? 'Null'));
@ -201,6 +203,14 @@ export class RdDUtility {
return loadTemplates(templatePaths);
}
/* -------------------------------------------- */
static buildListOptions( min, max ) {
let options = ""
for(let i=min; i<= max; i++) {
options += `<option value="${i}">${i}</option>`
}
return options;
}
/* -------------------------------------------- */
static checkNull(items) {
@ -533,9 +543,6 @@ export class RdDUtility {
}
}
/* -------------------------------------------- */
static async chatListeners(html) {
RdDCombat.registerChatCallbacks(html);