Amélioration fiche d'item

This commit is contained in:
ZigmundKreud
2021-11-08 14:40:29 +01:00
parent b6ad8a846e
commit 0c24f49470
44 changed files with 1007 additions and 571 deletions

View File

@ -33,12 +33,13 @@ export class BoLUtility {
/* -------------------------------------------- */
static buildListOptions(min, max) {
let options = ""
let options = [];
for (let i = min; i <= max; i++) {
options += `<option value="${i}">${i}</option>`
options.push(`<option value="${i}">${i}</option>`);
}
return options;
return options.join("");
}
/* -------------------------------------------- */
static async showDiceSoNice(roll, rollMode) {
if (game.modules.get("dice-so-nice")?.active) {

View File

@ -19,7 +19,7 @@ BOL.itemCategories = {
"other" : "BOL.itemCategory.other"
}
BOL.equipmentCategory = {
BOL.equipmentCategories = {
"weapon" : "BOL.equipmentCategory.weapon",
"protection" : "BOL.equipmentCategory.protection",
"jewel" : "BOL.equipmentCategory.jewel",
@ -30,20 +30,20 @@ BOL.equipmentCategory = {
"other" : "BOL.equipmentCategory.other"
}
BOL.protectionCategory = {
BOL.protectionCategories = {
"armor" : "BOL.protectionCategory.armor",
"shield" : "BOL.protectionCategory.shield",
"helm" : "BOL.protectionCategory.helm",
"other" : "BOL.protectionCategory.other"
}
BOL.weaponCategory = {
BOL.weaponCategories = {
"melee" : "BOL.weaponCategory.melee",
"ranged" : "BOL.weaponCategory.ranged",
"other" : "BOL.weaponCategory.other"
}
BOL.itemProperty = {
BOL.itemProperties = {
"equipable" : "BOL.itemProperty.equipable",
"protection" : "BOL.itemProperty.protection",
"blocking" : "BOL.itemProperty.blocking",
@ -61,10 +61,10 @@ BOL.itemProperty = {
"ranged" : "BOL.itemProperty.ranged",
"weapon" : "BOL.itemProperty.weapon",
"reloadable" : "BOL.itemProperty.reloadable",
"worn" : "BOL.itemProperty.worn"
"worn" : "BOL.itemProperty.worn",
}
BOL.itemStat = {
BOL.itemStats = {
"quantity" : "BOL.itemStat.quantity",
"weight" : "BOL.itemStat.weight",
"price" : "BOL.itemStat.price",
@ -93,6 +93,15 @@ BOL.itemSoak = {
"value" : "BOL.itemSoak.value"
}
BOL.featureSubtypes = {
"origin" : "BOL.featureSubtypes.origin",
"race" : "BOL.featureSubtypes.race",
"career" : "BOL.featureSubtypes.career",
"boon" : "BOL.featureSubtypes.boon",
"flaw" : "BOL.featureSubtypes.flaw",
"language" : "BOL.featureSubtypes.language"
}
BOL.itemIcons = {
"item": "icons/containers/chest/chest-worn-oak-tan.webp",
"capacity": "icons/sundries/scrolls/scroll-plain-tan-red.webp",

View File

@ -5,8 +5,9 @@ export class BoLRollDialog extends Dialog {
/* -------------------------------------------- */
static async create(actor, rollData ) {
let options = { classes: ["BoL"], width: 600, height: 320, 'z-index': 99999 };
let html = await renderTemplate(`systems/bol/templates/roll/roll-dialog-${rollData.mode}.hbs`, rollData);
let options = { classes: ["bol", "dialog"], width: 600, height: 320, 'z-index': 99999 };
// let html = await renderTemplate(`systems/bol/templates/roll/roll-dialog-${rollData.mode}.hbs`, rollData);
let html = await renderTemplate(`systems/bol/templates/roll/roll-dialog.hbs`, rollData);
return new BoLRollDialog(actor, rollData, html, options );
}

View File

@ -17,10 +17,16 @@ export const preloadHandlebarsTemplates = async function () {
"systems/bol/templates/item/parts/item-header.hbs",
"systems/bol/templates/item/parts/properties/feature-properties.hbs",
"systems/bol/templates/item/parts/properties/equipment-properties.hbs",
"systems/bol/templates/item/parts/properties/protection-properties.hbs",
"systems/bol/templates/item/parts/properties/shield-properties.hbs",
"systems/bol/templates/item/parts/properties/weapon-properties.hbs",
"systems/bol/templates/item/parts/properties/armor-properties.hbs",
"systems/bol/templates/item/parts/properties/melee-properties.hbs",
"systems/bol/templates/item/parts/properties/ranged-properties.hbs",
"systems/bol/templates/item/parts/properties/item-properties.hbs"
"systems/bol/templates/item/parts/properties/item-properties.hbs",
// DIALOGS
"systems/bol/templates/roll/parts/roll-dialog-modifiers.hbs",
"systems/bol/templates/roll/parts/roll-dialog-attribute.hbs"
];
// Load the template parts