Merge pull request 'v10.6.7' (#617) from VincentVk/foundryvtt-reve-de-dragon:v10 into v10

Reviewed-on: public/foundryvtt-reve-de-dragon#617
This commit is contained in:
uberwald 2023-01-28 20:50:52 +01:00
commit 2561a658f2
42 changed files with 229 additions and 199 deletions

View File

@ -31,32 +31,21 @@ export class RdDBaseActorSheet extends ActorSheet {
Monnaie.validerMonnaies(this.actor.itemTypes['monnaie']);
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 = {
title: this.title,
id: this.actor.id,
type: this.actor.type,
img: this.actor.img,
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 }),
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);
formData.calc = {
fortune: this.toSolsDeniers(this.actor.getFortune()),
fortune: Monnaie.toSolsDeniers(this.actor.getFortune()),
prixTotalEquipement: this.actor.computePrixTotalEquipement(),
encTotal: await this.actor.computeEncTotal(),
}
@ -64,17 +53,9 @@ export class RdDBaseActorSheet extends ActorSheet {
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
formData.conteneurs = RdDUtility.conteneursRacine(formData.conteneurs);
return formData;
}
toSolsDeniers(fortune) {
return {
sols: Math.floor(fortune),
deniers: Math.round(100 * (fortune - Math.floor(fortune)))
};
}
/* -------------------------------------------- */
static filterItemsPerTypeForSheet(formData, itemTypes) {
formData.recettescuisine = Misc.arrayOrEmpty(itemTypes['recettecuisine']);

View File

@ -8,7 +8,7 @@ export class DialogItemVente extends Dialog {
const venteData = {
item: item,
alias: item.actor?.name ?? game.user.name,
vendeurId: item.actor?.id ,
vendeurId: item.actor?.id,
prixOrigine: item.calculerPrixCommercant(),
prixUnitaire: item.calculerPrixCommercant(),
prixLot: item.calculerPrixCommercant(),
@ -40,51 +40,62 @@ export class DialogItemVente extends Dialog {
activateListeners(html) {
super.activateListeners(html);
this.html = html;
this.setQuantiteIllimite(this.venteData.quantiteIllimite);
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(".quantiteIllimite").change(event => this.setQuantiteIllimite(event.currentTarget.checked));
this.html.find(".prixLot").change(event => this.setPrixLot(Number(event.currentTarget.value)));
this.setQuantiteIllimite(this.venteData.quantiteIllimite);
}
async onProposer(it) {
await this.html.find(".tailleLot").change();
await this.html.find(".quantiteNbLots").change();
await this.html.find(".quantiteIllimite").change();
await this.html.find(".prixLot").change();
this.updateVente(this.getChoixVente());
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) {
this.venteData.prixLot = prixLot;
}
setTailleLot(tailleLot) {
// recalculer le prix du lot
if (tailleLot != this.venteData.tailleLot) {
this.venteData.prixLot = (tailleLot * this.venteData.prixOrigine).toFixed(2);
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);
const maxLots = Math.floor(this.venteData.quantiteMax / tailleLot);
this.updateVente({
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(".quantiteNbLots").val(this.venteData.quantiteNbLots);
this.html.find(".quantiteNbLots").attr("max", this.venteData.quantiteMaxLots)
}
setNbLots(nbLots) {
if (this.venteData.isOwned) {
nbLots = Math.max(0, Math.min(nbLots, this.venteData.quantiteMaxLots));
}
this.venteData.quantiteNbLots = nbLots;
this.updateVente({
quantiteNbLots: this.venteData.isOwned ? Math.max(0, Math.min(nbLots, this.venteData.quantiteMaxLots)) : nbLots
})
this.html.find(".quantiteNbLots").val(this.venteData.quantiteNbLots);
}
setQuantiteIllimite(checked) {
this.venteData.quantiteIllimite = checked;
this.updateVente({ quantiteIllimite: checked })
this.html.find(".label-quantiteIllimite").text(this.venteData.quantiteIllimite ? "Illimités" : "disponibles");
HtmlUtility.showControlWhen(this.html.find(".quantiteNbLots"), !this.venteData.quantiteIllimite)
}

View File

@ -62,6 +62,13 @@ export class Monnaie {
return deniers;
}
static toSolsDeniers(fortune) {
return {
sols: Math.floor(fortune),
deniers: Math.round(100 * (fortune - Math.floor(fortune)))
};
}
static getFortune(monnaies) {
return (monnaies??[])
.map(m => Number(m.system.cout) * Number(m.system.quantite))

View File

@ -86,22 +86,17 @@ export class RdDItemSheet extends ItemSheet {
/* -------------------------------------------- */
async getData() {
let formData = {
id: this.item.id,
title: this.item.name,
id: this.item.id,
type: this.item.type,
img: this.item.img,
name: this.item.name,
system: this.item.system,
isGM: game.user.isGM,
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 }),
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);
@ -138,12 +133,12 @@ export class RdDItemSheet extends ItemSheet {
if (this.item.type == 'potion') {
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;
}
if (this.item.type == 'sortreserve') {
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);
@ -156,7 +151,9 @@ export class RdDItemSheet extends ItemSheet {
super.activateListeners(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());
// Everything below here is only needed if the sheet is editable

View File

@ -29,7 +29,6 @@ export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
/* -------------------------------------------- */
prepareConteneurData(formData) {
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
formData.subItems = formData.conteneurs.find(it => it._id == this.item.id)?.subItems;
}
@ -44,7 +43,8 @@ export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
const dragData = {
actorId: this.actor.id,
type: "Item",
data: item.system
data: item.system,
uuid: item.uuid
};
event.dataTransfer.setData("text/plain", JSON.stringify(dragData));
@ -52,7 +52,8 @@ export class RdDConteneurItemSheet extends RdDItemInventaireSheet {
async _onDropItem(event, dragData) {
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.render(true);
}

View File

@ -6,7 +6,7 @@ export class RdDServiceItemSheet extends RdDItemSheet {
async getData() {
const formData = await super.getData();
formData.disabled = formData.isGM || formData.isOwned ? '' : 'disabled';
formData.disabled = formData.options.isGM || formData.options.isOwned ? '' : 'disabled';
return formData;
}

View File

@ -8,13 +8,11 @@ export class RdDAlchimie {
/* -------------------------------------------- */
static processManipulation(recette, actorId = undefined) {
//console.log("CALLED", recette, recette.isOwned, actorId );
let manip = recette.system.manipulation;
let matchArray = manip.match(matchOperations);
if (matchArray) {
for (let matchStr of matchArray) {
let result = matchStr.match(matchOperationTerms);
//console.log("RESULT ", result);
if (result[1] && result[2]) {
let commande = Misc.upperFirst(result[1]);
let replacement = this[`_alchimie${commande}`](recette, result[2], actorId);

View File

@ -1,9 +1,24 @@
import { DialogSplitItem } from "./dialog-split-item.js";
import { RdDItem } from "./item.js";
import { SystemCompendiums } from "./settings/system-compendiums.js";
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) {
return actor.items.get(RdDSheetUtility.getItemId(event))
}
@ -23,7 +38,7 @@ export class RdDSheetUtility {
static async prepareItemDropParameters(destItemId, actor, dragData, objetVersConteneur) {
let item = fromUuidSync(dragData.uuid);
if (item.pack && !item.system){
if (item.pack && !item.system) {
item = await RdDItem.getCorrespondingItem(item);
}
if (actor.canReceive(item)) {

View File

@ -278,8 +278,9 @@ export class RdDUtility {
Handlebars.registerHelper('apostrophe', (article, str) => Grammar.apostrophe(article, str));
Handlebars.registerHelper('un', str => Grammar.articleIndetermine(str));
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('buildContenu', (objet) => { return new Handlebars.SafeString(RdDUtility.buildContenu(objet, 1, true)); });
Handlebars.registerHelper('buildLigneInventaire', (item, options) => { return new Handlebars.SafeString(RdDUtility.buildLigneInventaire(item, options)); });
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('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
@ -394,38 +395,58 @@ export class RdDUtility {
return conteneurs.filter((conteneur, index, arr) => !conteneur.estContenu);
}
/* -------------------------------------------- */
/** Construit la structure récursive des conteneurs, avec imbrication potentielle
*
*/
static buildConteneur(objet, profondeur, templateItem, options) {
if (!profondeur) profondeur = 1;
if (!templateItem) templateItem = 'actor/inventaire-item.html'
objet.niveau = profondeur;
const isConteneur = objet.type == 'conteneur';
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 prepareOptionsArbreInventaire(item, optionsArbre) {
if (!optionsArbre.profondeur) {
optionsArbre.profondeur = 1
};
if (!optionsArbre.templateItem) {
optionsArbre.templateItem = item.parent?.type == 'commerce'
? "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire-item.html"
: "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-item.html";
}
item.niveau = optionsArbre.profondeur;
}
/* -------------------------------------------- */
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)}'>`;
for (let subItem of objet.subItems) {
strContenu += this.buildConteneur(subItem, profondeur + 1, templateItem, options);
/**
* Construit la structure récursive des conteneurs, avec imbrication potentielle
*/
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>";
}

View File

@ -1,8 +1,8 @@
{
"id": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"version": "10.6.6",
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-10.6.6.zip",
"version": "10.6.7",
"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",
"compatibility": {
"minimum": "10",

View File

@ -67,7 +67,7 @@
{{!-- Description Tab --}}
<div class="tab description" data-group="primary" data-tab="description">
<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>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}

View File

@ -44,7 +44,7 @@
</div>
</div>
<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>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}

View File

@ -190,11 +190,11 @@
<article class="flexcol">
<h3>Biographie : </h3>
<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>
<h3>Notes : </h3>
<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>
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/xp-journal.html"}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}

View File

@ -84,7 +84,7 @@
</div>
<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>
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
</div>

View File

@ -36,7 +36,7 @@
{{!-- Sheet Body --}}
<section class="sheet-body">
<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>
<hr>
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire.html"}}

View File

@ -24,13 +24,12 @@
</li>
{{#each objets as |item id|}}
{{#unless item.estContenu}}
{{#if (ne item.type 'conteneur')}}
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire-item.html"
item=item vide=true ouvert=true options=../options}}
{{/if}}
{{#if (ne item.type 'conteneur')}}
{{buildLigneInventaire item ../options}}
{{/if}}
{{/unless}}
{{/each}}
{{#each conteneurs as |conteneur id|}}
{{buildConteneur conteneur 'actor/commerce-inventaire-item.html' ../options}}
{{buildLigneInventaire conteneur ../options}}
{{/each}}
</ul>

View File

@ -1,6 +1,6 @@
{{#if options.isGM}}
<h3>Notes du MJ : </h3>
<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>
{{/if}}

View File

@ -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">
<span class="equipement-nom {{#if (eq item.type 'conteneur')}}conteneur-name{{/if}} ">
{{#if (eq item.type 'conteneur')}}
@ -21,24 +21,24 @@
</span>
<span class="equipement-detail">{{numberFormat item.system.encTotal decimals=2}}</span>
<span class="equipement-actions item-controls">
{{#if @root.options.isOwner}}
{{#unless item.estContenu}}
{{#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>
{{/if}}
{{/unless}}
<a class="item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
&nbsp;
{{#if (ne item.system.quantite 0)}}
<a class="item-vendre" title="Vendre ou donner"><i class="fas fa-comments-dollar"></i></a>
{{/if}}
{{#if options.isOwner}}
{{#unless item.estContenu}}
{{#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>
{{/if}}
{{/unless}}
<a class="item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
&nbsp;
{{#if (ne item.system.quantite 0)}}
<a class="item-vendre" title="Vendre ou donner"><i class="fas fa-comments-dollar"></i></a>
{{/if}}
{{/if}}
<a class="item-montrer" title="Montrer"><i class="fas fa-comment"></i></a>
{{#if @root.options.isOwner}}
{{#if item.system.actionPrincipale}}
<a class="item-action">{{item.system.actionPrincipale}}</a>
{{/if}}
{{#if options.isOwner}}
{{#if item.system.actionPrincipale}}
<a class="item-action">{{item.system.actionPrincipale}}</a>
{{/if}}
{{/if}}
</span>
</li>

View File

@ -1,6 +1,8 @@
<h4>Equipement</h4>
<span class="item-name">
{{#if options.isOwned}}
<a class="chat-card-button creer-un-objet">Nouvel objet</a>
{{/if}}
{{#if options.isGM}}
<a class="chat-card-button nettoyer-conteneurs">Tout vider</a>
{{/if}}
@ -20,11 +22,11 @@
{{#each objets as |item id|}}
{{#unless item.estContenu}}
{{#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}}
{{/unless}}
{{/each}}
{{#each conteneurs as |conteneur id|}}
{{buildConteneur this 'actor/inventaire-item.html' @root.options}}
{{buildLigneInventaire conteneur @root.options}}
{{/each}}
</ul>

View File

@ -13,7 +13,7 @@
<div class="flexrow flex-group-left">
<label>Nombre de lots</label>
<div class="flexrow">
{{#unless isOwned}}
{{#unless options.isOwned}}
<input name="quantiteIllimite" class="quantiteIllimite flex-shrink" type="checkbox" {{#if
quantiteIllimite}}checked{{/if}} />
<label class="label-quantiteIllimite flex-shrink">disponibles</label>

View File

@ -3,7 +3,7 @@
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname">
{{#if isGM}}
{{#if options.isGM}}
<input name="name" type="text" value="{{name}}" placeholder="Name"/>
{{else}}
{{item.name}}
@ -32,7 +32,7 @@
</div>
<div class="form-group">
<label for="system.base">Niveau de base </label>
{{#if isGM}}
{{#if options.isGM}}
<select name="system.base" data-dtype="Number">
{{#select system.base}}
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-base-competence.html"}}

View File

@ -13,10 +13,8 @@
<input class="attribute-value" type="text" name="system.capacite" value="{{system.capacite}}" data-dtype="Number"/>
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/item/partial-inventaire.html"}}
{{#if isOwned}}
{{#if options.isOwned}}
<div class="flexcol">
<span><label>Contenu : </label></span>
<ul class="item-list alterne-list">
<li class="competence-header flexrow">
<span class="equipement-nom">Nom</span>
@ -24,7 +22,7 @@
<span class="equipement-detail">Enc.</span>
<span class="equipement-actions">Actions</span>
</li>
{{buildContenu this}}
{{buildInventaireConteneur actorId id options}}
</ul>
</div>
{{/if}}

View File

@ -12,13 +12,13 @@
<div class="flexcol">
<label>Extrait</label>
<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 class="flexcol">
<label>Texte complet</label>
<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>
</section>

View File

@ -29,7 +29,7 @@
<label>Créature correspondante</label>
<div>
{{#if system.actor.id}}
{{#if isGM}}
{{#if options.isGM}}
<label>
{{>'systems/foundryvtt-reve-de-dragon/templates/common/compendium-link.hbs'
pack=system.actor.pack id=system.actor.id name=system.actor.name}}

View File

@ -3,7 +3,7 @@
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
{{#if isOwned}}
{{#if options.isOwned}}
<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>
</div>

View File

@ -2,7 +2,7 @@
<header class="sheet-header">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<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>
{{else}}
<h1 class="charname">Inconnue</h1>
@ -12,7 +12,7 @@
{{!-- Sheet Body --}}
<section class="sheet-body">
{{#if (or isGM system.identifie)}}
{{#if (or options.isGM system.identifie)}}
<div class="form-group">
<label for="system.identifie">Identifiée ? </label>
<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>
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
</div>
{{#if (or isGM system.remedesconnus)}}
{{#if (or options.isGM system.remedesconnus)}}
<div class="form-group">
<label for="system.remedes">Remèdes </label>
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
</div>
{{/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"}}
{{/if}}

View File

@ -48,7 +48,7 @@
</div>
<div class="form-group">
<label for="xp">Malus</label>
{{#if isGM}}
{{#if options.isGM}}
<select name="system.malus" id="malus" data-dtype="Number">
{{#select system.malus}}
<option value="0">0</option>

View File

@ -2,7 +2,7 @@
<header class="sheet-header">
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}"/>
<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>
{{else}}
<h1 class="charname">Inconnue</h1>
@ -14,9 +14,9 @@
<section class="sheet-body">
<div class="form-group">
<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>
{{#if (or isGM system.identifie)}}
{{#if (or options.isGM system.identifie)}}
<div class="form-group">
<label for="system.identifie">Identifiée ? </label>
<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>
<input class="attribute-value" type="checkbox" name="system.remedesconnus" {{#if system.remedesconnus}}checked{{/if}}/>
</div>
{{#if (or isGM system.remedesconnus)}}
{{#if (or options.isGM system.remedesconnus)}}
<div class="form-group">
<label for="system.remedes">Remèdes </label>
<input class="attribute-value" type="text" name="system.remedes" value="{{system.remedes}}" data-dtype="String"/>
</div>
{{/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"}}
{{/if}}

View File

@ -3,7 +3,7 @@
<img class="profile-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
{{#if isOwned}}
{{#if options.isOwned}}
<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>
</div>

View File

@ -33,7 +33,7 @@
<input class="attribute-value" type="text" name="system.refoulement" value="{{system.refoulement}}" data-dtype="Number"/>
</div>
{{#if isOwned}}
{{#if options.isOwned}}
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
{{/if}}

View File

@ -9,25 +9,25 @@
<div class="flexcol">
<span><label class="alchimie-title">Manipulation : </label></span>
<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 class="flexcol">
<span><label class="alchimie-title">Utilisation : </label></span>
<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 class="flexcol">
<span><label class="alchimie-title">Enchantement : </label></span>
<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 class="flexcol">
<span><label class="alchimie-title">Sur-effet : </label></span>
<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>

View File

@ -25,7 +25,7 @@
<div class="flexcol">
<span><label>Ingrédients : </label></span>
<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>

View File

@ -11,31 +11,31 @@
</nav>
<section class="sheet-body">
<div class="tab items" data-group="primary" data-tab="rencontre">
{{#if isOwned}}
{{#if options.isOwned}}
<div class="form-group">
<label for="system.force">Rêve</label>
<input type="text" name="system.force" value="{{system.force}}" data-dtype="Number"/>
</div>
<div class="form-group">
<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 class="form-group">
<label for="system.date">Date/heure</label>
<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.heure" value="{{system.heure}}" 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 options.isGM}}disabled{{/unless}}/>
</div>
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Rencontrée le" labelfin="Disparaît le"}}
{{else}}
<div class="form-group">
<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 class="form-group">
<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}}
<option value=""></option>
<option value="f">Féminin</option>
@ -45,26 +45,26 @@
</div>
<div class="form-group">
<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 class="form-group">
<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 class="form-group">
<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>
{{/if}}
<div class="form-group">
<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>
{{#unless isOwned}}
{{#if system.mauvaiseRencontre}}
<div class="form-group">
<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>
{{/if}}
{{/unless}}
@ -74,11 +74,11 @@
<div class="tab items" data-group="primary" data-tab="succes">
<div class="form-group">
<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 class="form-group">
<div class="button-dropdown">
{{#if isGM}}
{{#if options.isGM}}
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
<div class="button-dropdown-content">
{{#each effets.succes.liste as |effet|}}
@ -106,12 +106,12 @@
<hr>
<div class="form-group">
<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 class="flexcol">
<label for="system.succes.poesie">Poésie</label>
<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>
@ -119,11 +119,11 @@
<div class="tab items" data-group="primary" data-tab="echec">
<div class="form-group">
<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 class="form-group">
<div class="button-dropdown">
{{#if isGM}}
{{#if options.isGM}}
<label class="button-dropbutton" title="Ajouter">Effets <i class="fas fa-plus-circle"></i></label>
<div class="button-dropdown-content">
{{#each effets.echec.liste as |effet|}}
@ -151,12 +151,12 @@
<hr>
<div class="form-group">
<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 class="flexcol">
<label for="system.echec.poesie">Poésie</label>
<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>
@ -166,59 +166,59 @@
<hr>
<div class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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 class="form-group">
<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>
{{/unless}}

View File

@ -59,7 +59,7 @@
<label for="system.xp">XP</label>
<input class="attribute-value" type="text" name="system.xp" value="{{system.xp}}" data-dtype="Number"/>
</div>
{{#if owner}}
{{#if options.isOwner}}
{{#each bonusCaseList as |bcData key|}}
<div class="form-group">
<label for="caseValue">Case/Bonus :</label>

View File

@ -11,7 +11,7 @@
</select>
</div>
{{#if isOwned}}
{{#if options.isOwned}}
{{>"systems/foundryvtt-reve-de-dragon/templates/item/temporel.hbs" this labeldebut="Depuis le" labelfin="Jusqu'au"}}
{{/if}}

View File

@ -33,7 +33,7 @@
<label for="xp">Fatigue</label>
<input class="attribute-value" type="text" name="system.fatigue" value="{{system.fatigue}}" data-dtype="Number"/>
</div>
{{#if isGM}}
{{#if options.isGM}}
<div class="form-group">
<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}}/>
@ -59,11 +59,11 @@
</div>
<div class="form-group">
<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 class="form-group">
<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>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}

View File

@ -1,4 +1,4 @@
{{#if (and isOwned isComestible)}}
{{#if (and options.isOwned isComestible)}}
<div class="form-group">
{{#if (eq isComestible 'brut')}}
<span><a class="preparer-nourriture chat-card-button" data-actor-id="{{actorId}}">Cuisiner</a></span>

View File

@ -1,4 +1,4 @@
{{#unless isOwned}}
{{#unless options.isOwned}}
{{>'systems/foundryvtt-reve-de-dragon/templates/scripts/autocomplete-script.hbs'}}
<div class="tab items" data-group="primary" data-tab="environnement">
<div class="form-group description-milieu">

View File

@ -1,3 +1,3 @@
{{#unless isOwned}}
{{#unless options.isOwned}}
<a class="item" data-tab="environnement">Environnement</a>
{{/unless}}

View File

@ -1,14 +1,14 @@
<div class="flexcol">
<span><label>Description : </label></span>
<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>
{{#if isGM}}
{{#if options.isGM}}
<div class="flexcol">
<span><label>Description (MJ seulement): </label></span>
<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>
{{/if}}

View File

@ -1,4 +1,4 @@
{{#if isGM}}
{{#if options.isGM}}
<div class="form-group">
<label for="system.frequence">Fréquence</label>
<input class="attribute-value" type="text" name="system.frequence" value="{{system.frequence}}" data-dtype="Number"/>

View File

@ -1,4 +1,4 @@
{{#if isGM}}
{{#if options.isGM}}
<div class="form-group">
<label for="system.hautrevant">Pour haut-rêvants</label>
<input class="attribute-value" type="checkbox" name="system.hautrevant" {{#if system.hautrevant}}checked{{/if}}/>