10.6.2 #611
@ -18,7 +18,7 @@ import { RdDItemArme } from "./item-arme.js";
|
|||||||
import { RdDAlchimie } from "./rdd-alchimie.js";
|
import { RdDAlchimie } from "./rdd-alchimie.js";
|
||||||
import { STATUSES, StatusEffects } from "./settings/status-effects.js";
|
import { STATUSES, StatusEffects } from "./settings/status-effects.js";
|
||||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||||
import { RdDItemSigneDraconique } from "./item/item-signedraconique.js";
|
import { RdDItemSigneDraconique } from "./item/signedraconique.js";
|
||||||
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
||||||
import { EffetsDraconiques } from "./tmr/effets-draconiques.js";
|
import { EffetsDraconiques } from "./tmr/effets-draconiques.js";
|
||||||
import { Draconique } from "./tmr/draconique.js";
|
import { Draconique } from "./tmr/draconique.js";
|
||||||
@ -30,7 +30,7 @@ import { RdDPossession } from "./rdd-possession.js";
|
|||||||
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, SHOW_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, SHOW_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||||
import { RdDConfirm } from "./rdd-confirm.js";
|
import { RdDConfirm } from "./rdd-confirm.js";
|
||||||
import { DialogValidationEncaissement } from "./dialog-validation-encaissement.js";
|
import { DialogValidationEncaissement } from "./dialog-validation-encaissement.js";
|
||||||
import { RdDRencontre } from "./item/item-rencontre.js";
|
import { RdDRencontre } from "./item/rencontre.js";
|
||||||
import { Targets } from "./targets.js";
|
import { Targets } from "./targets.js";
|
||||||
import { DialogRepos } from "./dialog-repos.js";
|
import { DialogRepos } from "./dialog-repos.js";
|
||||||
import { RdDBaseActor } from "./actor/base-actor.js";
|
import { RdDBaseActor } from "./actor/base-actor.js";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ChatUtility } from "./chat-utility.js";
|
import { ChatUtility } from "./chat-utility.js";
|
||||||
import { HtmlUtility } from "./html-utility.js";
|
import { HtmlUtility } from "./html-utility.js";
|
||||||
import { RdDItemSigneDraconique } from "./item/item-signedraconique.js";
|
import { RdDItemSigneDraconique } from "./item/signedraconique.js";
|
||||||
import { TMRUtility } from "./tmr-utility.js";
|
import { TMRUtility } from "./tmr-utility.js";
|
||||||
|
|
||||||
export class DialogCreateSigneDraconique extends Dialog {
|
export class DialogCreateSigneDraconique extends Dialog {
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
import { SYSTEM_RDD } from "./constants.js";
|
import { SYSTEM_RDD } from "./constants.js";
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
import { HtmlUtility } from "./html-utility.js";
|
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
import { CompendiumTableHelpers, CompendiumTable, SystemCompendiums } from "./settings/system-compendiums.js";
|
import { CompendiumTableHelpers, CompendiumTable, SystemCompendiums } from "./settings/system-compendiums.js";
|
||||||
import { RdDRaretes } from "./tirage/raretes.js";
|
|
||||||
|
|
||||||
|
|
||||||
const COMPENDIUMS_RECHERCHE = 'compendiums-recherche';
|
const COMPENDIUMS_RECHERCHE = 'compendiums-recherche';
|
||||||
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
|
||||||
|
|
||||||
export class Environnement {
|
export class Environnement {
|
||||||
static init() {
|
static init() {
|
||||||
@ -46,7 +43,8 @@ export class Environnement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async $prepareCompendiums() {
|
async $prepareCompendiums() {
|
||||||
this.compendiums = game.settings.get(SYSTEM_RDD, COMPENDIUMS_RECHERCHE);
|
this.compendiums = game.settings.get(SYSTEM_RDD, COMPENDIUMS_RECHERCHE).filter(c => SystemCompendiums.getPack(c));
|
||||||
|
|
||||||
this.compendiumTables = this.compendiums.map(it => new CompendiumTable(it, 'Item'));
|
this.compendiumTables = this.compendiums.map(it => new CompendiumTable(it, 'Item'));
|
||||||
const compendiumItems = await this.getElements(it => 1, it => it.isInventaire());
|
const compendiumItems = await this.getElements(it => 1, it => it.isInventaire());
|
||||||
const fromCompendiums = Misc.concat(compendiumItems.map(it => it.getMilieux().filter(m => m)));
|
const fromCompendiums = Misc.concat(compendiumItems.map(it => it.getMilieux().filter(m => m)));
|
||||||
@ -75,99 +73,3 @@ export class Environnement {
|
|||||||
return CompendiumTableHelpers.buildTable(elements, itemFrequence);
|
return CompendiumTableHelpers.buildTable(elements, itemFrequence);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class EnvironmentSheetHelper {
|
|
||||||
static defaultOptions(defaultOptions) {
|
|
||||||
return mergeObject(defaultOptions, {
|
|
||||||
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static setPosition(sheet, superPosition) {
|
|
||||||
const position = superPosition;
|
|
||||||
const sheetHeader = sheet.element.find(".sheet-header");
|
|
||||||
const sheetBody = sheet.element.find(".sheet-body");
|
|
||||||
sheetBody.css("height", position.height - sheetHeader[0].clientHeight)
|
|
||||||
return position;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
static async getData(sheet, formData) {
|
|
||||||
return mergeObject(formData, {
|
|
||||||
milieux: await game.system.rdd.environnement.autresMilieux(sheet.item)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static activateListeners(sheet) {
|
|
||||||
HtmlUtility.showControlWhen(sheet.html.find("div.description-milieu"), TYPE_ITEMS_NATURELS.includes(sheet.item.type));
|
|
||||||
|
|
||||||
if (!sheet.options.editable) return;
|
|
||||||
|
|
||||||
sheet.html.find("input.input-selection-milieu").keypress(event => {
|
|
||||||
if (event.keyCode == '13') {
|
|
||||||
EnvironmentSheetHelper.onAddMilieu(sheet, event);
|
|
||||||
}
|
|
||||||
event.stopPropagation();
|
|
||||||
})
|
|
||||||
sheet.html.find("a.milieu-add").click(event => EnvironmentSheetHelper.onAddMilieu(sheet, event));
|
|
||||||
sheet.html.find("div.environnement-milieu a.milieu-delete").click(event => EnvironmentSheetHelper.onDeleteMilieu(sheet, event));
|
|
||||||
sheet.html.find("div.environnement-milieu select.environnement-rarete").change(event => EnvironmentSheetHelper.onChange(sheet, event,
|
|
||||||
updated => EnvironmentSheetHelper.$changeRarete(sheet, event, updated)));
|
|
||||||
sheet.html.find("div.environnement-milieu input[name='environnement-frequence']").change(event => EnvironmentSheetHelper.onChange(sheet, event,
|
|
||||||
updated => EnvironmentSheetHelper.$changeFrequence(sheet, event, updated)));
|
|
||||||
}
|
|
||||||
|
|
||||||
static $changeFrequence(sheet, event, updated) {
|
|
||||||
updated.frequence = Number(sheet.html.find(event.currentTarget).val());
|
|
||||||
}
|
|
||||||
|
|
||||||
static $changeRarete(sheet, event, updated) {
|
|
||||||
const name = sheet.html.find(event.currentTarget).val();
|
|
||||||
const rarete = RdDRaretes.getRarete(name);
|
|
||||||
updated.rarete = rarete.code;
|
|
||||||
updated.frequence = rarete.frequence;
|
|
||||||
}
|
|
||||||
|
|
||||||
static async onAddMilieu(sheet, event) {
|
|
||||||
const milieu = sheet.html.find('input.input-selection-milieu').val();
|
|
||||||
if (!milieu) {
|
|
||||||
ui.notifications.warn(`Choisissez le milieu dans lequel se trouve le/la ${sheet.item.name}`);
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const list = sheet.item.system.environnement;
|
|
||||||
const exists = list.find(it => it.milieu == milieu);
|
|
||||||
if (exists) {
|
|
||||||
ui.notifications.warn(`${sheet.item.name} a déjà une rareté ${exists.rarete} en ${milieu} (fréquence: ${exists.frequence})`);
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const rarete = RdDRaretes.getRarete();
|
|
||||||
const newList = [...list, { milieu, rarete: rarete.code, frequence: rarete.frequence }].sort(Misc.ascending(it => it.milieu))
|
|
||||||
await sheet.item.update({ 'system.environnement': newList })
|
|
||||||
}
|
|
||||||
|
|
||||||
static async onDeleteMilieu(sheet, event) {
|
|
||||||
const milieu = EnvironmentSheetHelper.$getEventMilieu(sheet, event);
|
|
||||||
if (milieu != undefined) {
|
|
||||||
const newList = sheet.item.system.environnement.filter(it => it.milieu != milieu)
|
|
||||||
.sort(Misc.ascending(it => it.milieu));
|
|
||||||
await sheet.item.update({ 'system.environnement': newList });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static async onChange(sheet, event, doMutation) {
|
|
||||||
const list = sheet.item.system.environnement;
|
|
||||||
const milieu = EnvironmentSheetHelper.$getEventMilieu(sheet, event);
|
|
||||||
const updated = list.find(it => it.milieu == milieu);
|
|
||||||
if (updated) {
|
|
||||||
doMutation(updated);
|
|
||||||
const newList = [...list.filter(it => it.milieu != milieu), updated]
|
|
||||||
.sort(Misc.ascending(it => it.milieu));
|
|
||||||
await sheet.item.update({ 'system.environnement': newList });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static $getEventMilieu(sheet, event) {
|
|
||||||
return sheet.html.find(event.currentTarget)?.parents("div.environnement-milieu").data("milieu");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"
|
import { RdDItemCompetenceCreature } from "./item-competencecreature.js"
|
||||||
import { Misc } from "./misc.js";
|
|
||||||
import { RdDCombatManager } from "./rdd-combat.js";
|
import { RdDCombatManager } from "./rdd-combat.js";
|
||||||
|
|
||||||
const nomCategorieParade = {
|
const nomCategorieParade = {
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
import { EnvironmentSheetHelper } from "./environnement.js";
|
|
||||||
import { RdDItemSheet } from "./item-sheet.js";
|
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
|
||||||
|
|
||||||
export class RdDFauneItemSheet extends RdDItemSheet {
|
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "faune" };
|
|
||||||
|
|
||||||
static get defaultOptions() {
|
|
||||||
return EnvironmentSheetHelper.defaultOptions(super.defaultOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
setPosition(options = {}) {
|
|
||||||
return EnvironmentSheetHelper.setPosition(this, super.setPosition(options));
|
|
||||||
}
|
|
||||||
|
|
||||||
async getData() {
|
|
||||||
const formData = await super.getData();
|
|
||||||
return await EnvironmentSheetHelper.getData(this, formData);
|
|
||||||
}
|
|
||||||
|
|
||||||
activateListeners(html) {
|
|
||||||
super.activateListeners(html);
|
|
||||||
if (!this.options.editable) return;
|
|
||||||
|
|
||||||
EnvironmentSheetHelper.activateListeners(this);
|
|
||||||
|
|
||||||
html.find("a.linked-actor-delete").click(event => this.onDeleteLinkedActor());
|
|
||||||
html.find("a.preparer-nourriture").click(event => this.preparerNourriture(event));
|
|
||||||
html.find("a.manger-nourriture").click(event => this.mangerNourriture(event));
|
|
||||||
}
|
|
||||||
|
|
||||||
async _onDropActor(event, dragData) {
|
|
||||||
console.log('faune:dropActor', event, dragData)
|
|
||||||
const linkedActor = fromUuidSync(dragData.uuid);
|
|
||||||
if (linkedActor?.pack) {
|
|
||||||
this.item.update({
|
|
||||||
'system.actor.pack': linkedActor.pack,
|
|
||||||
'system.actor.id': linkedActor._id,
|
|
||||||
'system.actor.name': linkedActor.name
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ui.notifications.warn(`${linkedActor.name} ne provient pas d'un compendium.
|
|
||||||
<br>Choisissez une créature du compendium pour représenter un élément de faune générique`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async onDeleteLinkedActor() {
|
|
||||||
this.item.update({
|
|
||||||
'system.actor.pack': '',
|
|
||||||
'system.actor.id': '',
|
|
||||||
'system.actor.name': ''
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async preparerNourriture(event) {
|
|
||||||
if (this.actor) {
|
|
||||||
await this.actor.preparerNourriture(this.item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async mangerNourriture(event) {
|
|
||||||
if (this.actor) {
|
|
||||||
await this.actor.mangerNourriture(this.item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { EnvironmentSheetHelper } from "./environnement.js";
|
|
||||||
import { RdDItemSheet } from "./item-sheet.js";
|
|
||||||
|
|
||||||
export class RdDHerbeItemSheet extends RdDItemSheet {
|
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "herbe" };
|
|
||||||
|
|
||||||
static get defaultOptions() {
|
|
||||||
return EnvironmentSheetHelper.defaultOptions(super.defaultOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
setPosition(options = {}) {
|
|
||||||
return EnvironmentSheetHelper.setPosition(this, super.setPosition(options));
|
|
||||||
}
|
|
||||||
|
|
||||||
async getData() {
|
|
||||||
const formData = await super.getData();
|
|
||||||
return await EnvironmentSheetHelper.getData(this, formData);
|
|
||||||
}
|
|
||||||
|
|
||||||
activateListeners(html) {
|
|
||||||
super.activateListeners(html);
|
|
||||||
EnvironmentSheetHelper.activateListeners(this);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { EnvironmentSheetHelper } from "./environnement.js";
|
|
||||||
import { RdDItemSheet } from "./item-sheet.js";
|
|
||||||
|
|
||||||
export class RdDIngredientItemSheet extends RdDItemSheet {
|
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "ingredient" };
|
|
||||||
|
|
||||||
static get defaultOptions() {
|
|
||||||
return EnvironmentSheetHelper.defaultOptions(super.defaultOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
setPosition(options = {}) {
|
|
||||||
return EnvironmentSheetHelper.setPosition(this, super.setPosition(options));
|
|
||||||
}
|
|
||||||
|
|
||||||
async getData() {
|
|
||||||
const formData = await super.getData();
|
|
||||||
return await EnvironmentSheetHelper.getData(this, formData);
|
|
||||||
}
|
|
||||||
|
|
||||||
activateListeners(html) {
|
|
||||||
super.activateListeners(html);
|
|
||||||
EnvironmentSheetHelper.activateListeners(this);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { EnvironmentSheetHelper } from "./environnement.js";
|
|
||||||
import { RdDItemSheet } from "./item-sheet.js";
|
|
||||||
|
|
||||||
export class RdDPlanteItemSheet extends RdDItemSheet {
|
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "plante" };
|
|
||||||
|
|
||||||
static get defaultOptions() {
|
|
||||||
return EnvironmentSheetHelper.defaultOptions(super.defaultOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
setPosition(options = {}) {
|
|
||||||
return EnvironmentSheetHelper.setPosition(this, super.setPosition(options));
|
|
||||||
}
|
|
||||||
|
|
||||||
async getData() {
|
|
||||||
const formData = await super.getData();
|
|
||||||
return await EnvironmentSheetHelper.getData(this, formData);
|
|
||||||
}
|
|
||||||
|
|
||||||
activateListeners(html) {
|
|
||||||
super.activateListeners(html);
|
|
||||||
EnvironmentSheetHelper.activateListeners(this);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +1,11 @@
|
|||||||
import { DialogItemVente } from "./dialog-item-vente.js";
|
import { DialogItemVente } from "./dialog-item-vente.js";
|
||||||
import { Environnement } from "./environnement.js";
|
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
import { RdDHerbes } from "./rdd-herbes.js";
|
import { RdDHerbes } from "./rdd-herbes.js";
|
||||||
import { RdDTimestamp } from "./rdd-timestamp.js";
|
import { RdDTimestamp } from "./rdd-timestamp.js";
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
||||||
import { RdDRaretes } from "./tirage/raretes.js";
|
import { RdDRaretes } from "./item/raretes.js";
|
||||||
|
|
||||||
const typesInventaireMateriel = [
|
const typesInventaireMateriel = [
|
||||||
"arme",
|
"arme",
|
||||||
@ -493,7 +492,7 @@ export class RdDItem extends Item {
|
|||||||
return [false, `Impossible de regrouper ${this.name} avec ${other.name}`];
|
return [false, `Impossible de regrouper ${this.name} avec ${other.name}`];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const excludedProperties = ['quantite', 'cout', 'encTotal', 'environnement'];
|
const excludedProperties = ['quantite', 'cout', 'encTotal', 'environnement', 'contenu'];
|
||||||
if (this.getUtilisationCuisine()) {
|
if (this.getUtilisationCuisine()) {
|
||||||
excludedProperties.push('sust', 'encombrement');
|
excludedProperties.push('sust', 'encombrement');
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,12 @@ const RARETES = [
|
|||||||
|
|
||||||
export class RdDRaretes {
|
export class RdDRaretes {
|
||||||
|
|
||||||
static getRarete(code = undefined) {
|
static getRareteByCode(code = undefined) {
|
||||||
return RARETES.find(it => it.code == code) ?? RARETE_FREQUENTE;
|
return RARETES.find(it => it.code == code) ?? RARETE_FREQUENTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static getChamp(rarete, field = undefined) {
|
static getChamp(rarete, field = undefined) {
|
||||||
const selected = this.getRarete(rarete);
|
const selected = this.getRareteByCode(rarete);
|
||||||
return field ? selected[field] : selected[frequence];
|
return field ? selected[field] : selected[frequence];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ export class RdDRaretes {
|
|||||||
const freqMax = Math.max(0, ...list.map(env => env.frequence));
|
const freqMax = Math.max(0, ...list.map(env => env.frequence));
|
||||||
const env = list.find(env => env.frequence == freqMax);
|
const env = list.find(env => env.frequence == freqMax);
|
||||||
if (env) {
|
if (env) {
|
||||||
return RdDRaretes.getRarete(env.rarete)
|
return RdDRaretes.getRareteByCode(env.rarete)
|
||||||
}
|
}
|
||||||
if (milieux == undefined) {
|
if (milieux == undefined) {
|
||||||
return RdDRaretes.selonQualite(item)
|
return RdDRaretes.selonQualite(item)
|
119
module/item/sheet-base-inventaire.js
Normal file
119
module/item/sheet-base-inventaire.js
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
import { HtmlUtility } from "../html-utility.js";
|
||||||
|
import { RdDItemSheet } from "../item-sheet.js";
|
||||||
|
import { Misc } from "../misc.js";
|
||||||
|
import { RdDRaretes } from "./raretes.js";
|
||||||
|
|
||||||
|
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
|
||||||
|
|
||||||
|
export class RdDItemInventaireSheet extends RdDItemSheet {
|
||||||
|
|
||||||
|
static get defaultOptions() {
|
||||||
|
return mergeObject(RdDItemSheet.defaultOptions, {
|
||||||
|
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
setPosition(options = {}) {
|
||||||
|
const position = super.setPosition(options);
|
||||||
|
const sheetHeader = this.element.find(".sheet-header");
|
||||||
|
const sheetBody = this.element.find(".sheet-body");
|
||||||
|
sheetBody.css("height", position.height - sheetHeader[0].clientHeight)
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
async getData() {
|
||||||
|
const formData = await super.getData();
|
||||||
|
return mergeObject(formData, {
|
||||||
|
milieux: await game.system.rdd.environnement.autresMilieux(this.item)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
HtmlUtility.showControlWhen(this.html.find("div.description-milieu"), TYPE_ITEMS_NATURELS.includes(this.item.type));
|
||||||
|
|
||||||
|
if (!this.options.editable) return;
|
||||||
|
this.html.find("a.preparer-nourriture").click(event => this.preparerNourriture(event));
|
||||||
|
this.html.find("a.manger-nourriture").click(event => this.mangerNourriture(event));
|
||||||
|
|
||||||
|
this.html.find("input.input-selection-milieu").keypress(event => {
|
||||||
|
if (event.keyCode == '13') {
|
||||||
|
this.onAddMilieu(event);
|
||||||
|
}
|
||||||
|
event.stopPropagation();
|
||||||
|
})
|
||||||
|
this.html.find("a.milieu-add").click(event => this.onAddMilieu(event));
|
||||||
|
this.html.find("div.environnement-milieu a.milieu-delete").click(event => this.onDeleteMilieu(event));
|
||||||
|
this.html.find("div.environnement-milieu select.environnement-rarete").change(event => this.onChange(event,
|
||||||
|
updated => this.$changeRarete(event, updated)));
|
||||||
|
this.html.find("div.environnement-milieu input[name='environnement-frequence']").change(event => this.onChange(event,
|
||||||
|
updated => this.$changeFrequence(event, updated)));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async preparerNourriture(event) {
|
||||||
|
if (this.actor && this.item.getUtilisationCuisine() == 'brut') {
|
||||||
|
await this.actor.preparerNourriture(this.item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async mangerNourriture(event) {
|
||||||
|
if (this.actor && this.item.getUtilisation() == 'cuisine') {
|
||||||
|
await this.actor.mangerNourriture(this.item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$changeFrequence(event, updated) {
|
||||||
|
updated.frequence = Number(this.html.find(event.currentTarget).val());
|
||||||
|
}
|
||||||
|
|
||||||
|
$changeRarete(event, updated) {
|
||||||
|
const code = this.html.find(event.currentTarget).val();
|
||||||
|
const rarete = RdDRaretes.getRareteByCode(code);
|
||||||
|
updated.rarete = rarete.code;
|
||||||
|
updated.frequence = rarete.frequence;
|
||||||
|
}
|
||||||
|
|
||||||
|
async onAddMilieu(event) {
|
||||||
|
const milieu = this.html.find('input.input-selection-milieu').val();
|
||||||
|
if (!milieu) {
|
||||||
|
ui.notifications.warn(`Choisissez le milieu dans lequel se trouve le/la ${this.item.name}`);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const list = this.item.getEnvironnement();
|
||||||
|
const exists = list.find(it => it.milieu == milieu);
|
||||||
|
if (exists) {
|
||||||
|
ui.notifications.warn(`${this.item.name} a déjà une rareté ${exists.rarete} en ${milieu} (fréquence: ${exists.frequence})`);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const rarete = RdDRaretes.rareteFrequente();
|
||||||
|
const newList = [...list, { milieu, rarete: rarete.code, frequence: rarete.frequence }].sort(Misc.ascending(it => it.milieu))
|
||||||
|
await this.item.update({ 'system.environnement': newList })
|
||||||
|
}
|
||||||
|
|
||||||
|
async onDeleteMilieu(event) {
|
||||||
|
const milieu = this.$getEventMilieu(event);
|
||||||
|
if (milieu != undefined) {
|
||||||
|
const newList = this.item.getEnvironnement().filter(it => it.milieu != milieu)
|
||||||
|
.sort(Misc.ascending(it => it.milieu));
|
||||||
|
await this.item.update({ 'system.environnement': newList });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async onChange(event, doMutation) {
|
||||||
|
const list = this.item.system.environnement;
|
||||||
|
const milieu = this.$getEventMilieu(event);
|
||||||
|
const updated = list.find(it => it.milieu == milieu);
|
||||||
|
if (updated) {
|
||||||
|
doMutation(updated);
|
||||||
|
const newList = [...list.filter(it => it.milieu != milieu), updated]
|
||||||
|
.sort(Misc.ascending(it => it.milieu));
|
||||||
|
await this.item.update({ 'system.environnement': newList });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$getEventMilieu(event) {
|
||||||
|
return this.html.find(event.currentTarget)?.parents("div.environnement-milieu").data("milieu");
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +1,9 @@
|
|||||||
import { RdDBaseActorSheet } from "./actor/base-actor-sheet.js";
|
import { RdDBaseActorSheet } from "../actor/base-actor-sheet.js";
|
||||||
import { RdDItemSheet } from "./item-sheet.js";
|
import { RdDSheetUtility } from "../rdd-sheet-utility.js";
|
||||||
import { RdDSheetUtility } from "./rdd-sheet-utility.js";
|
import { RdDUtility } from "../rdd-utility.js";
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||||
|
|
||||||
export class RdDConteneurItemSheet extends RdDItemSheet {
|
export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
|
||||||
|
|
||||||
static get ITEM_TYPE() { return "conteneur" };
|
static get ITEM_TYPE() { return "conteneur" };
|
||||||
|
|
38
module/item/sheet-faune.js
Normal file
38
module/item/sheet-faune.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||||
|
|
||||||
|
export class RdDFauneItemSheet extends RdDItemInventaireSheet {
|
||||||
|
|
||||||
|
static get ITEM_TYPE() { return "faune" };
|
||||||
|
|
||||||
|
activateListeners(html) {
|
||||||
|
super.activateListeners(html);
|
||||||
|
|
||||||
|
if (!this.options.editable) return;
|
||||||
|
|
||||||
|
html.find("a.linked-actor-delete").click(event => this.onDeleteLinkedActor());
|
||||||
|
}
|
||||||
|
|
||||||
|
async _onDropActor(event, dragData) {
|
||||||
|
console.log('faune:dropActor', event, dragData)
|
||||||
|
const linkedActor = fromUuidSync(dragData.uuid);
|
||||||
|
if (linkedActor?.pack) {
|
||||||
|
this.item.update({
|
||||||
|
'system.actor.pack': linkedActor.pack,
|
||||||
|
'system.actor.id': linkedActor._id,
|
||||||
|
'system.actor.name': linkedActor.name
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui.notifications.warn(`${linkedActor.name} ne provient pas d'un compendium.
|
||||||
|
<br>Choisissez une créature du compendium pour représenter un élément de faune générique`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async onDeleteLinkedActor() {
|
||||||
|
this.item.update({
|
||||||
|
'system.actor.pack': '',
|
||||||
|
'system.actor.id': '',
|
||||||
|
'system.actor.name': ''
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
6
module/item/sheet-herbe.js
Normal file
6
module/item/sheet-herbe.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||||
|
|
||||||
|
export class RdDHerbeItemSheet extends RdDItemInventaireSheet {
|
||||||
|
|
||||||
|
static get ITEM_TYPE() { return "herbe" };
|
||||||
|
}
|
5
module/item/sheet-ingredient.js
Normal file
5
module/item/sheet-ingredient.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||||
|
|
||||||
|
export class RdDIngredientItemSheet extends RdDItemInventaireSheet {
|
||||||
|
static get ITEM_TYPE() { return "ingredient" };
|
||||||
|
}
|
7
module/item/sheet-plante.js
Normal file
7
module/item/sheet-plante.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { RdDItemInventaireSheet } from "./sheet-base-inventaire.js";
|
||||||
|
|
||||||
|
export class RdDPlanteItemSheet extends RdDItemInventaireSheet {
|
||||||
|
|
||||||
|
static get ITEM_TYPE() { return "plante" };
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import { RdDRencontre } from "./item/item-rencontre.js";
|
import { RdDRencontre } from "./rencontre.js";
|
||||||
import { RdDItemSheet } from "./item-sheet.js";
|
import { RdDItemSheet } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDRencontreItemSheet extends RdDItemSheet {
|
export class RdDRencontreItemSheet extends RdDItemSheet {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
import { RdDItemSheet } from "./item-sheet.js";
|
import { RdDItemSheet } from "../item-sheet.js";
|
||||||
|
|
||||||
export class RdDServiceItemSheet extends RdDItemSheet {
|
export class RdDServiceItemSheet extends RdDItemSheet {
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
import { RdDItemSheet } from "./item-sheet.js";
|
import { RdDItemSheet } from "../item-sheet.js";
|
||||||
import { RdDItemSigneDraconique } from "./item/item-signedraconique.js";
|
import { RdDItemSigneDraconique } from "./signedraconique.js";
|
||||||
import { TMRUtility } from "./tmr-utility.js";
|
import { TMRUtility } from "../tmr-utility.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Item sheet pour signes draconiques
|
* Item sheet pour signes draconiques
|
@ -1,11 +1,10 @@
|
|||||||
import { RdDBaseActor } from "./actor/base-actor.js";
|
import { RdDBaseActor } from "./actor/base-actor.js";
|
||||||
import { LOG_HEAD, SYSTEM_RDD } from "./constants.js";
|
import { LOG_HEAD, SYSTEM_RDD } from "./constants.js";
|
||||||
import { Environnement } from "./environnement.js";
|
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
import { Monnaie } from "./item-monnaie.js";
|
import { Monnaie } from "./item-monnaie.js";
|
||||||
import { RdDItem } from "./item.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { RdDTimestamp } from "./rdd-timestamp.js";
|
import { RdDTimestamp } from "./rdd-timestamp.js";
|
||||||
import { RdDRaretes } from "./tirage/raretes.js";
|
import { RdDRaretes } from "./item/raretes.js";
|
||||||
|
|
||||||
class Migration {
|
class Migration {
|
||||||
get code() { return "sample"; }
|
get code() { return "sample"; }
|
||||||
@ -289,7 +288,7 @@ class _10_3_0_FrequenceEnvironnement extends Migration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updatesFrequences(it) {
|
_updatesFrequences(it) {
|
||||||
const rarete = RdDRaretes.getRarete(it.system.rarete);
|
const rarete = RdDRaretes.getRareteByCode(it.system.rarete);
|
||||||
return {
|
return {
|
||||||
_id: it.id,
|
_id: it.id,
|
||||||
'system.rarete': undefined,
|
'system.rarete': undefined,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { SYSTEM_RDD } from "./constants.js";
|
import { SYSTEM_RDD } from "./constants.js";
|
||||||
|
|
||||||
export class RddCompendiumOrganiser {
|
export class RdDCompendiumOrganiser {
|
||||||
static init() {
|
static init() {
|
||||||
Hooks.on('renderCompendium', async (pack, html, compendiumData) => RddCompendiumOrganiser.onRenderCompendium(pack, html, compendiumData))
|
Hooks.on('renderCompendium', async (pack, html, compendiumData) => RdDCompendiumOrganiser.onRenderCompendium(pack, html, compendiumData))
|
||||||
}
|
}
|
||||||
|
|
||||||
static async onRenderCompendium(compendium, html, compendiumData) {
|
static async onRenderCompendium(compendium, html, compendiumData) {
|
||||||
@ -10,14 +10,14 @@ export class RddCompendiumOrganiser {
|
|||||||
const pack = compendium.collection
|
const pack = compendium.collection
|
||||||
if (pack.metadata.system === SYSTEM_RDD) {
|
if (pack.metadata.system === SYSTEM_RDD) {
|
||||||
html.find('.directory-item').each((i, element) => {
|
html.find('.directory-item').each((i, element) => {
|
||||||
RddCompendiumOrganiser.setEntityTypeName(pack, element);
|
RdDCompendiumOrganiser.setEntityTypeName(pack, element);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static async setEntityTypeName(pack, element) {
|
static async setEntityTypeName(pack, element) {
|
||||||
const label = RddCompendiumOrganiser.getEntityTypeLabel(await pack.getDocument(element.dataset.documentId));
|
const label = RdDCompendiumOrganiser.getEntityTypeLabel(await pack.getDocument(element.dataset.documentId));
|
||||||
RddCompendiumOrganiser.insertEntityType(element, label);
|
RdDCompendiumOrganiser.insertEntityType(element, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
static insertEntityType(element, label) {
|
static insertEntityType(element, label) {
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||||
import { RdDActor } from "./actor.js";
|
import { Migrations } from './migrations.js';
|
||||||
import { RdDItem } from "./item.js";
|
|
||||||
import { RdDUtility } from "./rdd-utility.js";
|
import { RdDUtility } from "./rdd-utility.js";
|
||||||
import { TMRUtility } from "./tmr-utility.js";
|
import { TMRUtility } from "./tmr-utility.js";
|
||||||
|
import { TMRRencontres } from "./tmr-rencontres.js";
|
||||||
import { RdDCalendrier } from "./rdd-calendrier.js";
|
import { RdDCalendrier } from "./rdd-calendrier.js";
|
||||||
|
import { RdDTimestamp } from "./rdd-timestamp.js";
|
||||||
|
import { DialogChronologie } from "./dialog-chronologie.js";
|
||||||
|
|
||||||
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
||||||
import { RdDTokenHud } from "./rdd-token-hud.js";
|
import { RdDTokenHud } from "./rdd-token-hud.js";
|
||||||
import { RdDCommands } from "./rdd-commands.js";
|
import { RdDCommands } from "./rdd-commands.js";
|
||||||
import { RdDCombatManager, RdDCombat } from "./rdd-combat.js";
|
import { RdDCombatManager, RdDCombat } from "./rdd-combat.js";
|
||||||
import { ChatUtility } from "./chat-utility.js";
|
import { ChatUtility } from "./chat-utility.js";
|
||||||
import { StatusEffects } from "./settings/status-effects.js";
|
import { StatusEffects } from "./settings/status-effects.js";
|
||||||
import { RddCompendiumOrganiser } from "./rdd-compendium-organiser.js";
|
import { RdDCompendiumOrganiser } from "./rdd-compendium-organiser.js";
|
||||||
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
||||||
import { RdDHotbar } from "./rdd-hotbar-drop.js"
|
import { RdDHotbar } from "./rdd-hotbar-drop.js"
|
||||||
import { EffetsDraconiques } from "./tmr/effets-draconiques.js";
|
import { EffetsDraconiques } from "./tmr/effets-draconiques.js";
|
||||||
@ -18,39 +22,39 @@ import { RdDHerbes } from "./rdd-herbes.js";
|
|||||||
import { RdDDice } from "./rdd-dice.js";
|
import { RdDDice } from "./rdd-dice.js";
|
||||||
import { RdDPossession } from "./rdd-possession.js";
|
import { RdDPossession } from "./rdd-possession.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
import { Migrations } from './migrations.js';
|
|
||||||
import { DialogChronologie } from "./dialog-chronologie.js";
|
|
||||||
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
||||||
import { Environnement } from "./environnement.js";
|
import { Environnement } from "./environnement.js";
|
||||||
import { RdDItemService } from "./item/item-service.js";
|
|
||||||
import { RdDBaseActor } from "./actor/base-actor.js";
|
|
||||||
import { RdDCommerceSheet } from "./actor/commerce-sheet.js";
|
|
||||||
import { RdDCommerce } from "./actor/commerce.js";
|
|
||||||
import { RdDTimestamp } from "./rdd-timestamp.js";
|
|
||||||
import { RdDItemMaladie } from "./item/maladie.js";
|
|
||||||
import { RdDItemPoison } from "./item/poison.js";
|
|
||||||
import { RdDItemSigneDraconique } from "./item/item-signedraconique.js";
|
|
||||||
import { RdDItemQueue } from "./item/queue.js";
|
|
||||||
import { RdDItemOmbre } from "./item/ombre.js";
|
|
||||||
import { RdDItemSouffle } from "./item/souffle.js";
|
|
||||||
import { RdDRencontre } from "./item/item-rencontre.js";
|
|
||||||
|
|
||||||
|
import { RdDActor } from "./actor.js";
|
||||||
|
import { RdDBaseActor } from "./actor/base-actor.js";
|
||||||
|
import { RdDCommerce } from "./actor/commerce.js";
|
||||||
import { RdDActorSheet } from "./actor-sheet.js";
|
import { RdDActorSheet } from "./actor-sheet.js";
|
||||||
|
import { RdDCommerceSheet } from "./actor/commerce-sheet.js";
|
||||||
import { RdDActorCreatureSheet } from "./actor-creature-sheet.js";
|
import { RdDActorCreatureSheet } from "./actor-creature-sheet.js";
|
||||||
import { RdDActorVehiculeSheet } from "./actor-vehicule-sheet.js";
|
import { RdDActorVehiculeSheet } from "./actor-vehicule-sheet.js";
|
||||||
import { RdDActorEntiteSheet } from "./actor-entite-sheet.js";
|
import { RdDActorEntiteSheet } from "./actor-entite-sheet.js";
|
||||||
import { RdDItemSheet } from "./item-sheet.js";
|
|
||||||
import { RdDServiceItemSheet } from "./item-service-sheet.js";
|
|
||||||
import { RdDHerbeItemSheet } from "./item-herbe-sheet.js";
|
|
||||||
import { RdDRencontreItemSheet } from "./item-rencontre-sheet.js";
|
|
||||||
import { RdDPlanteItemSheet } from "./item-plante-sheet.js";
|
|
||||||
import { RdDIngredientItemSheet } from "./item-ingredient-sheet.js";
|
|
||||||
import { RdDFauneItemSheet } from "./item-faune-sheet.js";
|
|
||||||
import { RdDConteneurItemSheet } from "./item-conteneur-sheet.js";
|
|
||||||
import { RdDSigneDraconiqueItemSheet } from "./item-signedraconique-sheet.js";
|
|
||||||
|
|
||||||
import { TMRRencontres } from "./tmr-rencontres.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { FenetreRechercheTirage } from "./tirage/fenetre-recherche-tirage.js";
|
import { RdDItemService } from "./item/service.js";
|
||||||
|
import { RdDItemMaladie } from "./item/maladie.js";
|
||||||
|
import { RdDItemPoison } from "./item/poison.js";
|
||||||
|
import { RdDItemSigneDraconique } from "./item/signedraconique.js";
|
||||||
|
import { RdDItemQueue } from "./item/queue.js";
|
||||||
|
import { RdDItemOmbre } from "./item/ombre.js";
|
||||||
|
import { RdDItemSouffle } from "./item/souffle.js";
|
||||||
|
import { RdDRencontre } from "./item/rencontre.js";
|
||||||
|
|
||||||
|
import { RdDItemSheet } from "./item-sheet.js";
|
||||||
|
import { RdDServiceItemSheet } from "./item/sheet-service.js";
|
||||||
|
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js";
|
||||||
|
import { RdDHerbeItemSheet } from "./item/sheet-herbe.js";
|
||||||
|
import { RdDPlanteItemSheet } from "./item/sheet-plante.js";
|
||||||
|
import { RdDIngredientItemSheet } from "./item/sheet-ingredient.js";
|
||||||
|
import { RdDFauneItemSheet } from "./item/sheet-faune.js";
|
||||||
|
import { RdDConteneurItemSheet } from "./item/sheet-conteneur.js";
|
||||||
|
import { RdDSigneDraconiqueItemSheet } from "./item/sheet-signedraconique.js";
|
||||||
|
import { RdDItemInventaireSheet } from "./item/sheet-base-inventaire.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RdD system
|
* RdD system
|
||||||
@ -151,12 +155,16 @@ export class SystemReveDeDragon {
|
|||||||
RdDItemSheet.register(RdDIngredientItemSheet);
|
RdDItemSheet.register(RdDIngredientItemSheet);
|
||||||
RdDItemSheet.register(RdDServiceItemSheet);
|
RdDItemSheet.register(RdDServiceItemSheet);
|
||||||
|
|
||||||
|
Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
|
||||||
|
types: [
|
||||||
|
"objet", "arme", "armure", "livre", "potion", "munition",
|
||||||
|
"monnaie", "nourritureboisson", "gemme",
|
||||||
|
], makeDefault: true
|
||||||
|
});
|
||||||
Items.registerSheet(SYSTEM_RDD, RdDItemSheet, {
|
Items.registerSheet(SYSTEM_RDD, RdDItemSheet, {
|
||||||
types: [
|
types: [
|
||||||
"competence", "competencecreature",
|
"competence", "competencecreature",
|
||||||
"recettealchimique", "musique", "chant", "danse", "jeu", "recettecuisine", "oeuvre",
|
"recettealchimique", "musique", "chant", "danse", "jeu", "recettecuisine", "oeuvre",
|
||||||
"objet", "arme", "armure", "livre", "potion", "munition",
|
|
||||||
"monnaie", "nourritureboisson", "gemme",
|
|
||||||
"meditation", "queue", "ombre", "souffle", "tete", "casetmr", "sort", "sortreserve",
|
"meditation", "queue", "ombre", "souffle", "tete", "casetmr", "sort", "sortreserve",
|
||||||
"nombreastral", "tache", "maladie", "poison", "possession",
|
"nombreastral", "tache", "maladie", "poison", "possession",
|
||||||
"tarot", "extraitpoetique"
|
"tarot", "extraitpoetique"
|
||||||
@ -176,7 +184,7 @@ export class SystemReveDeDragon {
|
|||||||
RdDCombatManager.init();
|
RdDCombatManager.init();
|
||||||
RdDTokenHud.init();
|
RdDTokenHud.init();
|
||||||
RdDBaseActor.init();
|
RdDBaseActor.init();
|
||||||
RddCompendiumOrganiser.init();
|
RdDCompendiumOrganiser.init();
|
||||||
EffetsDraconiques.init()
|
EffetsDraconiques.init()
|
||||||
TMRUtility.init();
|
TMRUtility.init();
|
||||||
RdDHotbar.initDropbar();
|
RdDHotbar.initDropbar();
|
||||||
|
@ -15,7 +15,7 @@ import { HtmlUtility } from "./html-utility.js";
|
|||||||
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
||||||
import { RdDDice } from "./rdd-dice.js";
|
import { RdDDice } from "./rdd-dice.js";
|
||||||
import { STATUSES } from "./settings/status-effects.js";
|
import { STATUSES } from "./settings/status-effects.js";
|
||||||
import { RdDRencontre } from "./item/item-rencontre.js";
|
import { RdDRencontre } from "./item/rencontre.js";
|
||||||
import { RdDCalendrier } from "./rdd-calendrier.js";
|
import { RdDCalendrier } from "./rdd-calendrier.js";
|
||||||
import { RdDTimestamp } from "./rdd-timestamp.js";
|
import { RdDTimestamp } from "./rdd-timestamp.js";
|
||||||
|
|
||||||
|
@ -8,15 +8,13 @@ import { DialogItemAchat } from "./dialog-item-achat.js";
|
|||||||
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
import { ReglesOptionelles } from "./settings/regles-optionelles.js";
|
||||||
import { RdDDice } from "./rdd-dice.js";
|
import { RdDDice } from "./rdd-dice.js";
|
||||||
import { RdDItem } from "./item.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { Monnaie } from "./item-monnaie.js";
|
|
||||||
import { RdDPossession } from "./rdd-possession.js";
|
import { RdDPossession } from "./rdd-possession.js";
|
||||||
import { RdDNameGen } from "./rdd-namegen.js";
|
import { RdDNameGen } from "./rdd-namegen.js";
|
||||||
import { RdDConfirm } from "./rdd-confirm.js";
|
import { RdDConfirm } from "./rdd-confirm.js";
|
||||||
import { Environnement } from "./environnement.js";
|
|
||||||
import { RdDItemCompetence } from "./item-competence.js";
|
import { RdDItemCompetence } from "./item-competence.js";
|
||||||
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
import { RdDResolutionTable } from "./rdd-resolution-table.js";
|
||||||
import { RdDTimestamp } from "./rdd-timestamp.js";
|
import { RdDTimestamp } from "./rdd-timestamp.js";
|
||||||
import { RdDRaretes } from "./tirage/raretes.js";
|
import { RdDRaretes } from "./item/raretes.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// This table starts at 0 -> niveau -10
|
// This table starts at 0 -> niveau -10
|
||||||
|
@ -61,7 +61,7 @@ export class SystemCompendiums extends FormApplication {
|
|||||||
|
|
||||||
static async getPackContent(compendium, docType) {
|
static async getPackContent(compendium, docType) {
|
||||||
const pack = SystemCompendiums.getPack(compendium);
|
const pack = SystemCompendiums.getPack(compendium);
|
||||||
if (pack.metadata.type == docType) {
|
if (pack?.metadata.type == docType) {
|
||||||
return await pack.getDocuments();
|
return await pack.getDocuments();
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
|
@ -2,7 +2,7 @@ import { RdDItem } from '../item.js';
|
|||||||
import { HtmlUtility } from '../html-utility.js';
|
import { HtmlUtility } from '../html-utility.js';
|
||||||
import { Misc } from "../misc.js";
|
import { Misc } from "../misc.js";
|
||||||
import { CompendiumTableHelpers } from '../settings/system-compendiums.js';
|
import { CompendiumTableHelpers } from '../settings/system-compendiums.js';
|
||||||
import { RdDRaretes } from './raretes.js';
|
import { RdDRaretes } from '../item/raretes.js';
|
||||||
|
|
||||||
const FILTER_GROUPS = [
|
const FILTER_GROUPS = [
|
||||||
{ group: 'type', label: "Type d'objet" },
|
{ group: 'type', label: "Type d'objet" },
|
||||||
|
@ -584,9 +584,7 @@
|
|||||||
"encombrement": 0,
|
"encombrement": 0,
|
||||||
"quantite": 1,
|
"quantite": 1,
|
||||||
"qualite": 0,
|
"qualite": 0,
|
||||||
"cout": 0.0
|
"cout": 0.0,
|
||||||
},
|
|
||||||
"environnement": {
|
|
||||||
"milieu": "",
|
"milieu": "",
|
||||||
"environnement": []
|
"environnement": []
|
||||||
},
|
},
|
||||||
@ -713,25 +711,25 @@
|
|||||||
"force": 0
|
"force": 0
|
||||||
},
|
},
|
||||||
"herbe": {
|
"herbe": {
|
||||||
"templates": ["description", "inventaire", "environnement", "comestible"],
|
"templates": ["description", "inventaire", "comestible"],
|
||||||
"niveau": 0,
|
"niveau": 0,
|
||||||
"base": 0,
|
"base": 0,
|
||||||
"categorie": ""
|
"categorie": ""
|
||||||
},
|
},
|
||||||
"plante": {
|
"plante": {
|
||||||
"templates": ["description", "inventaire", "environnement", "comestible"],
|
"templates": ["description", "inventaire", "comestible"],
|
||||||
"niveau": 0,
|
"niveau": 0,
|
||||||
"base": 0,
|
"base": 0,
|
||||||
"categorie": ""
|
"categorie": ""
|
||||||
},
|
},
|
||||||
"ingredient": {
|
"ingredient": {
|
||||||
"templates": ["description", "inventaire", "environnement", "comestible"],
|
"templates": ["description", "inventaire", "comestible"],
|
||||||
"niveau": 0,
|
"niveau": 0,
|
||||||
"base": 0,
|
"base": 0,
|
||||||
"categorie": ""
|
"categorie": ""
|
||||||
},
|
},
|
||||||
"faune": {
|
"faune": {
|
||||||
"templates": ["description", "inventaire", "environnement", "comestible"],
|
"templates": ["description", "inventaire", "comestible"],
|
||||||
"categorie": "",
|
"categorie": "",
|
||||||
"actor": {
|
"actor": {
|
||||||
"id": "",
|
"id": "",
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
{{!-- Sheet Body --}}
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
<section class="sheet-body">
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
|
<section class="sheet-body">
|
||||||
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.competence">Compétence de mêlée</label>
|
<label for="system.competence">Compétence de mêlée</label>
|
||||||
<select name="system.competence" id="competence" data-dtype="String">
|
<select name="system.competence" id="competence" data-dtype="String">
|
||||||
@ -46,7 +49,6 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.force">Force min. </label>
|
<label for="system.force">Force min. </label>
|
||||||
<input class="attribute-value" type="text" name="system.force" value="{{system.force}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.force" value="{{system.force}}" data-dtype="String"/>
|
||||||
@ -99,8 +101,9 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
</section>
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,21 +1,27 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
{{!-- Sheet Body --}}
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
<label for="system.protection">Protection</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.protection" value="{{system.protection}}" data-dtype="String"/>
|
<div class="form-group">
|
||||||
|
<label for="system.protection">Protection</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.protection" value="{{system.protection}}" data-dtype="String"/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.deterioration">Détérioration</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.deterioration" value="{{system.deterioration}}" data-dtype="Number"/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.malus">Malus Armure </label>
|
||||||
|
<input class="attribute-value" type="text" name="system.malus" value="{{system.malus}}" data-dtype="Number"/>
|
||||||
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
<label for="system.deterioration">Détérioration</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.deterioration" value="{{system.deterioration}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="system.malus">Malus Armure </label>
|
|
||||||
<input class="attribute-value" type="text" name="system.malus" value="{{system.malus}}" data-dtype="Number"/>
|
|
||||||
</div>
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,28 +1,35 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
|
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
<label for="xp">Capacite (points d'Enc.)</label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="text" name="system.capacite" value="{{system.capacite}}" data-dtype="Number"/>
|
<label for="xp">Capacite (points d'Enc.)</label>
|
||||||
</div>
|
<input class="attribute-value" type="text" name="system.capacite" value="{{system.capacite}}" data-dtype="Number"/>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
{{#if isOwned}}
|
|
||||||
<div class="flexcol">
|
{{#if isOwned}}
|
||||||
<span><label>Contenu : </label></span>
|
<div class="flexcol">
|
||||||
<ul class="item-list alterne-list">
|
<span><label>Contenu : </label></span>
|
||||||
<li class="competence-header flexrow">
|
<ul class="item-list alterne-list">
|
||||||
<span class="equipement-nom">Nom</span>
|
<li class="competence-header flexrow">
|
||||||
<span class="equipement-detail">Q.</span>
|
<span class="equipement-nom">Nom</span>
|
||||||
<span class="equipement-detail">Enc.</span>
|
<span class="equipement-detail">Q.</span>
|
||||||
<span class="equipement-actions">Actions</span>
|
<span class="equipement-detail">Enc.</span>
|
||||||
</li>
|
<span class="equipement-actions">Actions</span>
|
||||||
|
</li>
|
||||||
{{buildContenu this}}
|
{{buildContenu this}}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,32 +1,38 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
{{!-- Sheet Body --}}
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
<label>Type</label>
|
<div class="form-group">
|
||||||
<select name="system.type" id="type" data-dtype="String">
|
<label>Type</label>
|
||||||
{{#select system.type}}
|
<select name="system.type" id="type" data-dtype="String">
|
||||||
{{{gemmeTypeList}}}
|
{{#select system.type}}
|
||||||
{{/select}}
|
{{{gemmeTypeList}}}
|
||||||
</select>
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Taille</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.taille" value="{{system.taille}}" data-dtype="Number" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Pureté</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.purete" value="{{system.purete}}" data-dtype="Number" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Inertie</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.inertie" value="{{system.inertie}}" data-dtype="Number" disabled/>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Enchantabilité</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.enchantabilite" value="{{system.enchantabilite}}" data-dtype="Number" disabled/>
|
||||||
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
<label>Taille</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.taille" value="{{system.taille}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Pureté</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.purete" value="{{system.purete}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Inertie</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.inertie" value="{{system.inertie}}" data-dtype="Number" disabled/>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Enchantabilité</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.enchantabilite" value="{{system.enchantabilite}}" data-dtype="Number" disabled/>
|
|
||||||
</div>
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
<header class="sheet-header">
|
<header class="sheet-header">
|
||||||
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
|
||||||
<div class="header-fields">
|
<div class="header-fields">
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
|
||||||
{{#if isOwned}}
|
{{#if isOwned}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="xp"><a class="creer-tache-livre chat-card-button" data-actor-id="{{actorId}}">Créer une tâche de lecture</a></span>
|
<span for="xp"><a class="creer-tache-livre chat-card-button" data-actor-id="{{actorId}}">Créer une tâche de lecture</a></span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
{{!-- Sheet Body --}}
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
<section class="sheet-body">
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
|
<section class="sheet-body">
|
||||||
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Auteur</label>
|
<label for="xp">Auteur</label>
|
||||||
<input class="attribute-value" type="text" name="system.auteur" value="{{system.auteur}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.auteur" value="{{system.auteur}}" data-dtype="String"/>
|
||||||
@ -48,5 +52,7 @@
|
|||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
</section>
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,7 +1,14 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
{{!-- Sheet Body --}}
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
@ -1,36 +1,42 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
{{!-- Sheet Body --}}
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
<label for="system.sust">Sustentation</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.sust" value="{{system.sust}}" data-dtype="Number" />
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="system.boisson">Boisson</label>
|
|
||||||
<input class="attribute-value" type="checkbox" name="system.boisson" {{#if system.boisson}}checked{{/if}} />
|
|
||||||
</div>
|
|
||||||
{{#if system.boisson}}
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.desaltere">Désaltère de</label>
|
<label for="system.sust">Sustentation</label>
|
||||||
<input class="attribute-value" type="text" name="system.desaltere" value="{{system.desaltere}}" data-dtype="Number" />
|
<input class="attribute-value" type="text" name="system.sust" value="{{system.sust}}" data-dtype="Number" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.alcoolise">Alcoolisée</label>
|
<label for="system.boisson">Boisson</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.alcoolise" {{#if system.alcoolise}}checked{{/if}} />
|
<input class="attribute-value" type="checkbox" name="system.boisson" {{#if system.boisson}}checked{{/if}} />
|
||||||
</div>
|
|
||||||
{{#if system.alcoolise}}
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Force de l'alcool par dose</label>
|
|
||||||
<input class="attribute-value" type="text" name="system.force" value="{{system.force}}" data-dtype="Number" />
|
|
||||||
</div>
|
</div>
|
||||||
|
{{#if system.boisson}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.desaltere">Désaltère de</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.desaltere" value="{{system.desaltere}}" data-dtype="Number" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="system.alcoolise">Alcoolisée</label>
|
||||||
|
<input class="attribute-value" type="checkbox" name="system.alcoolise" {{#if system.alcoolise}}checked{{/if}} />
|
||||||
|
</div>
|
||||||
|
{{#if system.alcoolise}}
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Force de l'alcool par dose</label>
|
||||||
|
<input class="attribute-value" type="text" name="system.force" value="{{system.force}}" data-dtype="Number" />
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<label for="system.exotisme">Exotisme</label>
|
||||||
<label for="system.exotisme">Exotisme</label>
|
<input class="attribute-value" type="text" name="system.exotisme" value="{{system.exotisme}}" data-dtype="Number" />
|
||||||
<input class="attribute-value" type="text" name="system.exotisme" value="{{system.exotisme}}" data-dtype="Number" />
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
@ -1,8 +1,14 @@
|
|||||||
<form class="{{cssClass}}" autocomplete="off">
|
<form class="{{cssClass}}" autocomplete="off">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/header-item.html"}}
|
||||||
{{!-- Sheet Body --}}
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
</section>
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
|
</section>
|
||||||
</form>
|
</form>
|
||||||
|
@ -11,91 +11,97 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{!-- Sheet Body --}}
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
|
<a class="item" data-tab="informations">Informations</a>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-tab-environnement.html"}}
|
||||||
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="tab items flexcol" data-group="primary" data-tab="informations">
|
||||||
<label>Fréquence</label>
|
<div class="form-group">
|
||||||
<select name="system.rarete" class="rarete" data-dtype="String">
|
<label>Fréquence</label>
|
||||||
{{#select system.rarete}}
|
<select name="system.rarete" class="rarete" data-dtype="String">
|
||||||
<option value=""></option>
|
{{#select system.rarete}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
<option value=""></option>
|
||||||
{{/select}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-rarete.html"}}
|
||||||
</select>
|
{{/select}}
|
||||||
</div>
|
</select>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label>Catégorie</label>
|
<div class="form-group">
|
||||||
<select name="system.categorie" class="categoriepotion" data-dtype="String">
|
<label>Catégorie</label>
|
||||||
{{#select system.categorie}}
|
<select name="system.categorie" class="categoriepotion" data-dtype="String">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-potion.html"}}
|
{{#select system.categorie}}
|
||||||
{{/select}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-categorie-potion.html"}}
|
||||||
</select>
|
{{/select}}
|
||||||
</div>
|
</select>
|
||||||
{{#if isSoins}}
|
</div>
|
||||||
<div class="form-group">
|
{{#if isSoins}}
|
||||||
<label>Herbe</label>
|
<div class="form-group">
|
||||||
<select name="system.herbe" class="herbe" data-dtype="String">
|
<label>Herbe</label>
|
||||||
{{selectOptions herbesSoins selected=system.herbe localize=false}}
|
<select name="system.herbe" class="herbe" data-dtype="String">
|
||||||
</select>
|
{{selectOptions herbesSoins selected=system.herbe localize=false}}
|
||||||
</div>
|
</select>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label>Nombre de brins</label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="text" name="system.herbebrins" value="{{system.herbebrins}}" data-dtype="Number" />
|
<label>Nombre de brins</label>
|
||||||
</div>
|
<input class="attribute-value" type="text" name="system.herbebrins" value="{{system.herbebrins}}" data-dtype="Number" />
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label>Bonus</label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="text" name="system.herbebonus" value="{{system.herbebonus}}" data-dtype="Number" />
|
<label>Bonus</label>
|
||||||
</div>
|
<input class="attribute-value" type="text" name="system.herbebonus" value="{{system.herbebonus}}" data-dtype="Number" />
|
||||||
{{/if}}
|
</div>
|
||||||
{{#if isRepos}}
|
{{/if}}
|
||||||
<div class="form-group">
|
{{#if isRepos}}
|
||||||
<label>Herbe</label>
|
<div class="form-group">
|
||||||
<select name="system.herbe" class="herbe" data-dtype="String">
|
<label>Herbe</label>
|
||||||
{{selectOptions herbesRepos selected=system.herbe localize=false}}
|
<select name="system.herbe" class="herbe" data-dtype="String">
|
||||||
</select>
|
{{selectOptions herbesRepos selected=system.herbe localize=false}}
|
||||||
</div>
|
</select>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label>Nombre de brins</label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="text" name="system.herbebrins" value="{{system.herbebrins}}" data-dtype="Number" />
|
<label>Nombre de brins</label>
|
||||||
</div>
|
<input class="attribute-value" type="text" name="system.herbebrins" value="{{system.herbebrins}}" data-dtype="Number" />
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label>Bonus</label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="text" name="system.herbebonus" value="{{system.herbebonus}}" data-dtype="Number" />
|
<label>Bonus</label>
|
||||||
</div>
|
<input class="attribute-value" type="text" name="system.herbebonus" value="{{system.herbebonus}}" data-dtype="Number" />
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label>Repos Alchimique ?</label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
|
<label>Repos Alchimique ?</label>
|
||||||
</div>
|
<input class="attribute-value" type="checkbox" name="system.reposalchimique" {{#if system.reposalchimique}}checked{{/if}}/>
|
||||||
{{/if}}
|
</div>
|
||||||
{{#if system.magique}}
|
{{/if}}
|
||||||
<div class="form-group">
|
{{#if system.magique}}
|
||||||
<label>Points de rêve</label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="text" name="system.pr" value="{{system.pr}}" data-dtype="Number" />
|
<label>Points de rêve</label>
|
||||||
</div>
|
<input class="attribute-value" type="text" name="system.pr" value="{{system.pr}}" data-dtype="Number" />
|
||||||
<div class="form-group">
|
</div>
|
||||||
<label for="xp">Permanente ? </label>
|
<div class="form-group">
|
||||||
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if system.prpermanent}}checked{{/if}}/>
|
<label for="xp">Permanente ? </label>
|
||||||
</div>
|
<input class="attribute-value" type="checkbox" name="system.prpermanent" {{#if system.prpermanent}}checked{{/if}}/>
|
||||||
{{#if isSoins}}
|
</div>
|
||||||
<div class="form-group">
|
{{#if isSoins}}
|
||||||
<label for="xp">Points de guérison </label>
|
<div class="form-group">
|
||||||
<label for="xp">{{pointsGuerison}}</label>
|
<label for="xp">Points de guérison </label>
|
||||||
</div>
|
<label for="xp">{{pointsGuerison}}</label>
|
||||||
{{/if}}
|
</div>
|
||||||
<div class="form-group">
|
{{/if}}
|
||||||
<label>Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
|
<div class="form-group">
|
||||||
</div>
|
<label>Date de l'Enchantement : Jour/Mois (date actuelle : {{dateActuelle}})</label>
|
||||||
<div class="form-group">
|
</div>
|
||||||
<input type="number" name="enchantement.jour" class="date-enchantement" value="{{enchantement.jour}}" data-dtype="Number" min="1" max="28"/>
|
<div class="form-group">
|
||||||
<select name="enchantement.mois" class="date-enchantement" data-dtype="String">
|
<input type="number" name="enchantement.jour" class="date-enchantement" value="{{enchantement.jour}}" data-dtype="Number" min="1" max="28"/>
|
||||||
{{#select enchantement.mois}}
|
<select name="enchantement.mois" class="date-enchantement" data-dtype="String">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
{{#select enchantement.mois}}
|
||||||
{{/select}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-heures.html"}}
|
||||||
</select>
|
{{/select}}
|
||||||
</div>
|
</select>
|
||||||
{{/if}}
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
</div>
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-environnement.html"}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</form>
|
</form>
|
@ -1,3 +1,4 @@
|
|||||||
|
{{#unless isOwned}}
|
||||||
{{>'systems/foundryvtt-reve-de-dragon/templates/scripts/autocomplete-script.hbs'}}
|
{{>'systems/foundryvtt-reve-de-dragon/templates/scripts/autocomplete-script.hbs'}}
|
||||||
<div class="tab items" data-group="primary" data-tab="environnement">
|
<div class="tab items" data-group="primary" data-tab="environnement">
|
||||||
<div class="form-group description-milieu">
|
<div class="form-group description-milieu">
|
||||||
@ -34,4 +35,5 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/unless}}
|
@ -1 +1,3 @@
|
|||||||
|
{{#unless isOwned}}
|
||||||
<a class="item" data-tab="environnement">Environnement</a>
|
<a class="item" data-tab="environnement">Environnement</a>
|
||||||
|
{{/unless}}
|
Loading…
Reference in New Issue
Block a user