Merge pull request 'v1.5-fixes' (#538) from VincentVk/foundryvtt-reve-de-dragon:v1.5-fixes into v1.5

Reviewed-on: #538
This commit is contained in:
uberwald 2022-06-06 23:17:23 +02:00
commit 035da98aaa
11 changed files with 206 additions and 210 deletions

View File

@ -22,13 +22,6 @@ export class RdDActorEntiteSheet extends ActorSheet {
}); });
} }
/* -------------------------------------------- */
_checkNull(items) {
if (items && items.length) {
return items;
}
return [];
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {

View File

@ -25,14 +25,6 @@ export class RdDActorVehiculeSheet extends ActorSheet {
}); });
} }
/* -------------------------------------------- */
_checkNull(items) {
if (items && items.length) {
return items;
}
return [];
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
const objectData = Misc.data(this.object); const objectData = Misc.data(this.object);

View File

@ -2838,20 +2838,19 @@ export class RdDActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async _meditationResult(meditationData) { async _meditationResult(meditationRoll) {
this.santeIncDec("fatigue", 2); this.santeIncDec("fatigue", 2);
const signeData = RdDItemSigneDraconique.prepareSigneDraconiqueMeditation(meditationData.meditation, meditationData.rolled) if (meditationRoll.rolled.isSuccess) {
if (signeData) { await this.createEmbeddedDocuments("Item", [RdDItemSigneDraconique.prepareSigneDraconiqueMeditation(meditationRoll.meditation, meditationRoll.rolled)]);
await this.createEmbeddedDocuments("Item", [signeData]);
} }
await RdDResolutionTable.displayRollData(meditationData, this.name, 'chat-resultat-meditation.html'); await RdDResolutionTable.displayRollData(meditationRoll, this.name, 'chat-resultat-meditation.html');
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
_meditationEPart(meditationData) { _meditationEPart(meditationRoll) {
this.updateEmbeddedDocuments('Item', [{ _id: meditationData._id, 'data.malus': meditationData.meditation.data.malus - 1 }]); this.updateEmbeddedDocuments('Item', [{ _id: meditationRoll.meditation._id, 'data.malus': meditationRoll.meditation.data.malus - 1 }]);
} }
@ -3278,11 +3277,11 @@ export class RdDActor extends Actor {
protection = Math.max(protection - penetration, 0); protection = Math.max(protection - penetration, 0);
protection += this.getProtectionNaturelle(); protection += this.getProtectionNaturelle();
// Gestion des cas particuliers sur la fenêtre d'encaissement // Gestion des cas particuliers sur la fenêtre d'encaissement
if (attackerRoll.dmg.encaisserSpecial && attackerRoll.dmg.encaisserSpecial == "noarmure") { if (attackerRoll.dmg.encaisserSpecial == "noarmure") {
protection = 0; protection = 0;
} }
if (attackerRoll.dmg.encaisserSpecial && attackerRoll.dmg.encaisserSpecial == "chute" && Number(protection) > 2) { if (attackerRoll.dmg.encaisserSpecial == "chute") {
protection = 2; protection = Math.min(protection, 2);
} }
console.log("Final protect", protection, attackerRoll); console.log("Final protect", protection, attackerRoll);
return protection; return protection;
@ -3290,20 +3289,25 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
_deteriorerArmure(item, dmg) { _deteriorerArmure(item, dmg) {
if (!ReglesOptionelles.isUsing('deteriorationArmure')) { let itemData = duplicate(Misc.data(item));
if (!ReglesOptionelles.isUsing('deteriorationArmure') || itemData.data.protection == '0') {
return; return;
} }
let itemData = duplicate(Misc.data(item));
itemData.data.deterioration = (itemData.data.deterioration ?? 0) + dmg; itemData.data.deterioration = (itemData.data.deterioration ?? 0) + dmg;
if (itemData.data.deterioration >= 10) { if (itemData.data.deterioration >= 10) {
itemData.data.deterioration = 0; itemData.data.deterioration -= 10;
let res = /\d+/.exec(itemData.data.protection); let res = /(\d+)?d(\d+)(\-\d+)?/.exec(itemData.data.protection);
if (!res) { if (res) {
itemData.data.protection = "1d" + itemData.data.protection; let malus = Misc.toInt(res[3]) - 1;
let armure = Misc.toInt(res[2]);
if (armure+malus <= 0){
itemData.data.protection = 0;
} else {
itemData.data.protection = '' + (res[1]??'1') + 'd' + armure + malus;
} }
else if (res = /(\d+d\d+)(\-\d+)?/.exec(itemData.data.protection)) { }
let malus = Misc.toInt(res[2]) - 1; else if (/\d+/.exec(itemData.data.protection)) {
itemData.data.protection = res[1] + malus; itemData.data.protection = "1d" + itemData.data.protection;
} }
else { else {
ui.notifications.warn(`La valeur d'armure de votre ${item.name} est incorrecte`); ui.notifications.warn(`La valeur d'armure de votre ${item.name} est incorrecte`);

View File

@ -3,7 +3,7 @@ export class RdDItemMeditation {
static calculDifficulte(rollData) { static calculDifficulte(rollData) {
if (rollData.meditation) { if (rollData.meditation) {
// Malus permanent éventuel // Malus permanent éventuel
let diff = -rollData.meditation.data.malus ?? 0; let diff = rollData.meditation.data.malus ?? 0;
if (!rollData.conditionMeditation.isHeure) diff -= 2; if (!rollData.conditionMeditation.isHeure) diff -= 2;
if (!rollData.conditionMeditation.isVeture) diff -= 2; if (!rollData.conditionMeditation.isVeture) diff -= 2;
if (!rollData.conditionMeditation.isComportement) diff -= 2; if (!rollData.conditionMeditation.isComportement) diff -= 2;

View File

@ -13,10 +13,11 @@ const tableSignesIndicatifs = [
] ]
const DIFFICULTE_LECTURE_SIGNE_MANQUE = +11;
export class RdDItemSigneDraconique { export class RdDItemSigneDraconique {
static prepareSigneDraconiqueMeditation(meditation, rolled) { static prepareSigneDraconiqueMeditation(meditation, rolled) {
if (rolled.isSuccess != undefined) {
meditation = Misc.data(meditation); meditation = Misc.data(meditation);
return { return {
name: "de la " + meditation.name, name: "de la " + meditation.name,
@ -24,15 +25,13 @@ export class RdDItemSigneDraconique {
img: meditation.img, img: meditation.img,
data: { data: {
typesTMR: [TMRUtility.typeTmrName(meditation.data.tmr)], typesTMR: [TMRUtility.typeTmrName(meditation.data.tmr)],
difficulte: RdDItemSigneDraconique.getDiffSigneMeditation(rolled.code), difficulte: rolled.isSuccess ? RdDItemSigneDraconique.getDiffSigneMeditation(rolled.code) : DIFFICULTE_LECTURE_SIGNE_MANQUE,
ephemere: true, ephemere: true,
duree: "1 round", duree: "1 round",
valeur: { "norm": 3, "sign": 5, "part": 10 } valeur: rolled.isSuccess ? { "norm": 3, "sign": 5, "part": 10 } : { "norm": 0, "sign": 0, "part": 0 }
} }
}; };
} }
return undefined;
}
static getDiffSigneMeditation(code) { static getDiffSigneMeditation(code) {
switch (code) { switch (code) {
@ -44,7 +43,7 @@ export class RdDItemSigneDraconique {
} }
static getXpSortSigneDraconique(code, signe) { static getXpSortSigneDraconique(code, signe) {
return Misc.data(signe).data.valeur[code] ?? 0; return Misc.toInt(Misc.data(signe).data.valeur[code] ?? 0);
} }
static calculValeursXpSort(qualite, valeur, avant) { static calculValeursXpSort(qualite, valeur, avant) {

View File

@ -465,15 +465,15 @@ export class RdDCombat {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static onMsgEncaisser(data) { static onMsgEncaisser(msg) {
let defender = canvas.tokens.get(data.defenderTokenId).actor; let defender = canvas.tokens.get(msg.defenderTokenId).actor;
if (Misc.isOwnerPlayerOrUniqueConnectedGM()) { if (Misc.isOwnerPlayerOrUniqueConnectedGM()) {
let attackerRoll = data.attackerRoll; let attackerRoll = msg.attackerRoll;
let attacker = data.attackerId ? game.actors.get(data.attackerId) : null; let attacker = msg.attackerId ? game.actors.get(msg.attackerId) : null;
defender.encaisserDommages(attackerRoll, attacker); defender.encaisserDommages(attackerRoll, attacker);
RdDCombat._deleteDefense(attackerRoll.passeArme); const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId);
RdDCombat._deleteAttaque(data.attackerId); rddCombat?.removeChatMessageActionsPasseArme(attackerRoll.passeArme);
} }
} }
@ -482,11 +482,8 @@ export class RdDCombat {
let defenderToken = canvas.tokens.get(msg.defenderTokenId); let defenderToken = canvas.tokens.get(msg.defenderTokenId);
if (defenderToken && Misc.isUniqueConnectedGM()) { if (defenderToken && Misc.isUniqueConnectedGM()) {
const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId); const rddCombat = RdDCombat.createForAttackerAndDefender(msg.attackerId, msg.defenderTokenId);
if (rddCombat) { rddCombat?.removeChatMessageActionsPasseArme(msg.defenderRoll.passeArme);
const defenderRoll = msg.defenderRoll; rddCombat?._chatMessageDefense(msg.paramChatDefense, msg.defenderRoll);
rddCombat.removeChatMessageActionsPasseArme(defenderRoll.passeArme);
rddCombat._chatMessageDefense(msg.paramChatDefense, msg.defenderRoll);
}
} }
} }
@ -1005,8 +1002,7 @@ export class RdDCombat {
await this.computeRecul(defenderRoll); await this.computeRecul(defenderRoll);
await this.computeDeteriorationArme(defenderRoll); await this.computeDeteriorationArme(defenderRoll);
await RdDResolutionTable.displayRollData(defenderRoll, this.defender, 'chat-resultat-parade.html'); await RdDResolutionTable.displayRollData(defenderRoll, this.defender, 'chat-resultat-parade.html');
this.removeChatMessageActionsPasseArme(defenderRoll.passeArme);
RdDCombat._deleteDefense(defenderRoll.passeArme);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1077,7 +1073,7 @@ export class RdDCombat {
async _onEsquiveNormale(defenderRoll) { async _onEsquiveNormale(defenderRoll) {
console.log("RdDCombat._onEsquiveNormal >>>", defenderRoll); console.log("RdDCombat._onEsquiveNormal >>>", defenderRoll);
await RdDResolutionTable.displayRollData(defenderRoll, this.defender, 'chat-resultat-esquive.html'); await RdDResolutionTable.displayRollData(defenderRoll, this.defender, 'chat-resultat-esquive.html');
RdDCombat._deleteDefense(defenderRoll.passeArme); this.removeChatMessageActionsPasseArme(defenderRoll.passeArme);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -1217,7 +1213,6 @@ export class RdDCombat {
} }
}); });
} }
RdDCombat._deleteDefense(attackerRoll.passeArme);
this.removeChatMessageActionsPasseArme(attackerRoll.passeArme); this.removeChatMessageActionsPasseArme(attackerRoll.passeArme);
} }

View File

@ -326,8 +326,8 @@ export class RdDUtility {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static checkNull(items) { static arrayOrEmpty(items) {
if (items && items.length) { if (items?.length) {
return items; return items;
} }
return []; return [];
@ -360,44 +360,44 @@ export class RdDUtility {
RdDUtility.filterEquipementParType(formData); RdDUtility.filterEquipementParType(formData);
formData.sorts = this.checkNull(formData.itemsByType['sort']); formData.sorts = this.arrayOrEmpty(formData.itemsByType['sort']);
formData.signesdraconiques = this.checkNull(formData.itemsByType['signedraconique']); formData.signesdraconiques = this.arrayOrEmpty(formData.itemsByType['signedraconique']);
formData.queues = this.checkNull(formData.itemsByType['queue']); formData.queues = this.arrayOrEmpty(formData.itemsByType['queue']);
formData.souffles = this.checkNull(formData.itemsByType['souffle']); formData.souffles = this.arrayOrEmpty(formData.itemsByType['souffle']);
formData.ombres = this.checkNull(formData.itemsByType['ombre']); formData.ombres = this.arrayOrEmpty(formData.itemsByType['ombre']);
formData.tetes = this.checkNull(formData.itemsByType['tete']); formData.tetes = this.arrayOrEmpty(formData.itemsByType['tete']);
formData.taches = this.checkNull(formData.itemsByType['tache']); formData.taches = this.arrayOrEmpty(formData.itemsByType['tache']);
formData.meditations = this.checkNull(formData.itemsByType['meditation']); formData.meditations = this.arrayOrEmpty(formData.itemsByType['meditation']);
formData.chants = this.checkNull(formData.itemsByType['chant']); formData.chants = this.arrayOrEmpty(formData.itemsByType['chant']);
formData.danses = this.checkNull(formData.itemsByType['danse']); formData.danses = this.arrayOrEmpty(formData.itemsByType['danse']);
formData.musiques = this.checkNull(formData.itemsByType['musique']); formData.musiques = this.arrayOrEmpty(formData.itemsByType['musique']);
formData.oeuvres = this.checkNull(formData.itemsByType['oeuvre']); formData.oeuvres = this.arrayOrEmpty(formData.itemsByType['oeuvre']);
formData.jeux = this.checkNull(formData.itemsByType['jeu']); formData.jeux = this.arrayOrEmpty(formData.itemsByType['jeu']);
formData.recettescuisine = this.checkNull(formData.itemsByType['recettecuisine']); formData.recettescuisine = this.arrayOrEmpty(formData.itemsByType['recettecuisine']);
formData.recettesAlchimiques = this.checkNull(formData.itemsByType['recettealchimique']); formData.recettesAlchimiques = this.arrayOrEmpty(formData.itemsByType['recettealchimique']);
formData.maladies = this.checkNull(formData.itemsByType['maladie']); formData.maladies = this.arrayOrEmpty(formData.itemsByType['maladie']);
formData.poisons = this.checkNull(formData.itemsByType['poison']); formData.poisons = this.arrayOrEmpty(formData.itemsByType['poison']);
formData.possessions = this.checkNull(formData.itemsByType['possession']); formData.possessions = this.arrayOrEmpty(formData.itemsByType['possession']);
formData.maladiesPoisons = formData.maladies.concat(formData.poisons); formData.maladiesPoisons = formData.maladies.concat(formData.poisons);
formData.competences = (formData.itemsByType.competence ?? []).concat(formData.itemsByType.competencecreature ?? []); formData.competences = (formData.itemsByType.competence ?? []).concat(formData.itemsByType.competencecreature ?? []);
} }
static filterEquipementParType(formData) { static filterEquipementParType(formData) {
formData.conteneurs = this.checkNull(formData.itemsByType['conteneur']); formData.conteneurs = this.arrayOrEmpty(formData.itemsByType['conteneur']);
formData.materiel = this.checkNull(formData.itemsByType['objet']); formData.materiel = this.arrayOrEmpty(formData.itemsByType['objet']);
formData.armes = this.checkNull(formData.itemsByType['arme']); formData.armes = this.arrayOrEmpty(formData.itemsByType['arme']);
formData.armures = this.checkNull(formData.itemsByType['armure']); formData.armures = this.arrayOrEmpty(formData.itemsByType['armure']);
formData.munitions = this.checkNull(formData.itemsByType['munition']); formData.munitions = this.arrayOrEmpty(formData.itemsByType['munition']);
formData.livres = this.checkNull(formData.itemsByType['livre']); formData.livres = this.arrayOrEmpty(formData.itemsByType['livre']);
formData.potions = this.checkNull(formData.itemsByType['potion']); formData.potions = this.arrayOrEmpty(formData.itemsByType['potion']);
formData.ingredients = this.checkNull(formData.itemsByType['ingredient']); formData.ingredients = this.arrayOrEmpty(formData.itemsByType['ingredient']);
formData.herbes = this.checkNull(formData.itemsByType['herbe']); formData.herbes = this.arrayOrEmpty(formData.itemsByType['herbe']);
formData.monnaie = this.checkNull(formData.itemsByType['monnaie']); formData.monnaie = this.arrayOrEmpty(formData.itemsByType['monnaie']);
formData.monnaie.sort(Monnaie.triValeurDenier()); formData.monnaie.sort(Monnaie.triValeurDenier());
formData.nourritureboissons = this.checkNull(formData.itemsByType['nourritureboisson']); formData.nourritureboissons = this.arrayOrEmpty(formData.itemsByType['nourritureboisson']);
formData.gemmes = this.checkNull(formData.itemsByType['gemme']); formData.gemmes = this.arrayOrEmpty(formData.itemsByType['gemme']);
formData.objets = formData.conteneurs formData.objets = formData.conteneurs
.concat(formData.materiel) .concat(formData.materiel)

View File

@ -25,7 +25,7 @@ export class PixiTMR {
for (const [name, img] of Object.entries(PixiTMR.textures)) { for (const [name, img] of Object.entries(PixiTMR.textures)) {
loader = loader.add(name, img); loader = loader.add(name, img);
} }
loader.onLoad.add((error, resaon) => { console.log("ERROR", error, resaon) }); loader.onLoad.add((error, reason) => { console.log("ERROR", error, reason) });
loader.load( (loader, resources) => { loader.load( (loader, resources) => {
onLoad(loader, resources); onLoad(loader, resources);
for (let onAnimate of this.callbacksOnAnimate) { for (let onAnimate of this.callbacksOnAnimate) {

View File

@ -55,7 +55,6 @@
{{/each}} {{/each}}
<li class="flexrow"> <li class="flexrow">
<span class="carac-label" name="carac-total">Total Caractéristiques</span> <span class="carac-label" name="carac-total">Total Caractéristiques</span>
{{log 'data-actor-creature' this}}
<span class="competence-value" name="carac-total-value">{{calc.caracTotal}}</span> <span class="competence-value" name="carac-total-value">{{calc.caracTotal}}</span>
</li> </li>
</ol> </ol>

View File

@ -307,7 +307,6 @@
<a class="competence-label" name="{{esq.name}}"> <a class="competence-label" name="{{esq.name}}">
<img class="sheet-competence-img" src="{{esq.img}}"/> <img class="sheet-competence-img" src="{{esq.img}}"/>
<span>{{esq.name}}</span> <span>{{esq.name}}</span>
{{log esq}}
</a> </a>
</span> </span>
<span class="arme-initiative"></span> <span class="arme-initiative"></span>
@ -509,8 +508,61 @@
</ul> </ul>
</div> </div>
<hr> <hr>
{{!-- Queues, Souffles, Tetes, Ombre --}}
{{#if queues.length}}
<h3>Queues:</h3>
<ul class="flex-group-left">
{{#each queues as |queue key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="display-label flex-grow"><a data-item-id="{{queue._id}}">{{queue.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
{{#if ombres.length}}
<h3>Ombres de Thanatos:</h3>
<ul class="item-list">
{{#each ombres as |ombre key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{ombre._id}}">
<span class="display-label flex-grow"><a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
{{#if souffles.length}}
<h3>Souffles:</h3>
<ul class="item-list">
{{#each souffles as |souffle key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}">
<span class="display-label flex-grow"><a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
{{#if tetes.length}}
<h3>Tetes:</h3>
<ul class="item-list">
{{#each tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}">
<span class="display-label flex-grow"><a data-item-id="{{tete._id}}">{{tete.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{/if}}
{{#if data.attributs.hautrevant.value}} {{#if data.attributs.hautrevant.value}}
{{#if options.isGM}} {{#if (and options.isGM signesdraconiques.length)}}
<h3>Signes draconiques</h3> <h3>Signes draconiques</h3>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each signesdraconiques as |signe key|}} {{#each signesdraconiques as |signe key|}}
@ -524,34 +576,58 @@
{{/each}} {{/each}}
</ul> </ul>
{{/if}} {{/if}}
<h3>Sorts:</h3>
<ul class="item-list alterne-list"> {{#if hautreve.rencontres.length}}
{{#each sorts as |sort key|}} <h3>Rencontres présentes:</h3>
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}"> <ul class="item-list">
<span class="display-label flex-grow"> <a data-item-id="{{sort._id}}">{{sort.name}}</a></span> {{#each hautreve.rencontres as |rencontre key|}}
<span>{{sort.data.draconic}} / {{sort.data.difficulte}}</span> <li class="item flexrow" data-item-id="{{key}}" data-attribute="{{key}}">
<span class="display-label"><a data-item-id="{{key}}">{{rencontre.name}} r{{rencontre.force}}</a></span>
<span class="flex-shrink">{{rencontre.coord}} - {{caseTmr-label rencontre.coord}}</span>
{{#if rencontre.date}}
<span>{{upperFirst rencontre.heure}}, le {{rencontre.date}}</span>
{{/if}}
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-control rencontre-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
{{/if}}
{{#if hautreve.sortsReserve.length}}
<h3>Sorts en Réserve:</h3> <h3>Sorts en Réserve:</h3>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each hautreve.sortsReserve as |reserve key|}} {{#each hautreve.sortsReserve as |reserve key|}}
<li class="item list-item flexrow" data-item-id="{{reserve._id}}" data-attribute="{{key}}"> <li class="item list-item flexrow" data-item-id="{{reserve._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{reserve.sort.img}}" /> <img class="sheet-competence-img" src="{{reserve.sort.img}}" />
<span class="display-label flex-grow">{{reserve.sort.name}}</span> <span class="display-label">{{reserve.sort.name}} r{{reserve.sort.data.ptreve_reel}}</span>
<span class="flex-shrink">r{{reserve.sort.data.ptreve_reel}}</span> <span>{{reserve.coord}} - {{caseTmr-label reserve.coord}}</span>
<span class="flex-shrink">{{reserve.coord}}</span>
<span>{{caseTmr-label reserve.coord}}</span>
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-control item-delete flex-shrink" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-control item-delete flex-shrink" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
{{/if}}
<hr>
<h3>Sorts:</h3>
<ul class="item-list alterne-list">
{{#each sorts as |sort key|}}
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<span class="display-label flex-grow">
<a data-item-id="{{sort._id}}">{{sort.name}}
- {{#if sort.data.caseTMRspeciale}}{{sort.data.caseTMRspeciale}}{{else}}{{upperFirst sort.data.caseTMR}}{{/if}}
</a>
</span>
<span>{{sort.data.draconic}} / {{sort.data.difficulte}}</span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Méditations:</h3> <h3>Méditations:</h3>
<ul class="item-list"> <ul class="item-list">
@ -566,81 +642,20 @@
{{/each}} {{/each}}
</ul> </ul>
<hr> <hr>
{{/if}} {{#if hautreve.casesTmr}}
{{!-- Queues, Souffles, Tetes, Ombre --}}
<h3>Queues:</h3>
<ul class="flex-group-left">
{{#each queues as |queue key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="display-label flex-grow"><a data-item-id="{{queue._id}}">{{queue.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Souffles:</h3>
<ul class="item-list">
{{#each souffles as |souffle key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}">
<span class="display-label flex-grow"><a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Tetes:</h3>
<ul class="item-list">
{{#each tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}">
<span class="display-label flex-grow"><a data-item-id="{{tete._id}}">{{tete.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Ombres de Thanatos:</h3>
<ul class="item-list">
{{#each ombres as |ombre key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{ombre._id}}">
<span class="display-label flex-grow"><a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
{{#if data.attributs.hautrevant.value}}
<hr>
<h3>Rencontres présentes:</h3>
<ul class="item-list">
{{#each hautreve.rencontres as |rencontre key|}}
<li class="item flexrow" data-item-id="{{key}}" data-attribute="{{key}}">
<span class="display-label"><a data-item-id="{{key}}">{{rencontre.name}} - {{rencontre.coord}}</a></span>
<span class="flex-shrink">{{caseTmr-label rencontre.coord}}</span>
{{#if rencontre.date}}
<span>Le {{rencontre.date}} à {{rencontre.heure}}</span>
{{/if}}
<div class="item-controls flex-shrink">
<a class="item-control rencontre-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<hr>
<h3>Cases Spéciales:</h3> <h3>Cases Spéciales:</h3>
<ul class="item-list"> <ul class="item-list">
{{#each hautreve.casesTmr as |casetmr key|}} {{#each hautreve.casesTmr as |casetmr key|}}
<li class="item flexrow" data-item-id="{{casetmr._id}}" data-attribute="{{key}}"> <li class="item flexrow" data-item-id="{{casetmr._id}}" data-attribute="{{key}}">
<span class="display-label"><a data-item-id="{{casetmr._id}}">{{casetmr.name}}</a></span> <span class="display-label"><a data-item-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
<span>{{casetmr.data.coord}} - {{caseTmr-label casetmr.data.coord}}</span>
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
{{/if}}
<br><br> <br><br>
{{/if}} {{/if}}
</div> </div>

View File

@ -1,4 +1,3 @@
{{log 'lecture signe draconique' this}}
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<h2>Lire le signe draconique <h2>Lire le signe draconique
<select name="signe-draconique" class="roll-signedraconique flex-grow" data-dtype="String"> <select name="signe-draconique" class="roll-signedraconique flex-grow" data-dtype="String">