Correction sur creation oeuvre

This commit is contained in:
sladecraven 2021-06-07 23:18:33 +02:00
parent 0a92be0942
commit af4c9c138c
3 changed files with 25 additions and 3 deletions

View File

@ -220,7 +220,7 @@ export class RdDActorSheet extends ActorSheet {
RdDUtility.selectObjetType( this ); RdDUtility.selectObjetType( this );
}); });
html.find('.creer-une-oeuvre').click(async event => { html.find('.creer-une-oeuvre').click(async event => {
this.selectTypeOeuvre(); RdDUtility.selectTypeOeuvre(this);
}); });
html.find('#nettoyer-conteneurs').click(async event => { html.find('#nettoyer-conteneurs').click(async event => {
this.actor.nettoyerConteneurs(); this.actor.nettoyerConteneurs();

View File

@ -285,7 +285,29 @@ export class RdDUtility {
}); });
d.render(true); d.render(true);
} }
/* -------------------------------------------- */
static async selectTypeOeuvre( actorSheet) {
let typeObjets = RdDItem.getTypesOeuvres();
let options = `<span class="competence-label">Selectionnez le type d'oeuvre</span><select class="item-type">`;
for (let typeName of typeObjets) {
options += `<option value="${typeName}">${typeName}</option>`
}
options += '</select>';
let d = new Dialog({
title: "Créer un équipement",
content: options,
buttons: {
one: {
icon: '<i class="fas fa-check"></i>',
label: "Créer l'objet",
callback: () => this.creerObjet(actorSheet)
}
}
});
d.render(true);
}
/* -------------------------------------------- */ /* -------------------------------------------- */
static buildListOptions(min, max) { static buildListOptions(min, max) {
let options = "" let options = ""

View File

@ -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.4.27", "version": "1.4.28",
"manifestPlusVersion": "1.0.0", "manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.8.0", "minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "0.8.99", "compatibleCoreVersion": "0.8.99",