Minor reformat avant signes draconiques

This commit is contained in:
Vincent Vandemeulebrouck 2021-05-10 18:39:35 +02:00
parent 82729a9855
commit a548486a06
7 changed files with 114 additions and 108 deletions

View File

@ -223,6 +223,11 @@ export class RdDActorSheet extends ActorSheet {
const item = this.actor.items.get(li.data("item-id")); const item = this.actor.items.get(li.data("item-id"));
item.sheet.render(true); item.sheet.render(true);
}); });
html.find('.display-label a').click((event) => {
let myID = event.currentTarget.attributes['data-item-id'].value;
const item = this.actor.getEmbeddedDocument('Item', myID);
item.sheet.render(true);
});
html.find('.rencontre-delete').click(ev => { html.find('.rencontre-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item"); const li = $(ev.currentTarget).parents(".item");
const rencontreKey = li.data("item-id"); const rencontreKey = li.data("item-id");
@ -428,26 +433,6 @@ export class RdDActorSheet extends ActorSheet {
html.find('.enlever-tous-effets').click((event) => { html.find('.enlever-tous-effets').click((event) => {
this.actor.enleverTousLesEffets(); this.actor.enleverTousLesEffets();
}); });
// Display info about queue
html.find('.queuesouffle-label a').click((event) => {
let myID = event.currentTarget.attributes['data-item-id'].value;
const item = this.actor.getEmbeddedDocument('Item', myID);
item.sheet.render(true);
});
// Info sort
html.find('.sort-label a').click((event) => {
let myID = event.currentTarget.attributes['data-id'].value;
const item = this.actor.getEmbeddedDocument('Item', myID);
item.sheet.render(true);
});
// Info sort
html.find('.case-label a').click((event) => {
let myID = event.currentTarget.attributes['data-id'].value;
const item = this.actor.getEmbeddedDocument('Item', myID);
item.sheet.render(true);
});
// Display info about queue
html.find('.conteneur-name a').click((event) => { html.find('.conteneur-name a').click((event) => {
let myID = event.currentTarget.attributes['data-item-id'].value; let myID = event.currentTarget.attributes['data-item-id'].value;
RdDUtility.toggleAfficheContenu(myID); RdDUtility.toggleAfficheContenu(myID);

View File

@ -1482,7 +1482,7 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async santeIncDec(name, inc, options = { isCritique: false, ethylisme: false }) { async santeIncDec(name, inc, options = { isCritique: false, ethylisme: false }) {
if (name=='fatigue' && !ReglesOptionelles.isUsing("appliquer-fatigue")) { if (name == 'fatigue' && !ReglesOptionelles.isUsing("appliquer-fatigue")) {
return; return;
} }
const sante = duplicate(Misc.templateData(this).sante); const sante = duplicate(Misc.templateData(this).sante);
@ -2097,9 +2097,11 @@ export class RdDActor extends Actor {
let draconicList = this.computeDraconicAndSortIndex(sortList); let draconicList = this.computeDraconicAndSortIndex(sortList);
const actorData = Misc.data(this); const actorData = Misc.data(this);
const reve = duplicate(actorData.data.carac.reve);
let rollData = { let rollData = {
forceCarac: { 'reve': duplicate(actorData.data.carac.reve) }, carac: { 'reve': reve },
selectedCarac: duplicate(actorData.data.carac.reve), forceCarac: { 'reve': reve },
selectedCarac: reve,
draconicList: draconicList, draconicList: draconicList,
sortList: sortList, sortList: sortList,
competence: draconicList[0], competence: draconicList[0],
@ -2107,10 +2109,8 @@ export class RdDActor extends Actor {
tmr: TMRUtility.getTMR(coord), tmr: TMRUtility.getTMR(coord),
diffLibre: RdDItemSort.getDifficulte(sortList[0], -7), // Per default at startup diffLibre: RdDItemSort.getDifficulte(sortList[0], -7), // Per default at startup
coutreve: Array(30).fill().map((item, index) => 1 + index), coutreve: Array(30).fill().map((item, index) => 1 + index),
carac: { 'reve': duplicate(actorData.data.carac.reve) }
} }
if (this.currentTMR) this.currentTMR.minimize(); // Hide
const dialog = await RdDRoll.create(this, rollData, const dialog = await RdDRoll.create(this, rollData,
{ {
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html', html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html',
@ -3306,7 +3306,7 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async achatVente(vendeurId, acheteurId, venteData, chatMessageIdVente) { async achatVente(vendeurId, acheteurId, venteData, chatMessageIdVente) {
if (vendeurId == acheteurId){ if (vendeurId == acheteurId) {
ui.notifications.info("Inutile de se vendre à soi-même"); ui.notifications.info("Inutile de se vendre à soi-même");
return; return;
} }

View File

@ -25,6 +25,7 @@ export class RdDItem extends Item {
isConteneur() { isConteneur() {
return Misc.data(this).type == 'conteneur'; return Misc.data(this).type == 'conteneur';
} }
isVide() { isVide() {
return this.isConteneur() && (Misc.templateData(this).contenu ?? []).length == 0; return this.isConteneur() && (Misc.templateData(this).contenu ?? []).length == 0;
} }

View File

@ -117,7 +117,7 @@ Hooks.once("init", async function () {
config: true, config: true,
default: true, default: true,
type: Boolean type: Boolean
}); });
/* -------------------------------------------- */ /* -------------------------------------------- */
game.settings.register("foundryvtt-reve-de-dragon", "appliquer-famine-soif", { game.settings.register("foundryvtt-reve-de-dragon", "appliquer-famine-soif", {
name: "Notifier de la famine et la soif pour", name: "Notifier de la famine et la soif pour",
@ -131,7 +131,7 @@ Hooks.once("init", async function () {
"famine-soif": "la famine et la soif", "famine-soif": "la famine et la soif",
}, },
default: "aucun" default: "aucun"
}); });
/* -------------------------------------------- */ /* -------------------------------------------- */
// Set an initiative formula for the system // Set an initiative formula for the system
@ -176,7 +176,7 @@ Hooks.once("init", async function () {
RdDDice.init(); RdDDice.init();
RdDCommands.init(); RdDCommands.init();
RdDCombat.init(); RdDCombat.init();
RdDCombatManager.init(), RdDCombatManager.init();
RdDTokenHud.init(); RdDTokenHud.init();
RdDActor.init(); RdDActor.init();
RddCompendiumOrganiser.init(); RddCompendiumOrganiser.init();
@ -198,12 +198,12 @@ function messageDeBienvenue() {
` }); ` });
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
/* Foundry VTT Initialization */ /* Foundry VTT Initialization */
/* -------------------------------------------- */ /* -------------------------------------------- */
Hooks.once("ready", function () { Hooks.once("ready", function () {
StatusEffects.onReady(); StatusEffects.onReady();
RdDHerbes.initializeHerbes(); RdDHerbes.initializeHerbes();

View File

@ -59,8 +59,8 @@ export class RdDTMRDialog extends Dialog {
this.rencontreState = 'aucune'; this.rencontreState = 'aucune';
this.pixiApp = new PIXI.Application({ width: 720, height: 860 }); this.pixiApp = new PIXI.Application({ width: 720, height: 860 });
this.pixiTMR = new PixiTMR(this, this.pixiApp); this.pixiTMR = new PixiTMR(this, this.pixiApp);
this.cacheTMR = (game.user.isGM) ? false: actor.isTMRCache(); this.cacheTMR = (game.user.isGM) ? false : actor.isTMRCache();
this.callbacksOnAnimate = []; this.callbacksOnAnimate = [];
if (!this.viewOnly) { if (!this.viewOnly) {
@ -69,7 +69,7 @@ export class RdDTMRDialog extends Dialog {
} }
// load the texture we need // load the texture we need
this.pixiTMR.load( (loader, resources) => this.createPixiSprites() ); this.pixiTMR.load((loader, resources) => this.createPixiSprites());
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -142,20 +142,25 @@ export class RdDTMRDialog extends Dialog {
_tokenSortEnReserve(sortEnReserve) { _tokenSortEnReserve(sortEnReserve) {
return EffetsDraconiques.sortReserve.token(this.pixiTMR, sortEnReserve.sort, () => sortEnReserve.coord); return EffetsDraconiques.sortReserve.token(this.pixiTMR, sortEnReserve.sort, () => sortEnReserve.coord);
} }
_tokenDemiReve() { _tokenDemiReve() {
const actorData = Misc.data(this.actor); const actorData = Misc.data(this.actor);
return EffetsDraconiques.demiReve.token(this.pixiTMR, actorData, () => actorData.data.reve.tmrpos.coord); return EffetsDraconiques.demiReve.token(this.pixiTMR, actorData, () => actorData.data.reve.tmrpos.coord);
} }
_updateDemiReve() { _updateDemiReve() {
if ( !this.cacheTMR) { if (!this.cacheTMR) {
this._setTokenPosition(this.demiReve); this._setTokenPosition(this.demiReve);
} }
} }
_getActorCoord() {
return Misc.data(this.actor).data.reve.tmrpos.coord;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async moveFromKey( move ) { async moveFromKey(move) {
let pos = TMRUtility.convertToCellPos(Misc.data(this.actor).data.reve.tmrpos.coord); let pos = TMRUtility.convertToCellPos(this._getActorCoord());
if (move == 'top') pos.y -= 1; if (move == 'top') pos.y -= 1;
if (move == 'bottom') pos.y += 1; if (move == 'bottom') pos.y += 1;
@ -165,7 +170,7 @@ export class RdDTMRDialog extends Dialog {
if (move == 'top-left') pos.y -= 1; if (move == 'top-left') pos.y -= 1;
if (move == 'top-right') pos.y -= 1; if (move == 'top-right') pos.y -= 1;
} else { } else {
if (move == 'bottom-left') pos.y += 1; if (move == 'bottom-left') pos.y += 1;
if (move == 'bottom-right') pos.y += 1; if (move == 'bottom-right') pos.y += 1;
} }
@ -196,34 +201,33 @@ export class RdDTMRDialog extends Dialog {
html.find('#dir-top').click((event) => { html.find('#dir-top').click((event) => {
this.moveFromKey("top"); this.moveFromKey("top");
} ); });
html.find('#dir-top-left').click((event) => { html.find('#dir-top-left').click((event) => {
this.moveFromKey("top-left"); this.moveFromKey("top-left");
} ); });
html.find('#dir-top-right').click((event) => { html.find('#dir-top-right').click((event) => {
this.moveFromKey("top-right"); this.moveFromKey("top-right");
} ); });
html.find('#dir-bottom-left').click((event) => { html.find('#dir-bottom-left').click((event) => {
this.moveFromKey("bottom-left"); this.moveFromKey("bottom-left");
} ); });
html.find('#dir-bottom-right').click((event) => { html.find('#dir-bottom-right').click((event) => {
this.moveFromKey("bottom-right"); this.moveFromKey("bottom-right");
} ); });
html.find('#dir-bottom').click((event) => { html.find('#dir-bottom').click((event) => {
this.moveFromKey("bottom"); this.moveFromKey("bottom");
} ); });
// Gestion du cout de montée en points de rêve // Gestion du cout de montée en points de rêve
let reveCout = ((this.tmrdata.isRapide && !EffetsDraconiques.isDeplacementAccelere(this.actor)) ? -2 : -1) - this.actor.countMonteeLaborieuse(); let reveCout = ((this.tmrdata.isRapide && !EffetsDraconiques.isDeplacementAccelere(this.actor)) ? -2 : -1) - this.actor.countMonteeLaborieuse();
if (ReglesOptionelles.isUsing("appliquer-fatigue")){ if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
this.cumulFatigue += this.fatigueParCase; this.cumulFatigue += this.fatigueParCase;
} }
await this.actor.reveActuelIncDec(reveCout); await this.actor.reveActuelIncDec(reveCout);
// Le reste... // Le reste...
this.updateValuesDisplay(); this.updateValuesDisplay();
let tmr = TMRUtility.getTMR(Misc.data(this.actor).data.reve.tmrpos.coord); let tmr = TMRUtility.getTMR(this._getActorCoord());
await this.manageRencontre(tmr, () => { await this.manageRencontre(tmr, () => {
this.postRencontre(tmr); this.postRencontre(tmr);
}); });
@ -234,13 +238,13 @@ export class RdDTMRDialog extends Dialog {
let ptsreve = document.getElementById("tmr-pointsreve-value"); let ptsreve = document.getElementById("tmr-pointsreve-value");
const actorData = Misc.data(this.actor); const actorData = Misc.data(this.actor);
ptsreve.innerHTML = actorData.data.reve.reve.value; ptsreve.innerHTML = actorData.data.reve.reve.value;
const coord = this._getActorCoord();
let tmrpos = document.getElementById("tmr-pos"); let tmrpos = document.getElementById("tmr-pos");
if ( this.cacheTMR ) { if (this.cacheTMR) {
tmrpos.innerHTML = '?? ('+ TMRUtility.getTMRType( actorData.data.reve.tmrpos.coord ) + ')'; tmrpos.innerHTML = '?? (' + TMRUtility.getTMRType(coord) + ')';
} else { } else {
let tmr = TMRUtility.getTMR(actorData.data.reve.tmrpos.coord); tmrpos.innerHTML = coord + " (" + TMRUtility.getTMRLabel(coord) + ")";
tmrpos.innerHTML = actorData.data.reve.tmrpos.coord + " (" + tmr.label + ")";
} }
let etat = document.getElementById("tmr-etatgeneral-value"); let etat = document.getElementById("tmr-etatgeneral-value");
@ -249,7 +253,7 @@ export class RdDTMRDialog extends Dialog {
let refoulement = document.getElementById("tmr-refoulement-value"); let refoulement = document.getElementById("tmr-refoulement-value");
refoulement.innerHTML = actorData.data.reve.refoulement.value; refoulement.innerHTML = actorData.data.reve.refoulement.value;
if (ReglesOptionelles.isUsing("appliquer-fatigue")){ if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
let fatigueItem = document.getElementById("tmr-fatigue-table"); let fatigueItem = document.getElementById("tmr-fatigue-table");
//console.log("Refresh : ", actorData.data.sante.fatigue.value); //console.log("Refresh : ", actorData.data.sante.fatigue.value);
fatigueItem.innerHTML = "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(actorData.data.sante.fatigue.value, actorData.data.sante.endurance.max).html() + "</table>"; fatigueItem.innerHTML = "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(actorData.data.sante.fatigue.value, actorData.data.sante.endurance.max).html() + "</table>";
@ -373,7 +377,7 @@ export class RdDTMRDialog extends Dialog {
rencontre: this.currentRencontre, rencontre: this.currentRencontre,
nbRounds: 1, nbRounds: 1,
canClose: false, canClose: false,
tmr: TMRUtility.getTMR(Misc.data(this.actor).data.reve.tmrpos.coord) tmr: TMRUtility.getTMR(this._getActorCoord())
} }
await this._tentativeMaitrise(rencontreData); await this._tentativeMaitrise(rencontreData);
@ -414,7 +418,7 @@ export class RdDTMRDialog extends Dialog {
else if (rencData.rolled.isEchec && rencData.rencontre.isPersistant) { else if (rencData.rolled.isEchec && rencData.rencontre.isPersistant) {
setTimeout(() => { setTimeout(() => {
rencData.nbRounds++; rencData.nbRounds++;
if (ReglesOptionelles.isUsing("appliquer-fatigue")){ if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
this.cumulFatigue += this.fatigueParCase; this.cumulFatigue += this.fatigueParCase;
} }
this._tentativeMaitrise(rencData); this._tentativeMaitrise(rencData);
@ -523,11 +527,11 @@ export class RdDTMRDialog extends Dialog {
if (rencontre) { if (rencontre) {
return rencontre; return rencontre;
} }
let myRoll = new Roll("1d7").evaluate( { async: false} ).total; let myRoll = new Roll("1d7").evaluate({ async: false }).total;
if (TMRUtility.isForceRencontre() || myRoll == 7) { if (TMRUtility.isForceRencontre() || myRoll == 7) {
return await this.rencontreTMRRoll(tmr, this.actor.isRencontreSpeciale()); return await this.rencontreTMRRoll(tmr, this.actor.isRencontreSpeciale());
} }
let locTMR = (this.cacheTMR) ? "??": tmr.label + " (" + tmr.coord + ")"; let locTMR = (this.cacheTMR) ? "??" : tmr.label + " (" + tmr.coord + ")";
this._tellToUser(myRoll + ": Pas de rencontre en " + locTMR); this._tellToUser(myRoll + ": Pas de rencontre en " + locTMR);
} }
@ -852,7 +856,7 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
async _onClickTMRPos(eventPos) { async _onClickTMRPos(eventPos) {
let currentPos = TMRUtility.convertToCellPos(Misc.data(this.actor).data.reve.tmrpos.coord); let currentPos = TMRUtility.convertToCellPos(this._getActorCoord());
console.log("deplacerDemiReve >>>>", currentPos, eventPos); console.log("deplacerDemiReve >>>>", currentPos, eventPos);
@ -861,7 +865,7 @@ export class RdDTMRDialog extends Dialog {
// Validation de la case de destination (gestion du cas des rencontres qui peuvent téléporter) // Validation de la case de destination (gestion du cas des rencontres qui peuvent téléporter)
let deplacementType = this._calculDeplacement(targetCoord, currentCoord, currentPos, eventPos); let deplacementType = this._calculDeplacement(targetCoord, currentCoord, currentPos, eventPos);
// Si le deplacement est valide // Si le deplacement est valide
if (deplacementType == 'normal' || deplacementType == 'saut') { if (deplacementType == 'normal' || deplacementType == 'saut') {
await this._deplacerDemiReve(targetCoord, deplacementType); await this._deplacerDemiReve(targetCoord, deplacementType);
@ -901,8 +905,8 @@ export class RdDTMRDialog extends Dialog {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
externalRefresh( tmrData ) { externalRefresh(tmrData) {
this.cacheTMR = (game.user.isGM) ? false: this.actor.isTMRCache(); this.cacheTMR = (game.user.isGM) ? false : this.actor.isTMRCache();
this.createPixiSprites(); this.createPixiSprites();
this.forceDemiRevePositionView(); this.forceDemiRevePositionView();
this.updateValuesDisplay(); this.updateValuesDisplay();
@ -920,11 +924,10 @@ export class RdDTMRDialog extends Dialog {
// Gestion cases spéciales type Trou noir, etc // Gestion cases spéciales type Trou noir, etc
tmr = await this.manageTmrInnaccessible(tmr); tmr = await this.manageTmrInnaccessible(tmr);
this.actor.updateCoordTMR(tmr.coord);
await this.actor.updateCoordTMR(tmr.coord); await this.actor.updateCoordTMR(tmr.coord);
this._updateDemiReve(); this._updateDemiReve();
if (ReglesOptionelles.isUsing("appliquer-fatigue")){ if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
this.cumulFatigue += this.fatigueParCase; this.cumulFatigue += this.fatigueParCase;
} }
this.updateValuesDisplay(); this.updateValuesDisplay();
@ -998,7 +1001,7 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
_setTokenPosition(token) { _setTokenPosition(token) {
if ( !this.cacheTMR) { if (!this.cacheTMR) {
this.pixiTMR.setPosition(token.sprite, TMRUtility.convertToCellPos(token.coordTMR())); this.pixiTMR.setPosition(token.sprite, TMRUtility.convertToCellPos(token.coordTMR()));
} }
} }

View File

@ -310,7 +310,7 @@
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each taches as |tache id|}} {{#each taches as |tache id|}}
<li class="item flexrow list-item" data-item-id="{{tache._id}}"><span class="competence-title tache-label"><a>{{tache.name}} ({{tache.data.points_de_tache_courant}}/{{tache.data.points_de_tache}})</a></span> <li class="item flexrow list-item" data-item-id="{{tache._id}}"><span class="competence-title tache-label"><a>{{tache.name}} ({{tache.data.points_de_tache_courant}}/{{tache.data.points_de_tache}})</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
@ -340,7 +340,7 @@
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each jeux as |jeu id|}} {{#each jeux as |jeu id|}}
<li class="item flexrow list-item" data-item-id="{{jeu._id}}"><span class="competence-title jeu-label"><a>{{jeu.name}} (base {{jeu.data.base}})</a></span> <li class="item flexrow list-item" data-item-id="{{jeu._id}}"><span class="competence-title jeu-label"><a>{{jeu.name}} (base {{jeu.data.base}})</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
@ -351,7 +351,7 @@
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each recettesAlchimiques as |recette id|}} {{#each recettesAlchimiques as |recette id|}}
<li class="item flexrow list-item" data-item-id="{{recette._id}}"><span class="competence-title recette-label item-edit"><a>{{recette.name}}</a></span> <li class="item flexrow list-item" data-item-id="{{recette._id}}"><span class="competence-title recette-label item-edit"><a>{{recette.name}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
@ -384,20 +384,28 @@
</li> </li>
{{/if}} {{/if}}
<li class="item flexrow"> <li class="item flexrow">
<span class="competence-label">Demi rêve :</span>
<span>
{{#if options.isGM}} {{#if options.isGM}}
{{caseTmr-label data.reve.tmrpos.coord}} <span class="competence-label flex-shrink">Demi rêve :
<span>{{caseTmr-label data.reve.tmrpos.coord}}</span>
</span>
<span>
<input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/> <input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/>
</span>
{{else}} {{else}}
<span class="competence-label flex-shrink">Demi rêve :
{{#unless hautreve.cacheTMR}}
<span>{{caseTmr-label data.reve.tmrpos.coord}}</span>
{{/unless}}
</span>
<span>
{{#if hautreve.cacheTMR}} {{#if hautreve.cacheTMR}}
?? ??
{{else}} {{else}}
{{caseTmr-label data.reve.tmrpos.coord}}
{{data.reve.tmrpos.coord}} {{data.reve.tmrpos.coord}}
{{/if}} {{/if}}
{{/if}}
</span> </span>
{{/if}}
</li> </li>
{{/if}} {{/if}}
<li class="item flexrow"> <li class="item flexrow">
@ -414,45 +422,51 @@
<span class="competence-label">Refoulement : </span> <span class="competence-label">Refoulement : </span>
<span> <span>
{{#if options.isGM}} {{#if options.isGM}}
<input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/> <input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/>
{{else}} {{else}}
{{data.reve.refoulement.value}} {{data.reve.refoulement.value}}
{{/if}} {{/if}}
</span> </span>
</li> </li>
</ul> </ul>
</div> </div>
<hr> <hr>
{{#if data.attributs.hautrevant.value}} {{#if data.attributs.hautrevant.value}}
<h3>Sorts:</h3> <h3>Sorts:</h3>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each sorts as |mysort key|}} {{#each sorts as |sort key|}}
<li class="item list-item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}"> <li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span> <span class="display-label flex-grow"> <a data-item-id="{{sort._id}}">{{sort.name}}</a></span>
<span>{{mysort.data.draconic}} / {{mysort.data.difficulte}}</span> <span>{{sort.data.draconic}} / {{sort.data.difficulte}}</span>
<div class="item-controls"> <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>
<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="{{mysort._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="sort-label"> {{reserve.sort.name}} - {{reserve.coord}} - {{caseTmr-label reserve.coord}} - r{{reserve.sort.data.ptreve_reel}}</span> <span class="display-label flex-grow">{{reserve.sort.name}}</span>
<span class="flex-shrink">r{{reserve.sort.data.ptreve_reel}}</span>
<span class="flex-shrink">{{reserve.coord}}</span>
<span>{{caseTmr-label reserve.coord}}</span>
<div class="item-controls flex-shrink">
<a class="item-control item-delete flex-shrink" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
<h3>Méditations:</h3> <h3>Méditations:</h3>
<ul class="item-list"> <ul class="item-list">
{{#each meditations as |meditation key|}} {{#each meditations as |meditation key|}}
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}"> <li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
<span class="meditation-label"><a data-id="{{meditation._id}}">{{meditation.name}} - {{meditation.data.competence}}</a></span> <span class="meditation-label flex-grow"><a data-item-id="{{meditation._id}}">{{meditation.name}} - {{meditation.data.competence}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<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>
@ -466,8 +480,8 @@
<ul class="flex-group-left"> <ul class="flex-group-left">
{{#each queues as |queue key|}} {{#each queues as |queue key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}"> <li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{queue._id}}">{{queue.name}}</a></span> <span class="display-label flex-grow"><a data-item-id="{{queue._id}}">{{queue.name}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
@ -477,8 +491,8 @@
<ul class="item-list"> <ul class="item-list">
{{#each souffles as |souffle key|}} {{#each souffles as |souffle key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}"> <li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span> <span class="display-label flex-grow"><a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
@ -488,8 +502,8 @@
<ul class="item-list"> <ul class="item-list">
{{#each tetes as |tete key|}} {{#each tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}"> <li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{tete._id}}">{{tete.name}}</a></span> <span class="display-label flex-grow"><a data-item-id="{{tete._id}}">{{tete.name}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
@ -499,8 +513,8 @@
<ul class="item-list"> <ul class="item-list">
{{#each ombres as |ombre key|}} {{#each ombres as |ombre key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{ombre._id}}"> <li class="item flexrow" data-attribute={{key}} data-item-id="{{ombre._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span> <span class="display-label flex-grow"><a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
@ -512,8 +526,12 @@
<ul class="item-list"> <ul class="item-list">
{{#each hautreve.rencontres as |rencontre key|}} {{#each hautreve.rencontres as |rencontre key|}}
<li class="item flexrow" data-item-id="{{key}}" data-attribute="{{key}}"> <li class="item flexrow" data-item-id="{{key}}" data-attribute="{{key}}">
<span class="case-label"><a data-id="{{key}}">{{rencontre.rencontre.name}} - {{rencontre.coord}} {{#if rencontre.rencontre.date}}({{rencontre.rencontre.date}} - {{rencontre.rencontre.heure}}){{/if}}</a></span> <span class="display-label flex-grow"><a data-item-id="{{key}}">{{rencontre.rencontre.name}} - {{rencontre.coord}}</a></span>
<div class="item-controls"> <span class="flex-shrink">{{caseTmr-label reserve.coord}}</span>
{{#if rencontre.rencontre.date}}
<span>({{rencontre.rencontre.date}} - {{rencontre.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> <a class="item-control rencontre-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
@ -523,11 +541,11 @@
<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" data-item-id="{{casetmr._id}}" data-attribute="{{key}}"> <li class="item flexrow" data-item-id="{{casetmr._id}}" data-attribute="{{key}}">
<span class="item-controls"> <span class="display-label"><a data-item-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
<span 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>
</span> </span>
<span class="case-label"><a data-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
@ -544,7 +562,7 @@
<span class="competence-title competence-label">{{piece.name}}</span> <span class="competence-title competence-label">{{piece.name}}</span>
<span class="competence-title competence-label">{{piece.data.quantite}}</span> <span class="competence-title competence-label">{{piece.data.quantite}}</span>
<span class="competence-title"><a class="monnaie-plus">+</a><a class="monnaie-moins">-</a></span> <span class="competence-title"><a class="monnaie-plus">+</a><a class="monnaie-moins">-</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a> <a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<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>
@ -589,7 +607,7 @@
<li class="item flexrow list-item" data-actor-id="{{monture.id}}"> <li class="item flexrow list-item" data-actor-id="{{monture.id}}">
<img class="sheet-competence-img" src="{{monture.img}}" title="{{monture.name}}"/> <img class="sheet-competence-img" src="{{monture.img}}" title="{{monture.name}}"/>
<span class="competence-title subacteur-label"><a>{{monture.name}}</a></span> <span class="competence-title subacteur-label"><a>{{monture.name}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
@ -604,7 +622,7 @@
<span class="competence-title subacteur-label"><a>{{vehicule.name}}</a></span> <span class="competence-title subacteur-label"><a>{{vehicule.name}}</a></span>
<span class="competence-title">{{vehicule.categorie}}</span> <span class="competence-title">{{vehicule.categorie}}</span>
<span class="competence-title">{{vehicule.structure}}</span> <span class="competence-title">{{vehicule.structure}}</span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>
@ -617,7 +635,7 @@
<li class="item flexrow list-item" data-actor-id="{{suivant.id}}"> <li class="item flexrow list-item" data-actor-id="{{suivant.id}}">
<img class="sheet-competence-img" src="{{suivant.img}}" title="{{suivant.name}}"/> <img class="sheet-competence-img" src="{{suivant.img}}" title="{{suivant.name}}"/>
<span class="competence-title subacteur-label"><a>{{suivant.name}}</a></span> <span class="competence-title subacteur-label"><a>{{suivant.name}}</a></span>
<div class="item-controls"> <div class="item-controls flex-shrink">
<a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-control subacteur-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div> </div>
</li> </li>

View File

@ -1,4 +1,3 @@
{{log 'lancer de sort' this}}
<form class="dialog-roll-sort"> <form class="dialog-roll-sort">
<h2>Lancer le <span class="sort-ou-rituel">{{#if sort.data.isrituel}}rituel{{else}}sort{{/if}}</span>: <h2>Lancer le <span class="sort-ou-rituel">{{#if sort.data.isrituel}}rituel{{else}}sort{{/if}}</span>:
<select name="sort" class="roll-sort flex-grow" data-dtype="String"> <select name="sort" class="roll-sort flex-grow" data-dtype="String">