Merge branch 'v1.4' of https://gitlab.com/LeRatierBretonnien/foundryvtt-reve-de-dragon into v1.4
This commit is contained in:
commit
2bf718c2f7
@ -35,49 +35,17 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
// 0.8.0
|
|
||||||
const objectData = Misc.data(this.object);
|
const objectData = Misc.data(this.object);
|
||||||
// -------------- version 0.7.9
|
|
||||||
// let formData = {
|
|
||||||
// cssClass: this.entity.owner ? "editable" : "locked",
|
|
||||||
// editable: this.isEditable,
|
|
||||||
// entity: duplicate(this.entity.data),
|
|
||||||
// limited: this.entity.limited,
|
|
||||||
// options: this.options,
|
|
||||||
// owner: this.entity.owner,
|
|
||||||
// title: this.title
|
|
||||||
// }
|
|
||||||
// // Entity data
|
|
||||||
// formData.actor = formData.entity;
|
|
||||||
// formData.data = formData.entity.data;
|
|
||||||
|
|
||||||
// // Owned items
|
|
||||||
// formData.items = formData.actor.items;
|
|
||||||
// formData.items.sort((a, b) => (a.sort || 0) - (b.sort || 0));
|
|
||||||
|
|
||||||
// -------------- version 0.8.0
|
|
||||||
|
|
||||||
// // Copy and sort Items
|
|
||||||
// items.sort((a, b) => (a.sort || 0) - (b.sort || 0));
|
|
||||||
// data.items = items;
|
|
||||||
|
|
||||||
// // Copy Active Effects
|
|
||||||
// data.effects = effects;
|
|
||||||
//console.log("---- data");
|
|
||||||
|
|
||||||
// // Return template data
|
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
id: objectData.id,
|
id: objectData.id,
|
||||||
type: objectData.type,
|
type: objectData.type,
|
||||||
img: objectData.img,
|
img: objectData.img,
|
||||||
name: objectData.name,
|
name: objectData.name,
|
||||||
// actor: this.object,
|
|
||||||
editable: this.isEditable,
|
editable: this.isEditable,
|
||||||
cssClass: this.isEditable ? "editable" : "locked",
|
cssClass: this.isEditable ? "editable" : "locked",
|
||||||
data: foundry.utils.deepClone(Misc.templateData(this.object)),
|
data: foundry.utils.deepClone(Misc.templateData(this.object)),
|
||||||
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
effects: this.object.effects.map(e => foundry.utils.deepClone(e.data)),
|
||||||
// items: items,
|
|
||||||
limited: this.object.limited,
|
limited: this.object.limited,
|
||||||
options: this.options,
|
options: this.options,
|
||||||
owner: this.document.isOwner,
|
owner: this.document.isOwner,
|
||||||
|
@ -299,8 +299,18 @@ export class RdDActor extends Actor {
|
|||||||
filterItemsData(filter) {
|
filterItemsData(filter) {
|
||||||
return this.data.items.map(it => Misc.data(it)).filter(filter);
|
return this.data.items.map(it => Misc.data(it)).filter(filter);
|
||||||
}
|
}
|
||||||
|
filterItems(filter) {
|
||||||
|
return this.data.items.filter(it => filter(Misc.data(it)));
|
||||||
|
}
|
||||||
getItemOfType(id, type) {
|
getItemOfType(id, type) {
|
||||||
return id ? this.data.items.find(it => it.id == id && Misc.data(it).type == type) : undefined;
|
if (id && type) {
|
||||||
|
let itemById = this.data.items.find(it => it.id == id);
|
||||||
|
const itemData = Misc.data(itemById);
|
||||||
|
if (itemData.type == type) {
|
||||||
|
return itemById;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
getMonnaie(id) {
|
getMonnaie(id) {
|
||||||
return this.getItemOfType(id, 'monnaie');
|
return this.getItemOfType(id, 'monnaie');
|
||||||
@ -1221,13 +1231,13 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async cacheTMR( ) {
|
async cacheTMR() {
|
||||||
await this.update({ 'data.reve.tmrpos.cache': true });
|
await this.update({ 'data.reve.tmrpos.cache': true });
|
||||||
}
|
}
|
||||||
async montreTMR( ) {
|
async montreTMR() {
|
||||||
await this.update({ 'data.reve.tmrpos.cache': false });
|
await this.update({ 'data.reve.tmrpos.cache': false });
|
||||||
}
|
}
|
||||||
isTMRCache( ) {
|
isTMRCache() {
|
||||||
return this.data.data.reve.tmrpos.cache;
|
return this.data.data.reve.tmrpos.cache;
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -1318,7 +1328,7 @@ export class RdDActor extends Actor {
|
|||||||
async reveActuelIncDec(value) {
|
async reveActuelIncDec(value) {
|
||||||
let mydata = Misc.templateData(this);
|
let mydata = Misc.templateData(this);
|
||||||
let reve = Math.max(mydata.reve.reve.value + value, 0);
|
let reve = Math.max(mydata.reve.reve.value + value, 0);
|
||||||
await this.update( { "data.reve.reve.value": reve });
|
await this.update({ "data.reve.reve.value": reve });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -1681,7 +1691,7 @@ export class RdDActor extends Actor {
|
|||||||
if (rollEthylisme.isEchec) {
|
if (rollEthylisme.isEchec) {
|
||||||
await this._jetDeMoralEthylique(ethylisme);
|
await this._jetDeMoralEthylique(ethylisme);
|
||||||
}
|
}
|
||||||
await this.update({'data.compteurs.ethylisme': ethylisme});
|
await this.update({ 'data.compteurs.ethylisme': ethylisme });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -1708,6 +1718,7 @@ export class RdDActor extends Actor {
|
|||||||
switch (Misc.data(item).type) {
|
switch (Misc.data(item).type) {
|
||||||
case 'nourritureboisson': return await this.actionNourritureboisson(item);
|
case 'nourritureboisson': return await this.actionNourritureboisson(item);
|
||||||
case 'potion': return await this.actionPotion(item);
|
case 'potion': return await this.actionPotion(item);
|
||||||
|
case 'livre': return await this.actionLire(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1719,6 +1730,12 @@ export class RdDActor extends Actor {
|
|||||||
async actionPotion(item) {
|
async actionPotion(item) {
|
||||||
return await this.consommerPotion(item)
|
return await this.consommerPotion(item)
|
||||||
}
|
}
|
||||||
|
async actionLire(item) {
|
||||||
|
const tache = await this.creerTacheDepuisLivre(item, { renderSheet: false });
|
||||||
|
if (tache) {
|
||||||
|
await this.rollTache(tache.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async consommer(item, choix) {
|
async consommer(item, choix) {
|
||||||
@ -2022,8 +2039,8 @@ export class RdDActor extends Actor {
|
|||||||
let draconicList = this.getDraconicList().map(d => duplicate(Misc.data(d)));
|
let draconicList = this.getDraconicList().map(d => duplicate(Misc.data(d)));
|
||||||
for (let sort of sortList) {
|
for (let sort of sortList) {
|
||||||
let draconicsSort = this.getDraconicsSort(draconicList, sort).map(it => it.name);
|
let draconicsSort = this.getDraconicsSort(draconicList, sort).map(it => it.name);
|
||||||
for (let index = 0; index < draconicList.length && sort.data.listIndex==undefined; index++){
|
for (let index = 0; index < draconicList.length && sort.data.listIndex == undefined; index++) {
|
||||||
if (draconicsSort.includes(draconicList[index].name)){
|
if (draconicsSort.includes(draconicList[index].name)) {
|
||||||
sort.data.listIndex = index;
|
sort.data.listIndex = index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2288,22 +2305,29 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async creerTacheDepuisLivre(item) {
|
async creerTacheDepuisLivre(item, options = { renderSheet: true }) {
|
||||||
const itemData = Misc.data(item);
|
const itemData = Misc.data(item);
|
||||||
let tache = {
|
const nomTache = "Lire " + itemData.name;
|
||||||
name: "Lire " + item.name, type: 'tache',
|
const filterTacheLecture = it => it.type == 'tache' && it.name == nomTache;
|
||||||
data: {
|
let tachesExistantes = this.filterItems(filterTacheLecture);
|
||||||
carac: 'intellect',
|
if (tachesExistantes.length == 0) {
|
||||||
competence: 'Ecriture',
|
const tache = {
|
||||||
difficulte: itemData.data.difficulte,
|
name: nomTache, type: 'tache',
|
||||||
periodicite: "60 minutes",
|
data: {
|
||||||
fatigue: 2,
|
carac: 'intellect',
|
||||||
points_de_tache: itemData.data.points_de_tache,
|
competence: 'Ecriture',
|
||||||
points_de_tache_courant: 0,
|
difficulte: itemData.data.difficulte,
|
||||||
description: "Lecture du livre " + item.name + " - XP : " + itemData.data.xp + " - Compétences : " + itemData.data.competence
|
periodicite: "60 minutes",
|
||||||
|
fatigue: 2,
|
||||||
|
points_de_tache: itemData.data.points_de_tache,
|
||||||
|
points_de_tache_courant: 0,
|
||||||
|
description: "Lecture du livre " + item.name + " - XP : " + itemData.data.xp + " - Compétences : " + itemData.data.competence
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
await this.createEmbeddedDocuments('Item', [tache], options);
|
||||||
|
tachesExistantes = this.filterItems(filterTacheLecture);
|
||||||
}
|
}
|
||||||
await this.createEmbeddedDocuments('Item', [tache], { renderSheet: true });
|
return tachesExistantes.length > 0 ? tachesExistantes[0] : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@ -2330,7 +2354,6 @@ export class RdDActor extends Actor {
|
|||||||
callbacks: [
|
callbacks: [
|
||||||
this.createCallbackExperience(),
|
this.createCallbackExperience(),
|
||||||
this.createCallbackAppelAuMoral(),
|
this.createCallbackAppelAuMoral(),
|
||||||
{ condition: r => r.rolled.isETotal, action: r => this._tacheETotal(r) },
|
|
||||||
{ action: r => this._tacheResult(r) }
|
{ action: r => this._tacheResult(r) }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@ -2340,19 +2363,17 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _tacheResult(rollData) {
|
async _tacheResult(rollData) {
|
||||||
// Mise à jour de la tache
|
// Mise à jour de la tache
|
||||||
|
rollData.tache = duplicate(rollData.tache);
|
||||||
rollData.tache.data.points_de_tache_courant += rollData.rolled.ptTache;
|
rollData.tache.data.points_de_tache_courant += rollData.rolled.ptTache;
|
||||||
|
if (rollData.rolled.isETotal){
|
||||||
|
rollData.tache.data.difficulte--;
|
||||||
|
}
|
||||||
this.updateEmbeddedDocuments('Item', [rollData.tache]);
|
this.updateEmbeddedDocuments('Item', [rollData.tache]);
|
||||||
this.santeIncDec("fatigue", rollData.tache.data.fatigue);
|
this.santeIncDec("fatigue", rollData.tache.data.fatigue);
|
||||||
|
|
||||||
RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-tache.html');
|
RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-tache.html');
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
|
||||||
_tacheETotal(rollData) {
|
|
||||||
rollData.tache.data.difficulte--;
|
|
||||||
this.updateEmbeddedDocuments('Item', [rollData.tache]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async _rollArt(artData, selected, oeuvre, callBackResult = r => this._resultArt(r)) {
|
async _rollArt(artData, selected, oeuvre, callBackResult = r => this._resultArt(r)) {
|
||||||
const actorData = Misc.data(this);
|
const actorData = Misc.data(this);
|
||||||
@ -2776,7 +2797,7 @@ export class RdDActor extends Actor {
|
|||||||
refreshTMRView(tmrData) {
|
refreshTMRView(tmrData) {
|
||||||
console.log("REFRESH !!!!");
|
console.log("REFRESH !!!!");
|
||||||
if (this.currentTMR) {
|
if (this.currentTMR) {
|
||||||
this.currentTMR.externalRefresh( tmrData)
|
this.currentTMR.externalRefresh(tmrData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@ export class RdDItem extends Item {
|
|||||||
switch (itemData.type) {
|
switch (itemData.type) {
|
||||||
case 'nourritureboisson': return itemData.data.boisson ? 'Boire' : 'Manger';
|
case 'nourritureboisson': return itemData.data.boisson ? 'Boire' : 'Manger';
|
||||||
case 'potion': return 'Boire';
|
case 'potion': return 'Boire';
|
||||||
|
case 'livre': return 'Lire';
|
||||||
}
|
}
|
||||||
if (options.warnIfNot) {
|
if (options.warnIfNot) {
|
||||||
ui.notifications.warn(`Impossible d'utilise un ${itemData.name}, aucune action associée définie.`);
|
ui.notifications.warn(`Impossible d'utilise un ${itemData.name}, aucune action associée définie.`);
|
||||||
|
@ -40,7 +40,7 @@ export class RdDTMRDialog extends Dialog {
|
|||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
classes: ["tmrdialog"],
|
classes: ["tmrdialog"],
|
||||||
width: 920, height: 980,
|
width: 920, height: 980,
|
||||||
'z-index': 20
|
'z-index': 40
|
||||||
}
|
}
|
||||||
super(dialogConf, dialogOptions);
|
super(dialogConf, dialogOptions);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ export class RdDTMRRencontreDialog extends Dialog {
|
|||||||
const dialogOptions = {
|
const dialogOptions = {
|
||||||
classes: ["tmrrencdialog"],
|
classes: ["tmrrencdialog"],
|
||||||
width: 320, height: 240,
|
width: 320, height: 240,
|
||||||
'z-index': 20
|
'z-index': 50
|
||||||
}
|
}
|
||||||
super(dialogConf, dialogOptions);
|
super(dialogConf, dialogOptions);
|
||||||
|
|
||||||
|
@ -7,49 +7,51 @@ import { RdDUtility } from "./rdd-utility.js";
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
export class RdDTokenHud {
|
export class RdDTokenHud {
|
||||||
|
|
||||||
static init(){
|
static init() {
|
||||||
// Integration du TokenHUD
|
// Integration du TokenHUD
|
||||||
Hooks.on('renderTokenHUD', (app, html, data) => { RdDTokenHud.addTokenHudExtensions(app, html, data._id) });
|
Hooks.on('renderTokenHUD', (app, html, data) => { RdDTokenHud.addTokenHudExtensions(app, html, data._id) });
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async removeExtensionHud( app, html, tokenId) {
|
static async removeExtensionHud(app, html, tokenId) {
|
||||||
let combat = html.find('.control-icon.rdd-combat');
|
html.find('.control-icon.rdd-combat').remove();
|
||||||
combat.remove();
|
html.find('.control-icon.rdd-initiative').remove();
|
||||||
let initiative = html.find('.control-icon.rdd-initiative');
|
|
||||||
initiative.remove();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async addExtensionHud( app, html, tokenId ) {
|
static async addExtensionHud(app, html, tokenId) {
|
||||||
|
|
||||||
let token = canvas.tokens.get(tokenId);
|
let token = canvas.tokens.get(tokenId);
|
||||||
let actor = token.actor;
|
let actor = token.actor;
|
||||||
let combatant = game.combat.combatants.find(c => Misc.data(c).tokenId == tokenId);
|
let combatant = game.combat.combatants.find(c => Misc.data(c).tokenId == tokenId);
|
||||||
app.hasExtension = true;
|
app.hasExtension = true;
|
||||||
|
|
||||||
let armesList = RdDCombatManager.buildListeActionsCombat(combatant) ;
|
let armesList = RdDCombatManager.buildListeActionsCombat(combatant);
|
||||||
const hudData = { combatant: combatant, armes: armesList,
|
const hudData = {
|
||||||
commandes: [{ name: 'Initiative +1', command: 'inc', value: 0.01}, { name: 'Initiative -1',command: 'dec', value: -0.01}] };
|
combatant: combatant, armes: armesList,
|
||||||
|
commandes: [{ name: 'Initiative +1', command: 'inc', value: 0.01 }, { name: 'Initiative -1', command: 'dec', value: -0.01 }]
|
||||||
|
};
|
||||||
|
|
||||||
|
const controlIconCombat = html.find('.control-icon[data-action=combat]');
|
||||||
// initiative
|
// initiative
|
||||||
await RdDTokenHud._configureSubMenu(html.find('.control-icon.combat'), 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', hudData,
|
await RdDTokenHud._configureSubMenu(controlIconCombat, 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html', hudData,
|
||||||
(event) => {
|
(event) => {
|
||||||
let initCommand = event.currentTarget.attributes['data-command'].value;
|
let initCommand = event.currentTarget.attributes['data-command'].value;
|
||||||
let combatantId = event.currentTarget.attributes['data-combatant-id'].value;
|
let combatantId = event.currentTarget.attributes['data-combatant-id'].value;
|
||||||
if ( !initCommand ) {
|
if (!initCommand) {
|
||||||
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
||||||
let arme = armesList[armeIndex];
|
let arme = armesList[armeIndex];
|
||||||
RdDCombatManager.rollInitiativeCompetence(combatantId, arme);
|
RdDCombatManager.rollInitiativeCompetence(combatantId, arme);
|
||||||
} else if (initCommand == 'inc') {
|
} else if (initCommand == 'inc') {
|
||||||
RdDCombatManager.incDecInit( combatantId, 0.01 );
|
RdDCombatManager.incDecInit(combatantId, 0.01);
|
||||||
} else if ( initCommand == 'dec') {
|
} else if (initCommand == 'dec') {
|
||||||
RdDCombatManager.incDecInit( combatantId, -0.01 );
|
RdDCombatManager.incDecInit(combatantId, -0.01);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const controlIconTarget = html.find('.control-icon[data-action=target]');
|
||||||
// combat
|
// combat
|
||||||
await RdDTokenHud._configureSubMenu(html.find('.control-icon.target'), 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html', hudData,
|
await RdDTokenHud._configureSubMenu(controlIconTarget, 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html', hudData,
|
||||||
(event) => {
|
(event) => {
|
||||||
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
let armeIndex = event.currentTarget.attributes['data-arme-id'].value;
|
||||||
let arme = armesList[armeIndex];
|
let arme = armesList[armeIndex];
|
||||||
@ -59,38 +61,35 @@ export class RdDTokenHud {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async addTokenHudExtensions(app, html, tokenId) {
|
static async addTokenHudExtensions(app, html, tokenId) {
|
||||||
|
const controlIconCombat = html.find('.control-icon[data-action=combat]');
|
||||||
html.find('.control-icon.combat').click(event => {
|
controlIconCombat.click(event => {
|
||||||
if ( event.currentTarget.className.includes('active')) {
|
if (event.currentTarget.className.includes('active')) {
|
||||||
RdDTokenHud.removeExtensionHud( app, html, tokenId);
|
RdDTokenHud.removeExtensionHud(app, html, tokenId);
|
||||||
} else {
|
} else {
|
||||||
setTimeout( function() { RdDTokenHud.addExtensionHud( app, html, tokenId) } , 200 );
|
setTimeout(function () { RdDTokenHud.addExtensionHud(app, html, tokenId) }, 200);
|
||||||
}
|
}
|
||||||
} );
|
});
|
||||||
|
|
||||||
let combatIcon = html.find('.control-icon.combat');
|
if (controlIconCombat.length>0 && controlIconCombat[0].className.includes('active')) {
|
||||||
if ( combatIcon[0].className.includes('active') ) {
|
RdDTokenHud.addExtensionHud(app, html, tokenId);
|
||||||
RdDTokenHud.addExtensionHud( app, html, tokenId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static async _configureSubMenu(insertionPoint, template, hudData, onMenuItem) {
|
static async _configureSubMenu(insertionPoint, template, hudData, onMenuItem) {
|
||||||
const hud = $(await renderTemplate(template, hudData));
|
const hud = $(await renderTemplate(template, hudData));
|
||||||
const imgHud = hud.find('img.rdd-hud-togglebutton');
|
|
||||||
const list = hud.find('div.rdd-hud-list');
|
const list = hud.find('div.rdd-hud-list');
|
||||||
|
|
||||||
hud.toggleClass('active');
|
RdDTokenHud._toggleHudListActive(hud, list);
|
||||||
HtmlUtility._showControlWhen(list, hud.hasClass('active'));
|
|
||||||
|
hud.find('img.rdd-hud-togglebutton').click(event => RdDTokenHud._toggleHudListActive(hud, list));
|
||||||
imgHud.click(event => {
|
|
||||||
hud.toggleClass('active');
|
|
||||||
HtmlUtility._showControlWhen(list, hud.hasClass('active'));
|
|
||||||
});
|
|
||||||
|
|
||||||
list.find('.rdd-hud-menu').click(onMenuItem);
|
list.find('.rdd-hud-menu').click(onMenuItem);
|
||||||
|
|
||||||
insertionPoint.after(hud);
|
insertionPoint.after(hud);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static _toggleHudListActive(hud, list) {
|
||||||
|
hud.toggleClass('active');
|
||||||
|
HtmlUtility._showControlWhen(list, hud.hasClass('active'));
|
||||||
|
}
|
||||||
}
|
}
|
@ -4,6 +4,7 @@ import { ChatUtility } from "./chat-utility.js";
|
|||||||
import { RdDCombat } from "./rdd-combat.js";
|
import { RdDCombat } from "./rdd-combat.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
|
import { TMRUtility } from "./tmr-utility.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
// This table starts at 0 -> niveau -10
|
// This table starts at 0 -> niveau -10
|
||||||
@ -108,8 +109,13 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html',
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html',
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor-liste-blessures-partial.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html',
|
'systems/foundryvtt-reve-de-dragon/templates/actor-blessure-partial.html',
|
||||||
|
// Conteneur/item in Actor sheet
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html',
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html',
|
||||||
//Items
|
//Items
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/item-competencecreature-sheet.html',
|
'systems/foundryvtt-reve-de-dragon/templates/item-competencecreature-sheet.html',
|
||||||
@ -172,9 +178,6 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/calendar-template.html',
|
'systems/foundryvtt-reve-de-dragon/templates/calendar-template.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/calendar-editor-template.html',
|
'systems/foundryvtt-reve-de-dragon/templates/calendar-editor-template.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html',
|
'systems/foundryvtt-reve-de-dragon/templates/heures-select-option.html',
|
||||||
// Conteneur/item in Actor sheet
|
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/actor-inventaire-conteneur.html',
|
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html',
|
|
||||||
// HUD
|
// HUD
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html',
|
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html',
|
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.html',
|
||||||
@ -208,6 +211,8 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('un', str => Grammar.articleIndetermine(str));
|
Handlebars.registerHelper('un', str => Grammar.articleIndetermine(str));
|
||||||
Handlebars.registerHelper('accord', (genre, ...args) => Grammar.accord(genre, args));
|
Handlebars.registerHelper('accord', (genre, ...args) => Grammar.accord(genre, args));
|
||||||
Handlebars.registerHelper('buildConteneur', (objet) => { return RdDUtility.buildConteneur(objet); });
|
Handlebars.registerHelper('buildConteneur', (objet) => { return RdDUtility.buildConteneur(objet); });
|
||||||
|
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
||||||
|
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
||||||
|
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
@ -325,7 +330,7 @@ export class RdDUtility {
|
|||||||
if (!niveau) niveau = 1;
|
if (!niveau) niveau = 1;
|
||||||
objet.niveau = niveau;
|
objet.niveau = niveau;
|
||||||
//console.log("OBJ:", objet);
|
//console.log("OBJ:", objet);
|
||||||
let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-inventaire-conteneur.html']({ item: objet });
|
let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html']({ item: objet });
|
||||||
if (objet.type == 'conteneur') {
|
if (objet.type == 'conteneur') {
|
||||||
//console.log("ITEM DISPLAYED", objet );
|
//console.log("ITEM DISPLAYED", objet );
|
||||||
if (this.getAfficheContenu(objet._id)) {
|
if (this.getAfficheContenu(objet._id)) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { TMRRencontres } from "./tmr-rencontres.js";
|
import { TMRRencontres } from "./tmr-rencontres.js";
|
||||||
import { Misc } from "./misc.js";
|
import { Misc } from "./misc.js";
|
||||||
|
import { Grammar } from "./grammar.js";
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
const TMRMapping = {
|
const TMRMapping = {
|
||||||
|
@ -26,8 +26,8 @@ export class Pelerinage extends Draconique {
|
|||||||
return pixiTMR.sprite(this.code(), {
|
return pixiTMR.sprite(this.code(), {
|
||||||
zIndex: tmrTokenZIndex.conquete,
|
zIndex: tmrTokenZIndex.conquete,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
taille: tmrConstants.twoThird,
|
taille: tmrConstants.full,
|
||||||
decallage: tmrConstants.right
|
decallage: tmrConstants.center
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
packs/materiel-de-base.db
Normal file
1
packs/materiel-de-base.db
Normal file
File diff suppressed because one or more lines are too long
@ -146,6 +146,15 @@
|
|||||||
"path": "./packs/rappel-des-regles.db",
|
"path": "./packs/rappel-des-regles.db",
|
||||||
"entity": "JournalEntry",
|
"entity": "JournalEntry",
|
||||||
"tags" : [ "journal", "règles" ]
|
"tags" : [ "journal", "règles" ]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "materiel-de-base",
|
||||||
|
"label": "Matériel de base",
|
||||||
|
"system": "foundryvtt-reve-de-dragon",
|
||||||
|
"module": "foundryvtt-reve-de-dragon",
|
||||||
|
"path": "./packs/materiel-de-base.db",
|
||||||
|
"entity": "JournalEntry",
|
||||||
|
"tags" : [ "journal", "matériel" ]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "queues-de-dragon",
|
"name": "queues-de-dragon",
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
8
templates/actor-sheet-categorie-competences-partial.html
Normal file
8
templates/actor-sheet-categorie-competences-partial.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<header class="competence-header flexrow">
|
||||||
|
<span class="competence-title">{{categorie}}</span>
|
||||||
|
</header>
|
||||||
|
<ul class="item-list alterne-list">
|
||||||
|
{{#each competences as |comp key|}}
|
||||||
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
11
templates/actor-sheet-oeuvre-partial.html
Normal file
11
templates/actor-sheet-oeuvre-partial.html
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<li class="item flexrow list-item" data-item-id="{{oeuvre._id}}">
|
||||||
|
<span>{{upperFirst typeOeuvre}}</span>
|
||||||
|
<span class="competence-title {{classOeuvre}}">
|
||||||
|
<a>{{oeuvre.name}} (niveau {{oeuvre.data.niveau}})</a>
|
||||||
|
</span>
|
||||||
|
<div class="item-controls">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
@ -233,81 +233,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="grid grid-2col">
|
<div class="grid grid-2col">
|
||||||
<div class="flex-group-left flexcol competence-column">
|
<div class="flex-group-left flexcol competence-column">
|
||||||
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.generale categorie="Compétences générales"}}
|
||||||
<header class="competence-header flexrow">
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.particuliere categorie="Compétences Particulières"}}
|
||||||
<span class="competence-title">Compétences générales</span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.specialisee categorie="Compétences Spécialisées"}}
|
||||||
</header>
|
|
||||||
<ul class="item-list alterne-list">
|
|
||||||
{{#each competenceByCategory.generale as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<header class="competence-header flexrow">
|
|
||||||
<span class="competence-title">Compétences Particulières</span>
|
|
||||||
</header>
|
|
||||||
<ul class="item-list alterne-list">
|
|
||||||
{{#each competenceByCategory.particuliere as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<header class="competence-header flexrow">
|
|
||||||
<span class="competence-title">Compétences Spécialisées</span>
|
|
||||||
</header>
|
|
||||||
<ul class="item-list alterne-list">
|
|
||||||
{{#each competenceByCategory.specialisee as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-group-left flexcol competence-column">
|
<div class="flex-group-left flexcol competence-column">
|
||||||
<header class="competence-header flexrow">
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.melee categorie="Compétences de Mêlée"}}
|
||||||
<span class="competence-title">Compétences de Mêlée</span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.tir categorie="Compétences de Tir"}}
|
||||||
</header>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.lancer categorie="Compétences de Lancer"}}
|
||||||
<ul class="item-list alterne-list">
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.connaissance categorie="Connaissances"}}
|
||||||
{{#each competenceByCategory.melee as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<header class="competence-header flexrow">
|
|
||||||
<span class="competence-title">Compétences de Tir</span>
|
|
||||||
</header>
|
|
||||||
<ul class="item-list alterne-list">
|
|
||||||
{{#each competenceByCategory.tir as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<header class="competence-header flexrow">
|
|
||||||
<span class="competence-title">Compétences de Lancer</span>
|
|
||||||
</header>
|
|
||||||
<ul class="item-list alterne-list">
|
|
||||||
{{#each competenceByCategory.lancer as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<header class="competence-header flexrow">
|
|
||||||
<span class="competence-title">Connaissances</span>
|
|
||||||
</header>
|
|
||||||
<ul class="item-list alterne-list">
|
|
||||||
{{#each competenceByCategory.connaissance as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{{#if data.attributs.hautrevant.value}}
|
{{#if data.attributs.hautrevant.value}}
|
||||||
<header class="competence-header flexrow">
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.draconic categorie="Draconic"}}
|
||||||
<span class="competence-title">Draconic</span>
|
|
||||||
</header>
|
|
||||||
<ul class="item-list alterne-list">
|
|
||||||
{{#each competenceByCategory.draconic as |comp key|}}
|
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -384,44 +321,19 @@
|
|||||||
<h3>Oeuvres diverses :</h3><a class="creer-une-oeuvre">Créer une oeuvre</a>
|
<h3>Oeuvres diverses :</h3><a class="creer-une-oeuvre">Créer une oeuvre</a>
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
{{#each chants as |chant id|}}
|
{{#each chants as |chant id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{chant._id}}"><span>Chant</span><span class="competence-title chant-label"><a>{{chant.name}} (niveau {{chant.data.niveau}})</a></span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=chant typeOeuvre="Chant" classOeuvre="chant-label"}}
|
||||||
<div class="item-controls">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each musiques as |musique id|}}
|
{{#each musiques as |musique id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{musique._id}}"><span>Musique</span><span class="competence-title musique-label"><a>{{musique.name}} (niveau {{musique.data.niveau}})</a></span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=musique typeOeuvre="Musique" classOeuvre="musique-label"}}
|
||||||
<div class="item-controls">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each danses as |danse id|}}
|
{{#each danses as |danse id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{danse._id}}"><span>Danse</span><span class="competence-title danse-label"><a>{{danse.name}} (niveau {{danse.data.niveau}})</a></span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=danse typeOeuvre="Danse" classOeuvre="danse-label"}}
|
||||||
<div class="item-controls">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each oeuvres as |oeuvre id|}}
|
{{#each oeuvres as |oeuvre id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{oeuvre._id}}"><span>{{upperFirst oeuvre.data.competence}}</span><span class="competence-title oeuvre-label"><a>{{oeuvre.name}} (niveau {{oeuvre.data.niveau}})</a></span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=oeuvre typeOeuvre=oeuvre.data.competence classOeuvre="oeuvre-label"}}
|
||||||
<div class="item-controls">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each recettescuisine as |recette id|}}
|
{{#each recettescuisine as |recette id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{recette._id}}"><span>Recette de cuisine</span><span class="competence-title recettecuisine-label"><a>{{recette.name}} (niveau {{recette.data.niveau}})</a></span>
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-oeuvre-partial.html" oeuvre=recette typeOeuvre="Recette de cuisine" classOeuvre="recettecuisine-label"}}
|
||||||
<div class="item-controls">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
<h3>Jeux :</h3>
|
<h3>Jeux :</h3>
|
||||||
@ -472,14 +384,16 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<li class="item flexrow">
|
<li class="item flexrow">
|
||||||
<span class="competence-label">Position en TMR :</span>
|
<span class="competence-label">Demi rêve :</span>
|
||||||
<span>
|
<span>
|
||||||
{{#if options.isGM}}
|
{{#if options.isGM}}
|
||||||
|
{{caseTmr-label data.reve.tmrpos.coord}}
|
||||||
<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"/>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#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}}
|
{{/if}}
|
||||||
@ -510,77 +424,43 @@
|
|||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
{{#if data.attributs.hautrevant.value}}
|
{{#if data.attributs.hautrevant.value}}
|
||||||
<div>
|
<h3>Sorts:</h3>
|
||||||
<h3>Sorts:</h3>
|
<ul class="item-list alterne-list">
|
||||||
<ul class="item-list">
|
{{#each sorts as |mysort key|}}
|
||||||
{{#each sorts as |mysort key|}}
|
<li class="item list-item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
|
||||||
<li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
|
<span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span>
|
||||||
<span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span>
|
<span>{{mysort.data.draconic}} / {{mysort.data.difficulte}}</span>
|
||||||
<span>{{mysort.data.draconic}} / {{mysort.data.difficulte}}</span>
|
<div class="item-controls">
|
||||||
<div class="item-controls">
|
<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>
|
|
||||||
</div>
|
<h3>Sorts en Réserve:</h3>
|
||||||
<hr>
|
<ul class="item-list alterne-list">
|
||||||
<div>
|
{{#each hautreve.sortsReserve as |reserve key|}}
|
||||||
<h3>Sorts en Réserve:</h3>
|
<li class="item list-item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
|
||||||
<ul class="item-list">
|
<img class="sheet-competence-img" src="{{reserve.sort.img}}" />
|
||||||
{{#each hautreve.sortsReserve as |reserve key|}}
|
<span class="sort-label"> {{reserve.sort.name}} - {{reserve.coord}} - {{caseTmr-label reserve.coord}} - r{{reserve.sort.data.ptreve_reel}}</span>
|
||||||
<li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
|
</li>
|
||||||
<span class="sort-label"> {{reserve.sort.name}} - {{reserve.coord}}</span>
|
{{/each}}
|
||||||
</li>
|
</ul>
|
||||||
{{/each}}
|
|
||||||
</ul>
|
<h3>Méditations:</h3>
|
||||||
</div>
|
<ul class="item-list">
|
||||||
<hr>
|
{{#each meditations as |meditation key|}}
|
||||||
<div>
|
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
|
||||||
<h3>Méditations:</h3>
|
<span class="meditation-label"><a data-id="{{meditation._id}}">{{meditation.name}} - {{meditation.data.competence}}</a></span>
|
||||||
<ul class="item-list">
|
<div class="item-controls">
|
||||||
{{#each meditations as |meditation key|}}
|
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
|
||||||
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
|
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
<span class="meditation-label"><a data-id="{{meditation._id}}">{{meditation.name}} - {{meditation.data.competence}}</a></span>
|
</div>
|
||||||
<div class="item-controls">
|
</li>
|
||||||
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
|
{{/each}}
|
||||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
</ul>
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div>
|
|
||||||
<h3>Cases Spéciales:</h3>
|
|
||||||
<ul class="item-list">
|
|
||||||
{{#each hautreve.casesTmr as |casetmr key|}}
|
|
||||||
<li class="item flexrow" data-item-id="{{casetmr._id}}" data-attribute="{{key}}">
|
|
||||||
<span class="case-label"><a data-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
|
|
||||||
<div class="item-controls">
|
|
||||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div>
|
|
||||||
<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="case-label"><a data-id="{{key}}">{{rencontre.rencontre.name}} - {{rencontre.coord}} {{#if rencontre.rencontre.date}}({{rencontre.rencontre.date}} - {{rencontre.rencontre.heure}}){{/if}}</a></span>
|
|
||||||
<div class="item-controls">
|
|
||||||
<a class="item-control rencontre-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{{/each}}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<hr>
|
<hr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{!-- Queues, Souffles, Tetes, Ombre --}}
|
{{!-- Queues, Souffles, Tetes, Ombre --}}
|
||||||
<h3>Queues:</h3>
|
<h3>Queues:</h3>
|
||||||
<ul class="flex-group-left">
|
<ul class="flex-group-left">
|
||||||
@ -626,7 +506,32 @@
|
|||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</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="case-label"><a data-id="{{key}}">{{rencontre.rencontre.name}} - {{rencontre.coord}} {{#if rencontre.rencontre.date}}({{rencontre.rencontre.date}} - {{rencontre.rencontre.heure}}){{/if}}</a></span>
|
||||||
|
<div class="item-controls">
|
||||||
|
<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>
|
||||||
|
<ul class="item-list">
|
||||||
|
{{#each hautreve.casesTmr as |casetmr key|}}
|
||||||
|
<li class="item" data-item-id="{{casetmr._id}}" data-attribute="{{key}}">
|
||||||
|
<span class="item-controls">
|
||||||
|
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
|
</span>
|
||||||
|
<span class="case-label"><a data-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
|
</ul>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{!-- Equipment Tab --}}
|
{{!-- Equipment Tab --}}
|
||||||
@ -669,7 +574,7 @@
|
|||||||
{{#each objets as |item id|}}
|
{{#each objets as |item id|}}
|
||||||
{{#unless item.estContenu}}
|
{{#unless item.estContenu}}
|
||||||
{{#if (ne item.type 'conteneur')}}
|
{{#if (ne item.type 'conteneur')}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-inventaire-conteneur.html" item=item }}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html" item=item }}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -789,7 +694,7 @@
|
|||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor content=data.notes target="data.notes" button=true owner=owner editable=editable}}
|
{{editor content=data.notes target="data.notes" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
<div class="form-group editor">
|
<div class="form-group editor">
|
||||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||||
</div>
|
</div>
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/editor-notes-mj.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/actor-sheet-editor-notes-mj.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user