Merge pull request 'v10.6.7' (#617) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10
Reviewed-on: #617
This commit is contained in:
commit
2561a658f2
@ -31,32 +31,21 @@ export class RdDBaseActorSheet extends ActorSheet {
|
|||||||
Monnaie.validerMonnaies(this.actor.itemTypes['monnaie']);
|
Monnaie.validerMonnaies(this.actor.itemTypes['monnaie']);
|
||||||
|
|
||||||
this.actor.recompute();
|
this.actor.recompute();
|
||||||
const userRightLevel = game.user.isGM ? CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER : this.actor.getUserLevel(game.user)
|
|
||||||
const options = duplicate(this.options);
|
|
||||||
mergeObject(options, {
|
|
||||||
isGM: game.user.isGM,
|
|
||||||
editable: this.isEditable,
|
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
|
||||||
isLimited: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.LIMITED,
|
|
||||||
isObserver: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
|
|
||||||
isOwner: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER,
|
|
||||||
owner: this.actor.isOwner,
|
|
||||||
});
|
|
||||||
|
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
id: this.actor.id,
|
id: this.actor.id,
|
||||||
type: this.actor.type,
|
type: this.actor.type,
|
||||||
img: this.actor.img,
|
img: this.actor.img,
|
||||||
name: this.actor.name,
|
name: this.actor.name,
|
||||||
system: foundry.utils.deepClone(this.actor.system),
|
system: this.actor.system,
|
||||||
description: await TextEditor.enrichHTML(this.actor.system.description, { async: true }),
|
description: await TextEditor.enrichHTML(this.actor.system.description, { async: true }),
|
||||||
notesmj: await TextEditor.enrichHTML(this.actor.system.notesmj, { async: true }),
|
notesmj: await TextEditor.enrichHTML(this.actor.system.notesmj, { async: true }),
|
||||||
options: options,
|
options: RdDSheetUtility.mergeDocumentRights(this.options, this.actor, this.isEditable)
|
||||||
}
|
}
|
||||||
|
|
||||||
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
||||||
formData.calc = {
|
formData.calc = {
|
||||||
fortune: this.toSolsDeniers(this.actor.getFortune()),
|
fortune: Monnaie.toSolsDeniers(this.actor.getFortune()),
|
||||||
prixTotalEquipement: this.actor.computePrixTotalEquipement(),
|
prixTotalEquipement: this.actor.computePrixTotalEquipement(),
|
||||||
encTotal: await this.actor.computeEncTotal(),
|
encTotal: await this.actor.computeEncTotal(),
|
||||||
}
|
}
|
||||||
@ -64,17 +53,9 @@ export class RdDBaseActorSheet extends ActorSheet {
|
|||||||
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
|
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
|
||||||
formData.conteneurs = RdDUtility.conteneursRacine(formData.conteneurs);
|
formData.conteneurs = RdDUtility.conteneursRacine(formData.conteneurs);
|
||||||
|
|
||||||
|
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
toSolsDeniers(fortune) {
|
|
||||||
return {
|
|
||||||
sols: Math.floor(fortune),
|
|
||||||
deniers: Math.round(100 * (fortune - Math.floor(fortune)))
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static filterItemsPerTypeForSheet(formData, itemTypes) {
|
static filterItemsPerTypeForSheet(formData, itemTypes) {
|
||||||
formData.recettescuisine = Misc.arrayOrEmpty(itemTypes['recettecuisine']);
|
formData.recettescuisine = Misc.arrayOrEmpty(itemTypes['recettecuisine']);
|
||||||
|
@ -8,7 +8,7 @@ export class DialogItemVente extends Dialog {
|
|||||||
const venteData = {
|
const venteData = {
|
||||||
item: item,
|
item: item,
|
||||||
alias: item.actor?.name ?? game.user.name,
|
alias: item.actor?.name ?? game.user.name,
|
||||||
vendeurId: item.actor?.id ,
|
vendeurId: item.actor?.id,
|
||||||
prixOrigine: item.calculerPrixCommercant(),
|
prixOrigine: item.calculerPrixCommercant(),
|
||||||
prixUnitaire: item.calculerPrixCommercant(),
|
prixUnitaire: item.calculerPrixCommercant(),
|
||||||
prixLot: item.calculerPrixCommercant(),
|
prixLot: item.calculerPrixCommercant(),
|
||||||
@ -40,51 +40,62 @@ export class DialogItemVente extends Dialog {
|
|||||||
|
|
||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
this.html = html;
|
this.html = html;
|
||||||
this.setQuantiteIllimite(this.venteData.quantiteIllimite);
|
|
||||||
this.html.find(".tailleLot").change(event => this.setTailleLot(Number(event.currentTarget.value)));
|
this.html.find(".tailleLot").change(event => this.setTailleLot(Number(event.currentTarget.value)));
|
||||||
this.html.find(".quantiteNbLots").change(event => this.setNbLots(Number(event.currentTarget.value)));
|
this.html.find(".quantiteNbLots").change(event => this.setNbLots(Number(event.currentTarget.value)));
|
||||||
this.html.find(".quantiteIllimite").change(event => this.setQuantiteIllimite(event.currentTarget.checked));
|
this.html.find(".quantiteIllimite").change(event => this.setQuantiteIllimite(event.currentTarget.checked));
|
||||||
this.html.find(".prixLot").change(event => this.setPrixLot(Number(event.currentTarget.value)));
|
this.html.find(".prixLot").change(event => this.setPrixLot(Number(event.currentTarget.value)));
|
||||||
|
|
||||||
|
this.setQuantiteIllimite(this.venteData.quantiteIllimite);
|
||||||
}
|
}
|
||||||
|
|
||||||
async onProposer(it) {
|
async onProposer(it) {
|
||||||
await this.html.find(".tailleLot").change();
|
this.updateVente(this.getChoixVente());
|
||||||
await this.html.find(".quantiteNbLots").change();
|
|
||||||
await this.html.find(".quantiteIllimite").change();
|
|
||||||
await this.html.find(".prixLot").change();
|
|
||||||
this.callback(this.venteData);
|
this.callback(this.venteData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateVente(update) {
|
||||||
|
mergeObject(this.venteData, update);
|
||||||
|
}
|
||||||
|
|
||||||
|
getChoixVente() {
|
||||||
|
return {
|
||||||
|
quantiteNbLots: Number(this.html.find(".quantiteNbLots").val()),
|
||||||
|
tailleLot: Number(this.html.find(".tailleLot").val()),
|
||||||
|
quantiteIllimite: this.html.find(".quantiteIllimite").is(':checked'),
|
||||||
|
prixLot: Number(this.html.find(".prixLot").val())
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
setPrixLot(prixLot) {
|
setPrixLot(prixLot) {
|
||||||
this.venteData.prixLot = prixLot;
|
this.venteData.prixLot = prixLot;
|
||||||
}
|
}
|
||||||
|
|
||||||
setTailleLot(tailleLot) {
|
setTailleLot(tailleLot) {
|
||||||
// recalculer le prix du lot
|
const maxLots = Math.floor(this.venteData.quantiteMax / tailleLot);
|
||||||
if (tailleLot != this.venteData.tailleLot) {
|
this.updateVente({
|
||||||
this.venteData.prixLot = (tailleLot * this.venteData.prixOrigine).toFixed(2);
|
tailleLot,
|
||||||
|
quantiteNbLots: Math.min(maxLots, this.venteData.quantiteNbLots),
|
||||||
|
quantiteMaxLots: maxLots,
|
||||||
|
prixLot: (tailleLot * this.venteData.prixOrigine).toFixed(2)
|
||||||
|
});
|
||||||
|
|
||||||
this.html.find(".prixLot").val(this.venteData.prixLot);
|
this.html.find(".prixLot").val(this.venteData.prixLot);
|
||||||
}
|
|
||||||
this.venteData.tailleLot = tailleLot;
|
|
||||||
// recalculer le nombre de lots max
|
|
||||||
this.venteData.quantiteMaxLots = Math.floor(this.venteData.quantiteMax / tailleLot);
|
|
||||||
this.venteData.quantiteNbLots = Math.min(this.venteData.quantiteMaxLots, this.venteData.quantiteNbLots);
|
|
||||||
this.html.find(".quantiteNbLots").val(this.venteData.quantiteNbLots);
|
this.html.find(".quantiteNbLots").val(this.venteData.quantiteNbLots);
|
||||||
this.html.find(".quantiteNbLots").attr("max", this.venteData.quantiteMaxLots)
|
this.html.find(".quantiteNbLots").attr("max", this.venteData.quantiteMaxLots)
|
||||||
}
|
}
|
||||||
|
|
||||||
setNbLots(nbLots) {
|
setNbLots(nbLots) {
|
||||||
if (this.venteData.isOwned) {
|
this.updateVente({
|
||||||
nbLots = Math.max(0, Math.min(nbLots, this.venteData.quantiteMaxLots));
|
quantiteNbLots: this.venteData.isOwned ? Math.max(0, Math.min(nbLots, this.venteData.quantiteMaxLots)) : nbLots
|
||||||
}
|
})
|
||||||
this.venteData.quantiteNbLots = nbLots;
|
|
||||||
this.html.find(".quantiteNbLots").val(this.venteData.quantiteNbLots);
|
this.html.find(".quantiteNbLots").val(this.venteData.quantiteNbLots);
|
||||||
}
|
}
|
||||||
|
|
||||||
setQuantiteIllimite(checked) {
|
setQuantiteIllimite(checked) {
|
||||||
this.venteData.quantiteIllimite = checked;
|
this.updateVente({ quantiteIllimite: checked })
|
||||||
this.html.find(".label-quantiteIllimite").text(this.venteData.quantiteIllimite ? "Illimités" : "disponibles");
|
this.html.find(".label-quantiteIllimite").text(this.venteData.quantiteIllimite ? "Illimités" : "disponibles");
|
||||||
HtmlUtility.showControlWhen(this.html.find(".quantiteNbLots"), !this.venteData.quantiteIllimite)
|
HtmlUtility.showControlWhen(this.html.find(".quantiteNbLots"), !this.venteData.quantiteIllimite)
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,13 @@ export class Monnaie {
|
|||||||
return deniers;
|
return deniers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static toSolsDeniers(fortune) {
|
||||||
|
return {
|
||||||
|
sols: Math.floor(fortune),
|
||||||
|
deniers: Math.round(100 * (fortune - Math.floor(fortune)))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static getFortune(monnaies) {
|
static getFortune(monnaies) {
|
||||||
return (monnaies??[])
|
return (monnaies??[])
|
||||||
.map(m => Number(m.system.cout) * Number(m.system.quantite))
|
.map(m => Number(m.system.cout) * Number(m.system.quantite))
|
||||||
|
@ -86,22 +86,17 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
let formData = {
|
let formData = {
|
||||||
id: this.item.id,
|
|
||||||
title: this.item.name,
|
title: this.item.name,
|
||||||
|
id: this.item.id,
|
||||||
type: this.item.type,
|
type: this.item.type,
|
||||||
img: this.item.img,
|
img: this.item.img,
|
||||||
name: this.item.name,
|
name: this.item.name,
|
||||||
system: this.item.system,
|
system: this.item.system,
|
||||||
isGM: game.user.isGM,
|
|
||||||
actorId: this.actor?.id,
|
actorId: this.actor?.id,
|
||||||
isOwned: this.actor ? true : false,
|
|
||||||
owner: this.item.isOwner,
|
|
||||||
editable: this.isEditable,
|
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
|
||||||
isSoins: false,
|
|
||||||
description: await TextEditor.enrichHTML(this.item.system.description, { async: true }),
|
description: await TextEditor.enrichHTML(this.item.system.description, { async: true }),
|
||||||
descriptionmj: await TextEditor.enrichHTML(this.item.system.descriptionmj, { async: true }),
|
descriptionmj: await TextEditor.enrichHTML(this.item.system.descriptionmj, { async: true }),
|
||||||
isComestible: this.item.getUtilisationCuisine()
|
isComestible: this.item.getUtilisationCuisine(),
|
||||||
|
options: RdDSheetUtility.mergeDocumentRights(this.options, this.item, this.isEditable)
|
||||||
}
|
}
|
||||||
|
|
||||||
const competences = await SystemCompendiums.getCompetences(this.actor?.type);
|
const competences = await SystemCompendiums.getCompetences(this.actor?.type);
|
||||||
@ -138,12 +133,12 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
if (this.item.type == 'potion') {
|
if (this.item.type == 'potion') {
|
||||||
await RdDHerbes.addPotionFormData(formData);
|
await RdDHerbes.addPotionFormData(formData);
|
||||||
}
|
}
|
||||||
if (formData.isOwned && this.item.type == 'herbe' && (formData.system.categorie == 'Soin' || formData.system.categorie == 'Repos')) {
|
if (formData.options.isOwned && this.item.type == 'herbe' && (formData.system.categorie == 'Soin' || formData.system.categorie == 'Repos')) {
|
||||||
formData.isIngredientPotionBase = true;
|
formData.isIngredientPotionBase = true;
|
||||||
}
|
}
|
||||||
if (this.item.type == 'sortreserve') {
|
if (this.item.type == 'sortreserve') {
|
||||||
const sortId = this.item.system.sortid;
|
const sortId = this.item.system.sortid;
|
||||||
formData.sort = formData.isOwned ? this.item.actor.items.get(sortId) : game.items.get(sortId);
|
formData.sort = formData.options.isOwned ? this.item.actor.items.get(sortId) : game.items.get(sortId);
|
||||||
}
|
}
|
||||||
formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
|
formData.bonusCaseList = RdDItemSort.getBonusCaseList(formData, true);
|
||||||
|
|
||||||
@ -156,7 +151,9 @@ export class RdDItemSheet extends ItemSheet {
|
|||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
this.html = html;
|
this.html = html;
|
||||||
|
|
||||||
HtmlUtility.showControlWhen(this.html.find(".item-cout"), ReglesOptionelles.isUsing('afficher-prix-joueurs') || game.user.isGM || !this.item.isOwned);
|
HtmlUtility.showControlWhen(this.html.find(".item-cout"), ReglesOptionelles.isUsing('afficher-prix-joueurs')
|
||||||
|
|| game.user.isGM
|
||||||
|
|| !this.item.isOwned);
|
||||||
HtmlUtility.showControlWhen(this.html.find(".item-magique"), this.item.isMagique());
|
HtmlUtility.showControlWhen(this.html.find(".item-magique"), this.item.isMagique());
|
||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
|
@ -29,7 +29,6 @@ export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
prepareConteneurData(formData) {
|
prepareConteneurData(formData) {
|
||||||
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
||||||
|
|
||||||
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
|
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
|
||||||
formData.subItems = formData.conteneurs.find(it => it._id == this.item.id)?.subItems;
|
formData.subItems = formData.conteneurs.find(it => it._id == this.item.id)?.subItems;
|
||||||
}
|
}
|
||||||
@ -44,7 +43,8 @@ export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
|
|||||||
const dragData = {
|
const dragData = {
|
||||||
actorId: this.actor.id,
|
actorId: this.actor.id,
|
||||||
type: "Item",
|
type: "Item",
|
||||||
data: item.system
|
data: item.system,
|
||||||
|
uuid: item.uuid
|
||||||
};
|
};
|
||||||
|
|
||||||
event.dataTransfer.setData("text/plain", JSON.stringify(dragData));
|
event.dataTransfer.setData("text/plain", JSON.stringify(dragData));
|
||||||
@ -52,7 +52,8 @@ export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
|
|||||||
|
|
||||||
async _onDropItem(event, dragData) {
|
async _onDropItem(event, dragData) {
|
||||||
if (this.actor) {
|
if (this.actor) {
|
||||||
const dropParams = await RdDSheetUtility.prepareItemDropParameters(this.item.id, this.actor, dragData, this.objetVersConteneur);
|
const destItemId = this.html.find(event.target)?.closest('.item').attr('data-item-id') ?? this.item.id
|
||||||
|
const dropParams = await RdDSheetUtility.prepareItemDropParameters(destItemId, this.actor, dragData, this.objetVersConteneur);
|
||||||
await this.actor.processDropItem(dropParams);
|
await this.actor.processDropItem(dropParams);
|
||||||
await this.render(true);
|
await this.render(true);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ export class RdDServiceItemSheet extends RdDItemSheet {
|
|||||||
|
|
||||||
async getData() {
|
async getData() {
|
||||||
const formData = await super.getData();
|
const formData = await super.getData();
|
||||||
formData.disabled = formData.isGM || formData.isOwned ? '' : 'disabled';
|
formData.disabled = formData.options.isGM || formData.options.isOwned ? '' : 'disabled';
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,13 +8,11 @@ export class RdDAlchimie {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static processManipulation(recette, actorId = undefined) {
|
static processManipulation(recette, actorId = undefined) {
|
||||||
//console.log("CALLED", recette, recette.isOwned, actorId );
|
|
||||||
let manip = recette.system.manipulation;
|
let manip = recette.system.manipulation;
|
||||||
let matchArray = manip.match(matchOperations);
|
let matchArray = manip.match(matchOperations);
|
||||||
if (matchArray) {
|
if (matchArray) {
|
||||||
for (let matchStr of matchArray) {
|
for (let matchStr of matchArray) {
|
||||||
let result = matchStr.match(matchOperationTerms);
|
let result = matchStr.match(matchOperationTerms);
|
||||||
//console.log("RESULT ", result);
|
|
||||||
if (result[1] && result[2]) {
|
if (result[1] && result[2]) {
|
||||||
let commande = Misc.upperFirst(result[1]);
|
let commande = Misc.upperFirst(result[1]);
|
||||||
let replacement = this[`_alchimie${commande}`](recette, result[2], actorId);
|
let replacement = this[`_alchimie${commande}`](recette, result[2], actorId);
|
||||||
|
@ -1,9 +1,24 @@
|
|||||||
import { DialogSplitItem } from "./dialog-split-item.js";
|
import { DialogSplitItem } from "./dialog-split-item.js";
|
||||||
import { RdDItem } from "./item.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { SystemCompendiums } from "./settings/system-compendiums.js";
|
|
||||||
|
|
||||||
export class RdDSheetUtility {
|
export class RdDSheetUtility {
|
||||||
|
|
||||||
|
static mergeDocumentRights(options, document, editable) {
|
||||||
|
const userRightLevel = game.user.isGM
|
||||||
|
? CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
||||||
|
: document.getUserLevel(game.user);
|
||||||
|
mergeObject(options, {
|
||||||
|
isGM: game.user.isGM,
|
||||||
|
isOwned: document.parent,
|
||||||
|
editable: editable,
|
||||||
|
cssClass: editable ? "editable" : "locked",
|
||||||
|
isLimited: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.LIMITED,
|
||||||
|
isObserver: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
|
||||||
|
isOwner: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
|
||||||
|
});
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
static getItem(event, actor) {
|
static getItem(event, actor) {
|
||||||
return actor.items.get(RdDSheetUtility.getItemId(event))
|
return actor.items.get(RdDSheetUtility.getItemId(event))
|
||||||
}
|
}
|
||||||
@ -23,7 +38,7 @@ export class RdDSheetUtility {
|
|||||||
|
|
||||||
static async prepareItemDropParameters(destItemId, actor, dragData, objetVersConteneur) {
|
static async prepareItemDropParameters(destItemId, actor, dragData, objetVersConteneur) {
|
||||||
let item = fromUuidSync(dragData.uuid);
|
let item = fromUuidSync(dragData.uuid);
|
||||||
if (item.pack && !item.system){
|
if (item.pack && !item.system) {
|
||||||
item = await RdDItem.getCorrespondingItem(item);
|
item = await RdDItem.getCorrespondingItem(item);
|
||||||
}
|
}
|
||||||
if (actor.canReceive(item)) {
|
if (actor.canReceive(item)) {
|
||||||
|
@ -278,8 +278,9 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('apostrophe', (article, str) => Grammar.apostrophe(article, str));
|
Handlebars.registerHelper('apostrophe', (article, str) => Grammar.apostrophe(article, str));
|
||||||
Handlebars.registerHelper('un', str => Grammar.articleIndetermine(str));
|
Handlebars.registerHelper('un', str => Grammar.articleIndetermine(str));
|
||||||
Handlebars.registerHelper('accord', (genre, ...args) => Grammar.accord(genre, args));
|
Handlebars.registerHelper('accord', (genre, ...args) => Grammar.accord(genre, args));
|
||||||
Handlebars.registerHelper('buildConteneur', (objet, templateItem, options) => { return new Handlebars.SafeString(RdDUtility.buildConteneur(objet, 1, templateItem, options)); });
|
Handlebars.registerHelper('buildLigneInventaire', (item, options) => { return new Handlebars.SafeString(RdDUtility.buildLigneInventaire(item, options)); });
|
||||||
Handlebars.registerHelper('buildContenu', (objet) => { return new Handlebars.SafeString(RdDUtility.buildContenu(objet, 1, true)); });
|
Handlebars.registerHelper('buildInventaireConteneur', (actorId, itemId, options) => { return new Handlebars.SafeString(RdDUtility.buildInventaireConteneur(actorId, itemId, options)); });
|
||||||
|
Handlebars.registerHelper('buildContenuConteneur', (item, options) => { return new Handlebars.SafeString(RdDUtility.buildContenuConteneur(item, options)); });
|
||||||
Handlebars.registerHelper('calculerPrixCommercant', item => item.calculerPrixCommercant());
|
Handlebars.registerHelper('calculerPrixCommercant', item => item.calculerPrixCommercant());
|
||||||
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
||||||
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
||||||
@ -394,38 +395,58 @@ export class RdDUtility {
|
|||||||
return conteneurs.filter((conteneur, index, arr) => !conteneur.estContenu);
|
return conteneurs.filter((conteneur, index, arr) => !conteneur.estContenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
static prepareOptionsArbreInventaire(item, optionsArbre) {
|
||||||
/** Construit la structure récursive des conteneurs, avec imbrication potentielle
|
if (!optionsArbre.profondeur) {
|
||||||
*
|
optionsArbre.profondeur = 1
|
||||||
*/
|
};
|
||||||
static buildConteneur(objet, profondeur, templateItem, options) {
|
if (!optionsArbre.templateItem) {
|
||||||
if (!profondeur) profondeur = 1;
|
optionsArbre.templateItem = item.parent?.type == 'commerce'
|
||||||
if (!templateItem) templateItem = 'actor/inventaire-item.html'
|
? "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire-item.html"
|
||||||
objet.niveau = profondeur;
|
: "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-item.html";
|
||||||
|
}
|
||||||
const isConteneur = objet.type == 'conteneur';
|
item.niveau = optionsArbre.profondeur;
|
||||||
const isOuvert = isConteneur && this.getAfficheContenu(objet._id);
|
|
||||||
const isVide = isConteneur && objet.system.contenu.length == 0;
|
|
||||||
const conteneur = Handlebars.partials[`systems/foundryvtt-reve-de-dragon/templates/${templateItem}`]({
|
|
||||||
item: objet,
|
|
||||||
vide: isVide,
|
|
||||||
ouvert: isOuvert,
|
|
||||||
options: options
|
|
||||||
});
|
|
||||||
const contenu = isConteneur ? RdDUtility.buildContenu(objet, profondeur, isOuvert, templateItem, options) : '';
|
|
||||||
return conteneur + contenu;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static buildContenu(objet, profondeur, afficherContenu, templateItem, options) {
|
|
||||||
if (!profondeur) profondeur = 1;
|
|
||||||
if (!templateItem) templateItem = 'actor/inventaire-item.html'
|
|
||||||
objet.niveau = profondeur;
|
|
||||||
|
|
||||||
const display = afficherContenu ? 'item-display-show' : 'item-display-hide';
|
/**
|
||||||
let strContenu = `<ul class='item-list alterne-list ${display} list-item-margin${Math.min(profondeur, 6)}'>`;
|
* Construit la structure récursive des conteneurs, avec imbrication potentielle
|
||||||
for (let subItem of objet.subItems) {
|
*/
|
||||||
strContenu += this.buildConteneur(subItem, profondeur + 1, templateItem, options);
|
static buildLigneInventaire(item, options = {}, optionsArbre = { ouvert: false, profondeur: 1 }) {
|
||||||
|
RdDUtility.prepareOptionsArbreInventaire(item, optionsArbre);
|
||||||
|
|
||||||
|
const isConteneur = item.type == 'conteneur';
|
||||||
|
const inventaire = {
|
||||||
|
item: item,
|
||||||
|
vide: isConteneur && item.system.contenu.length == 0,
|
||||||
|
ouvert: isConteneur && RdDUtility.getAfficheContenu(item._id),
|
||||||
|
options: options
|
||||||
|
};
|
||||||
|
optionsArbre.ouvert = inventaire.ouvert
|
||||||
|
const ligneObjet = Handlebars.partials[optionsArbre.templateItem](inventaire);
|
||||||
|
if (isConteneur) {
|
||||||
|
return ligneObjet + RdDUtility.buildContenuConteneur(item, options, optionsArbre);
|
||||||
|
}
|
||||||
|
return ligneObjet;
|
||||||
|
}
|
||||||
|
|
||||||
|
static buildInventaireConteneur(actorId, itemId, options) {
|
||||||
|
const actor = game.actors.get(actorId)
|
||||||
|
const item = actor?.items.get(itemId)
|
||||||
|
if (item) {
|
||||||
|
return RdDUtility.buildContenuConteneur(item, options, { ouvert: true, profondeur: 1 });
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static buildContenuConteneur(conteneur, options = {}, optionsArbre = {}) {
|
||||||
|
RdDUtility.prepareOptionsArbreInventaire(conteneur, optionsArbre);
|
||||||
|
const display = optionsArbre.ouvert ? 'item-display-show' : 'item-display-hide';
|
||||||
|
let strContenu = `<ul class='item-list alterne-list ${display} list-item-margin${Math.min(optionsArbre.profondeur, 6)}'>`;
|
||||||
|
optionsArbre.profondeur++;
|
||||||
|
for (let contenu of conteneur.subItems) {
|
||||||
|
strContenu += this.buildLigneInventaire(contenu, options, optionsArbre);
|
||||||
}
|
}
|
||||||
return strContenu + "</ul>";
|
return strContenu + "</ul>";
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"id": "foundryvtt-reve-de-dragon",
|
"id": "foundryvtt-reve-de-dragon",
|
||||||
"title": "Rêve de Dragon",
|
"title": "Rêve de Dragon",
|
||||||
"version": "10.6.6",
|
"version": "10.6.7",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.6.6.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.6.7.zip",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v10/system.json",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
{{!-- Description Tab --}}
|
{{!-- Description Tab --}}
|
||||||
<div class="tab description" data-group="primary" data-tab="description">
|
<div class="tab description" data-group="primary" data-tab="description">
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor description target="system.description" button=true owner=owner editable=editable engine="prosemirror"}}
|
{{editor description target="system.description" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor description target="system.description" button=true owner=owner editable=editable engine="prosemirror"}}
|
{{editor description target="system.description" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
||||||
|
|
||||||
|
@ -190,11 +190,11 @@
|
|||||||
<article class="flexcol">
|
<article class="flexcol">
|
||||||
<h3>Biographie : </h3>
|
<h3>Biographie : </h3>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor biographie target="system.biographie" button=true owner=options.owner editable=true engine="prosemirror"}}
|
{{editor biographie target="system.biographie" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
<h3>Notes : </h3>
|
<h3>Notes : </h3>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor notes target="system.notes" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor notes target="system.notes" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-journal.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-journal.html"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor description target="system.description" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor description target="system.description" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="flexcol form-group medium-editor">
|
<div class="flexcol form-group medium-editor">
|
||||||
{{editor description target="system.description" button=true owner=options.owner editable=options.isOwner engine="prosemirror"}}
|
{{editor description target="system.description" button=true owner=options.isOwner editable=options.isOwner engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire.html"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire.html"}}
|
||||||
|
@ -25,12 +25,11 @@
|
|||||||
{{#each objets as |item id|}}
|
{{#each objets as |item id|}}
|
||||||
{{#unless item.estContenu}}
|
{{#unless item.estContenu}}
|
||||||
{{#if (ne item.type 'conteneur')}}
|
{{#if (ne item.type 'conteneur')}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire-item.html"
|
{{buildLigneInventaire item ../options}}
|
||||||
item=item vide=true ouvert=true options=../options}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each conteneurs as |conteneur id|}}
|
{{#each conteneurs as |conteneur id|}}
|
||||||
{{buildConteneur conteneur 'actor/commerce-inventaire-item.html' ../options}}
|
{{buildLigneInventaire conteneur ../options}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
<h3>Notes du MJ : </h3>
|
<h3>Notes du MJ : </h3>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor notesmj target="system.notesmj" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor notesmj target="system.notesmj" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{#if (or @root.options.isObserver (ne item.type 'monnaie'))}}
|
{{#if (or options.isObserver (ne item.type 'monnaie'))}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true">
|
<li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true">
|
||||||
<span class="equipement-nom {{#if (eq item.type 'conteneur')}}conteneur-name{{/if}} ">
|
<span class="equipement-nom {{#if (eq item.type 'conteneur')}}conteneur-name{{/if}} ">
|
||||||
{{#if (eq item.type 'conteneur')}}
|
{{#if (eq item.type 'conteneur')}}
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="equipement-detail">{{numberFormat item.system.encTotal decimals=2}}</span>
|
<span class="equipement-detail">{{numberFormat item.system.encTotal decimals=2}}</span>
|
||||||
<span class="equipement-actions item-controls">
|
<span class="equipement-actions item-controls">
|
||||||
{{#if @root.options.isOwner}}
|
{{#if options.isOwner}}
|
||||||
{{#unless item.estContenu}}
|
{{#unless item.estContenu}}
|
||||||
{{#if (or (eq item.type 'arme') (eq item.type 'armure') )}}
|
{{#if (or (eq item.type 'arme') (eq item.type 'armure') )}}
|
||||||
<a class="item-equip" title="Equiper">{{#if item.system.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a>
|
<a class="item-equip" title="Equiper">{{#if item.system.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<a class="item-montrer" title="Montrer"><i class="fas fa-comment"></i></a>
|
<a class="item-montrer" title="Montrer"><i class="fas fa-comment"></i></a>
|
||||||
{{#if @root.options.isOwner}}
|
{{#if options.isOwner}}
|
||||||
{{#if item.system.actionPrincipale}}
|
{{#if item.system.actionPrincipale}}
|
||||||
<a class="item-action">{{item.system.actionPrincipale}}</a>
|
<a class="item-action">{{item.system.actionPrincipale}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<h4>Equipement</h4>
|
<h4>Equipement</h4>
|
||||||
<span class="item-name">
|
<span class="item-name">
|
||||||
|
{{#if options.isOwned}}
|
||||||
<a class="chat-card-button creer-un-objet">Nouvel objet</a>
|
<a class="chat-card-button creer-un-objet">Nouvel objet</a>
|
||||||
|
{{/if}}
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
<a class="chat-card-button nettoyer-conteneurs">Tout vider</a>
|
<a class="chat-card-button nettoyer-conteneurs">Tout vider</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -20,11 +22,11 @@
|
|||||||
{{#each objets as |item id|}}
|
{{#each objets as |item id|}}
|
||||||
{{#unless item.estContenu}}
|
{{#unless item.estContenu}}
|
||||||
{{#if (ne item.type 'conteneur')}}
|
{{#if (ne item.type 'conteneur')}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-item.html" item=item vide=true ouvert=true options=@root.options}}
|
{{buildLigneInventaire item @root.options}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each conteneurs as |conteneur id|}}
|
{{#each conteneurs as |conteneur id|}}
|
||||||
{{buildConteneur this 'actor/inventaire-item.html' @root.options}}
|
{{buildLigneInventaire conteneur @root.options}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div class="flexrow flex-group-left">
|
<div class="flexrow flex-group-left">
|
||||||
<label>Nombre de lots</label>
|
<label>Nombre de lots</label>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
{{#unless isOwned}}
|
{{#unless options.isOwned}}
|
||||||
<input name="quantiteIllimite" class="quantiteIllimite flex-shrink" type="checkbox" {{#if
|
<input name="quantiteIllimite" class="quantiteIllimite flex-shrink" type="checkbox" {{#if
|
||||||
quantiteIllimite}}checked{{/if}} />
|
quantiteIllimite}}checked{{/if}} />
|
||||||
<label class="label-quantiteIllimite flex-shrink">disponibles</label>
|
<label class="label-quantiteIllimite flex-shrink">disponibles</label>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<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">
|
<h1 class="charname">
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<input name="name" type="text" value="{{name}}" placeholder="Name"/>
|
<input name="name" type="text" value="{{name}}" placeholder="Name"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.base">Niveau de base </label>
|
<label for="system.base">Niveau de base </label>
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<select name="system.base" data-dtype="Number">
|
<select name="system.base" data-dtype="Number">
|
||||||
{{#select system.base}}
|
{{#select system.base}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-base-competence.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-base-competence.html"}}
|
||||||
|
@ -13,10 +13,8 @@
|
|||||||
<input class="attribute-value" type="text" name="system.capacite" value="{{system.capacite}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.capacite" value="{{system.capacite}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
|
||||||
|
{{#if options.isOwned}}
|
||||||
{{#if isOwned}}
|
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label>Contenu : </label></span>
|
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
<li class="competence-header flexrow">
|
<li class="competence-header flexrow">
|
||||||
<span class="equipement-nom">Nom</span>
|
<span class="equipement-nom">Nom</span>
|
||||||
@ -24,7 +22,7 @@
|
|||||||
<span class="equipement-detail">Enc.</span>
|
<span class="equipement-detail">Enc.</span>
|
||||||
<span class="equipement-actions">Actions</span>
|
<span class="equipement-actions">Actions</span>
|
||||||
</li>
|
</li>
|
||||||
{{buildContenu this}}
|
{{buildInventaireConteneur actorId id options}}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -12,13 +12,13 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label>Extrait</label>
|
<label>Extrait</label>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor extrait target="system.extrait" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor extrait target="system.extrait" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label>Texte complet</label>
|
<label>Texte complet</label>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor texte target="system.texte" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor texte target="system.texte" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<label>Créature correspondante</label>
|
<label>Créature correspondante</label>
|
||||||
<div>
|
<div>
|
||||||
{{#if system.actor.id}}
|
{{#if system.actor.id}}
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<label>
|
<label>
|
||||||
{{>'systems/foundryvtt-reve-de-dragon/templates/common/compendium-link.hbs'
|
{{>'systems/foundryvtt-reve-de-dragon/templates/common/compendium-link.hbs'
|
||||||
pack=system.actor.pack id=system.actor.id name=system.actor.name}}
|
pack=system.actor.pack id=system.actor.id name=system.actor.name}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<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 options.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>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<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">
|
||||||
{{#if (or isGM system.identifie)}}
|
{{#if (or options.isGM system.identifie)}}
|
||||||
<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>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h1 class="charname">Inconnue</h1>
|
<h1 class="charname">Inconnue</h1>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
{{#if (or isGM system.identifie)}}
|
{{#if (or options.isGM system.identifie)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.identifie">Identifiée ? </label>
|
<label for="system.identifie">Identifiée ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
||||||
@ -36,14 +36,14 @@
|
|||||||
<label for="system.remedesconnus">Remedes Connus ? </label>
|
<label for="system.remedesconnus">Remedes Connus ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#if (or isGM system.remedesconnus)}}
|
{{#if (or options.isGM system.remedesconnus)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.remedes">Remèdes </label>
|
<label for="system.remedes">Remèdes </label>
|
||||||
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (and isGM isOwned)}}
|
{{#if (and options.isGM options.isOwned)}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contractée" labelfin="Prochain jet"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contractée" labelfin="Prochain jet"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Malus</label>
|
<label for="xp">Malus</label>
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<select name="system.malus" id="malus" data-dtype="Number">
|
<select name="system.malus" id="malus" data-dtype="Number">
|
||||||
{{#select system.malus}}
|
{{#select system.malus}}
|
||||||
<option value="0">0</option>
|
<option value="0">0</option>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<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">
|
||||||
{{#if (or isGM system.identifie)}}
|
{{#if (or options.isGM system.identifie)}}
|
||||||
<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>
|
||||||
{{else}}
|
{{else}}
|
||||||
<h1 class="charname">Inconnue</h1>
|
<h1 class="charname">Inconnue</h1>
|
||||||
@ -14,9 +14,9 @@
|
|||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.active">Actif ? </label>
|
<label for="system.active">Actif ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.active" {{#if system.active}}checked{{/if}} {{#unless isGM}}disabled{{/unless}}/>
|
<input class="attribute-value" type="checkbox" name="system.active" {{#if system.active}}checked{{/if}} {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#if (or isGM system.identifie)}}
|
{{#if (or options.isGM system.identifie)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.identifie">Identifiée ? </label>
|
<label for="system.identifie">Identifiée ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.identifie" {{#if system.identifie}}checked{{/if}}/>
|
||||||
@ -40,14 +40,14 @@
|
|||||||
<label for="system.remedesconnus">Remedes Connus ? </label>
|
<label for="system.remedesconnus">Remedes Connus ? </label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#if (or isGM system.remedesconnus)}}
|
{{#if (or options.isGM system.remedesconnus)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.remedes">Remèdes </label>
|
<label for="system.remedes">Remèdes </label>
|
||||||
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (and isGM isOwned system.active)}}
|
{{#if (and options.isGM options.isOwned system.active)}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contracté" labelfin="Prochain jet"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Contracté" labelfin="Prochain jet"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<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 options.isOwned}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="xp"><a class="consommer-potion chat-card-button" data-actor-id="{{actorId}}">Consommer cette potion et appliquer ses effets</a></span>
|
<span for="xp"><a class="consommer-potion chat-card-button" data-actor-id="{{actorId}}">Consommer cette potion et appliquer ses effets</a></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<input class="attribute-value" type="text" name="system.refoulement" value="{{system.refoulement}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.refoulement" value="{{system.refoulement}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if isOwned}}
|
{{#if options.isOwned}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -9,25 +9,25 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Manipulation : </label></span>
|
<span><label class="alchimie-title">Manipulation : </label></span>
|
||||||
<div class="form-group medium-editor">
|
<div class="form-group medium-editor">
|
||||||
{{editor manipulation_update target="system.manipulation" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor manipulation_update target="system.manipulation" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Utilisation : </label></span>
|
<span><label class="alchimie-title">Utilisation : </label></span>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor utilisation target="system.utilisation" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor utilisation target="system.utilisation" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Enchantement : </label></span>
|
<span><label class="alchimie-title">Enchantement : </label></span>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor enchantement target="system.enchantement" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor enchantement target="system.enchantement" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label class="alchimie-title">Sur-effet : </label></span>
|
<span><label class="alchimie-title">Sur-effet : </label></span>
|
||||||
<div class="form-group small-editor">
|
<div class="form-group small-editor">
|
||||||
{{editor sureffet target="system.sureffet" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor sureffet target="system.sureffet" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label>Ingrédients : </label></span>
|
<span><label>Ingrédients : </label></span>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor ingredients target="system.ingredients" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor ingredients target="system.ingredients" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -11,31 +11,31 @@
|
|||||||
</nav>
|
</nav>
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="tab items" data-group="primary" data-tab="rencontre">
|
<div class="tab items" data-group="primary" data-tab="rencontre">
|
||||||
{{#if isOwned}}
|
{{#if options.isOwned}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.force">Rêve</label>
|
<label for="system.force">Rêve</label>
|
||||||
<input type="text" name="system.force" value="{{system.force}}" data-dtype="Number"/>
|
<input type="text" name="system.force" value="{{system.force}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.coord">Case TMR - {{caseTmr-label system.coord}}</label>
|
<label for="system.coord">Case TMR - {{caseTmr-label system.coord}}</label>
|
||||||
<input class="attribute-value" type="text" name="system.coord" value="{{system.coord}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
<input class="attribute-value" type="text" name="system.coord" value="{{system.coord}}" data-dtype="String" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.date">Date/heure</label>
|
<label for="system.date">Date/heure</label>
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
<input class="attribute-value" type="text" name="system.date" value="{{system.date}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
<input class="attribute-value" type="text" name="system.date" value="{{system.date}}" data-dtype="String" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
<input class="attribute-value" type="text" name="system.heure" value="{{system.heure}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
<input class="attribute-value" type="text" name="system.heure" value="{{system.heure}}" data-dtype="String" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Rencontrée le" labelfin="Disparaît le"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Rencontrée le" labelfin="Disparaît le"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.formule">Rêve</label>
|
<label for="system.formule">Rêve</label>
|
||||||
<input type="text" name="system.formule" value="{{system.formule}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="text" name="system.formule" value="{{system.formule}}" data-dtype="String" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.genre">Genre</label>
|
<label for="system.genre">Genre</label>
|
||||||
<select type="text" name="system.genre" data-dtype="String" {{#unless isGM}}disabled{{/unless}}>
|
<select type="text" name="system.genre" data-dtype="String" {{#unless options.isGM}}disabled{{/unless}}>
|
||||||
{{#select system.genre}}
|
{{#select system.genre}}
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
<option value="f">Féminin</option>
|
<option value="f">Féminin</option>
|
||||||
@ -45,26 +45,26 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.ordreTri">Position dans la table</label>
|
<label for="system.ordreTri">Position dans la table</label>
|
||||||
<input type="number" name="system.ordreTri" value="{{system.ordreTri}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.ordreTri" value="{{system.ordreTri}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.presentCite">Offert par les Présents des cités</label>
|
<label for="system.presentCite">Offert par les Présents des cités</label>
|
||||||
<input type="checkbox" name="system.presentCite" data-dtype="Boolean" {{#if system.presentCite}}checked{{/if}} {{#unless isGM}}disabled{{/unless}}/>
|
<input type="checkbox" name="system.presentCite" data-dtype="Boolean" {{#if system.presentCite}}checked{{/if}} {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.refoulement">Refoulement</label>
|
<label for="system.refoulement">Refoulement</label>
|
||||||
<input type="number" name="system.refoulement" value="{{system.refoulement}}" min="0" max="4" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.refoulement" value="{{system.refoulement}}" min="0" max="4" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.mauvaiseRencontre">Mauvaise rencontre</label>
|
<label for="system.mauvaiseRencontre">Mauvaise rencontre</label>
|
||||||
<input type="checkbox" name="system.mauvaiseRencontre" data-dtype="Boolean" {{#if system.mauvaiseRencontre}}checked{{/if}} {{#unless isGM}}disabled{{/unless}}/>
|
<input type="checkbox" name="system.mauvaiseRencontre" data-dtype="Boolean" {{#if system.mauvaiseRencontre}}checked{{/if}} {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
{{#unless isOwned}}
|
{{#unless isOwned}}
|
||||||
{{#if system.mauvaiseRencontre}}
|
{{#if system.mauvaiseRencontre}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.mauvaise">Fréquence mauvaise rencontre</label>
|
<label for="system.frequence.mauvaise">Fréquence mauvaise rencontre</label>
|
||||||
<input type="number" name="system.frequence.mauvaise" value="{{system.frequence.mauvaise}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.mauvaise" value="{{system.frequence.mauvaise}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
@ -74,11 +74,11 @@
|
|||||||
<div class="tab items" data-group="primary" data-tab="succes">
|
<div class="tab items" data-group="primary" data-tab="succes">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.succes.message">Message</label>
|
<label for="system.succes.message">Message</label>
|
||||||
<textarea autocomplete="off" title="Message en cas de succès" name="system.succes.message" {{#unless isGM}}disabled{{/unless}}/>{{system.succes.message}}</textarea>
|
<textarea autocomplete="off" title="Message en cas de succès" name="system.succes.message" {{#unless options.isGM}}disabled{{/unless}}/>{{system.succes.message}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="button-dropdown">
|
<div class="button-dropdown">
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
|
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
|
||||||
<div class="button-dropdown-content">
|
<div class="button-dropdown-content">
|
||||||
{{#each effets.succes.liste as |effet|}}
|
{{#each effets.succes.liste as |effet|}}
|
||||||
@ -106,12 +106,12 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.succes.reference">Réference</label>
|
<label for="system.succes.reference">Réference</label>
|
||||||
<input type="text" name="system.succes.reference" value="{{system.succes.reference}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="text" name="system.succes.reference" value="{{system.succes.reference}}" data-dtype="String" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label for="system.succes.poesie">Poésie</label>
|
<label for="system.succes.poesie">Poésie</label>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor system.succes.poesie target="system.succes.poesie" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor system.succes.poesie target="system.succes.poesie" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -119,11 +119,11 @@
|
|||||||
<div class="tab items" data-group="primary" data-tab="echec">
|
<div class="tab items" data-group="primary" data-tab="echec">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.echec.message">Message</label>
|
<label for="system.echec.message">Message</label>
|
||||||
<textarea autocomplete="off" title="Message en cas d'échec" name="system.echec.message" {{#unless isGM}}disabled{{/unless}}/>{{system.echec.message}}</textarea>
|
<textarea autocomplete="off" title="Message en cas d'échec" name="system.echec.message" {{#unless options.isGM}}disabled{{/unless}}/>{{system.echec.message}}</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="button-dropdown">
|
<div class="button-dropdown">
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
|
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
|
||||||
<div class="button-dropdown-content">
|
<div class="button-dropdown-content">
|
||||||
{{#each effets.echec.liste as |effet|}}
|
{{#each effets.echec.liste as |effet|}}
|
||||||
@ -151,12 +151,12 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.echec.reference">Réference</label>
|
<label for="system.echec.reference">Réference</label>
|
||||||
<input type="text" name="system.echec.reference" value="{{system.echec.reference}}" data-dtype="String" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="text" name="system.echec.reference" value="{{system.echec.reference}}" data-dtype="String" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<label for="system.echec.poesie">Poésie</label>
|
<label for="system.echec.poesie">Poésie</label>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor system.echec.poesie target="system.echec.poesie" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor system.echec.poesie target="system.echec.poesie" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -166,59 +166,59 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.cite">Fréquence en Cité</label>
|
<label for="system.frequence.cite">Fréquence en Cité</label>
|
||||||
<input type="number" name="system.frequence.cite" value="{{system.frequence.cite}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.cite" value="{{system.frequence.cite}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.sanctuaire">Fréquence en Sanctuaire</label>
|
<label for="system.frequence.sanctuaire">Fréquence en Sanctuaire</label>
|
||||||
<input type="number" name="system.frequence.sanctuaire" value="{{system.frequence.sanctuaire}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.sanctuaire" value="{{system.frequence.sanctuaire}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.plaines">Fréquence en Plaines</label>
|
<label for="system.frequence.plaines">Fréquence en Plaines</label>
|
||||||
<input type="number" name="system.frequence.plaines" value="{{system.frequence.plaines}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.plaines" value="{{system.frequence.plaines}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.pont">Fréquence en Pont</label>
|
<label for="system.frequence.pont">Fréquence en Pont</label>
|
||||||
<input type="number" name="system.frequence.pont" value="{{system.frequence.pont}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.pont" value="{{system.frequence.pont}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.collines">Fréquence en Collines</label>
|
<label for="system.frequence.collines">Fréquence en Collines</label>
|
||||||
<input type="number" name="system.frequence.collines" value="{{system.frequence.collines}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.collines" value="{{system.frequence.collines}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.foret">Fréquence en Forêt</label>
|
<label for="system.frequence.foret">Fréquence en Forêt</label>
|
||||||
<input type="number" name="system.frequence.foret" value="{{system.frequence.foret}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.foret" value="{{system.frequence.foret}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.monts">Fréquence en Monts</label>
|
<label for="system.frequence.monts">Fréquence en Monts</label>
|
||||||
<input type="number" name="system.frequence.monts" value="{{system.frequence.monts}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.monts" value="{{system.frequence.monts}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.desert">Fréquence en Désert</label>
|
<label for="system.frequence.desert">Fréquence en Désert</label>
|
||||||
<input type="number" name="system.frequence.desert" value="{{system.frequence.desert}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.desert" value="{{system.frequence.desert}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.fleuve">Fréquence en Fleuve</label>
|
<label for="system.frequence.fleuve">Fréquence en Fleuve</label>
|
||||||
<input type="number" name="system.frequence.fleuve" value="{{system.frequence.fleuve}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.fleuve" value="{{system.frequence.fleuve}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.lac">Fréquence en Lac</label>
|
<label for="system.frequence.lac">Fréquence en Lac</label>
|
||||||
<input type="number" name="system.frequence.lac" value="{{system.frequence.lac}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.lac" value="{{system.frequence.lac}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.marais">Fréquence en Marais</label>
|
<label for="system.frequence.marais">Fréquence en Marais</label>
|
||||||
<input type="number" name="system.frequence.marais" value="{{system.frequence.marais}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.marais" value="{{system.frequence.marais}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.gouffre">Fréquence en Gouffre</label>
|
<label for="system.frequence.gouffre">Fréquence en Gouffre</label>
|
||||||
<input type="number" name="system.frequence.gouffre" value="{{system.frequence.gouffre}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.gouffre" value="{{system.frequence.gouffre}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.necropole">Fréquence en Nécropole</label>
|
<label for="system.frequence.necropole">Fréquence en Nécropole</label>
|
||||||
<input type="number" name="system.frequence.necropole" value="{{system.frequence.necropole}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.necropole" value="{{system.frequence.necropole}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence.desolation">Fréquence en Désolation</label>
|
<label for="system.frequence.desolation">Fréquence en Désolation</label>
|
||||||
<input type="number" name="system.frequence.desolation" value="{{system.frequence.desolation}}" min="0" max="100" data-dtype="Number" {{#unless isGM}}disabled{{/unless}}/>
|
<input type="number" name="system.frequence.desolation" value="{{system.frequence.desolation}}" min="0" max="100" data-dtype="Number" {{#unless options.isGM}}disabled{{/unless}}/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
<label for="system.xp">XP</label>
|
<label for="system.xp">XP</label>
|
||||||
<input class="attribute-value" type="text" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{#if owner}}
|
{{#if options.isOwner}}
|
||||||
{{#each bonusCaseList as |bcData key|}}
|
{{#each bonusCaseList as |bcData key|}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="caseValue">Case/Bonus :</label>
|
<label for="caseValue">Case/Bonus :</label>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if isOwned}}
|
{{#if options.isOwned}}
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<label for="xp">Fatigue</label>
|
<label for="xp">Fatigue</label>
|
||||||
<input class="attribute-value" type="text" name="system.fatigue" value="{{system.fatigue}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.fatigue" value="{{system.fatigue}}" data-dtype="Number"/>
|
||||||
</div>
|
</div>
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Cacher les Points de Tâches nécessaires au joueur</label>
|
<label for="xp">Cacher les Points de Tâches nécessaires au joueur</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.cacher_points_de_tache" value="{{system.cacher_points_de_tache}}" {{checked system.cacher_points_de_tache}}/>
|
<input class="attribute-value" type="checkbox" name="system.cacher_points_de_tache" value="{{system.cacher_points_de_tache}}" {{checked system.cacher_points_de_tache}}/>
|
||||||
@ -59,11 +59,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Nombre de Succès</label>
|
<label for="xp">Nombre de Succès</label>
|
||||||
<input class="attribute-value" type="text" name="system.nb_jet_succes" value="{{system.nb_jet_succes}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
|
<input class="attribute-value" type="text" name="system.nb_jet_succes" value="{{system.nb_jet_succes}}" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="xp">Nombre d'Echecs</label>
|
<label for="xp">Nombre d'Echecs</label>
|
||||||
<input class="attribute-value" type="text" name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
|
<input class="attribute-value" type="text" name="system.nb_jet_echec" value="{{system.nb_jet_echec}}" data-dtype="Number" {{#if options.isGM}}{{else}}disabled{{/if}}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{#if (and isOwned isComestible)}}
|
{{#if (and options.isOwned isComestible)}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
{{#if (eq isComestible 'brut')}}
|
{{#if (eq isComestible 'brut')}}
|
||||||
<span><a class="preparer-nourriture chat-card-button" data-actor-id="{{actorId}}">Cuisiner</a></span>
|
<span><a class="preparer-nourriture chat-card-button" data-actor-id="{{actorId}}">Cuisiner</a></span>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{#unless isOwned}}
|
{{#unless options.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">
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{{#unless isOwned}}
|
{{#unless options.isOwned}}
|
||||||
<a class="item" data-tab="environnement">Environnement</a>
|
<a class="item" data-tab="environnement">Environnement</a>
|
||||||
{{/unless}}
|
{{/unless}}
|
@ -1,14 +1,14 @@
|
|||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label>Description : </label></span>
|
<span><label>Description : </label></span>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor description target="system.description" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor description target="system.description" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<div class="flexcol">
|
<div class="flexcol">
|
||||||
<span><label>Description (MJ seulement): </label></span>
|
<span><label>Description (MJ seulement): </label></span>
|
||||||
<div class="form-group large-editor">
|
<div class="form-group large-editor">
|
||||||
{{editor descriptionmj target="system.descriptionmj" button=true owner=owner editable=true engine="prosemirror"}}
|
{{editor descriptionmj target="system.descriptionmj" button=true owner=options.isOwner editable=options.editable engine="prosemirror"}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
@ -1,4 +1,4 @@
|
|||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.frequence">Fréquence</label>
|
<label for="system.frequence">Fréquence</label>
|
||||||
<input class="attribute-value" type="text" name="system.frequence" value="{{system.frequence}}" data-dtype="Number"/>
|
<input class="attribute-value" type="text" name="system.frequence" value="{{system.frequence}}" data-dtype="Number"/>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{#if isGM}}
|
{{#if options.isGM}}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="system.hautrevant">Pour haut-rêvants</label>
|
<label for="system.hautrevant">Pour haut-rêvants</label>
|
||||||
<input class="attribute-value" type="checkbox" name="system.hautrevant" {{#if system.hautrevant}}checked{{/if}}/>
|
<input class="attribute-value" type="checkbox" name="system.hautrevant" {{#if system.hautrevant}}checked{{/if}}/>
|
||||||
|
Loading…
Reference in New Issue
Block a user