Gestion des actions sur les items
- dans la liste d'équipement, liste d'actions fournie par code - support d'actions multiples - listener générique Utilisation du mécanisme pour tous les items, standardisation de l'apparence des boutons d'items
This commit is contained in:
parent
ce7f5381ca
commit
9fc21e6d97
@ -185,22 +185,19 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
||||
await blessure?.setSoinsBlessure({ soinscomplets: { bonus: Number(event.currentTarget.value) } })
|
||||
});
|
||||
|
||||
// Equip Inventory Item
|
||||
this.html.find('.item-equip').click(async event => this.actor.equiperObjet(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.roll-chance-actuelle').click(async event => this.actor.rollCarac('chance-actuelle'))
|
||||
|
||||
this.html.find('.button-appel-chance').click(async event => this.actor.rollAppelChance())
|
||||
|
||||
this.html.find('[name="jet-astrologie"]').click(async event => this.actor.astrologieNombresAstraux())
|
||||
this.html.find('.tache-label a').click(async event => this.actor.rollTache(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.action-tache').click(async event => this.actor.rollTache(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.meditation-label a').click(async event => this.actor.rollMeditation(RdDSheetUtility.getItemId(event)))
|
||||
|
||||
this.html.find('.chant-label a').click(async event => this.actor.rollChant(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.danse-label a').click(async event => this.actor.rollDanse(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.musique-label a').click(async event => this.actor.rollMusique(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.oeuvre-label a').click(async event => this.actor.rollOeuvre(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.jeu-label a').click(async event => this.actor.rollJeu(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.recettecuisine-label a').click(async event => this.actor.rollRecetteCuisine(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.action-chant').click(async event => this.actor.rollChant(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.action-danse').click(async event => this.actor.rollDanse(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.action-musique').click(async event => this.actor.rollMusique(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.action-oeuvre').click(async event => this.actor.rollOeuvre(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.action-jeu').click(async event => this.actor.rollJeu(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.action-recettecuisine').click(async event => this.actor.rollRecetteCuisine(RdDSheetUtility.getItemId(event)))
|
||||
|
||||
this.html.find('.description-aleatoire').click(async event => new AppPersonnageAleatoire(this.actor).render(true))
|
||||
if (game.user.isGM) {
|
||||
@ -218,13 +215,12 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
||||
// Boutons spéciaux MJs
|
||||
this.html.find('.forcer-tmr-aleatoire').click(async event => this.actor.reinsertionAleatoire("Action MJ"))
|
||||
this.html.find('.don-de-haut-reve').click(async event => this.actor.addDonDeHautReve())
|
||||
this.html.find('.sortreserve-add').click(async event => this.actor.addSortReserve(RdDSheetUtility.getItemId(event)))
|
||||
this.html.find('.afficher-tmr').click(async event => this.actor.changeTMRVisible())
|
||||
}
|
||||
|
||||
// Points de reve actuel
|
||||
this.html.find('.roll-reve-actuel').click(async event => this.actor.rollCarac('reve-actuel', {resistance:true}))
|
||||
this.html.find('.empoignade-label a').click(async event => RdDEmpoignade.onAttaqueEmpoignadeFromItem(RdDSheetUtility.getItem(event, this.actor)))
|
||||
this.html.find('.action-empoignade').click(async event => RdDEmpoignade.onAttaqueEmpoignadeFromItem(RdDSheetUtility.getItem(event, this.actor)))
|
||||
|
||||
this.html.find('.roll-arme').click(async event => this.actor.rollArme(foundry.utils.duplicate(this._getEventArmeCombat(event)), 'competence'))
|
||||
|
||||
@ -328,7 +324,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet {
|
||||
/* -------------------------------------------- */
|
||||
async selectTypeOeuvreToCreate() {
|
||||
let types = RdDItem.getTypesOeuvres();
|
||||
let content = `<span class="competence-label">Selectionnez le type d'oeuvre</span><select class="item-type">`;
|
||||
let content = `<span class="generic-label">Selectionnez le type d'oeuvre</span><select class="item-type">`;
|
||||
for (let typeName of types) {
|
||||
content += `<option value="${typeName}">${Misc.typeName('Item', typeName)}</option>`
|
||||
}
|
||||
|
182
module/actor.js
182
module/actor.js
@ -167,8 +167,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async $perteRevePotionsEnchantees() {
|
||||
const potionUpdates = this.itemTypes[ITEM_TYPES.potion].map(
|
||||
it.perteRevePotion())
|
||||
const potionUpdates = this.itemTypes[ITEM_TYPES.potion].map(it => it.perteRevePotion())
|
||||
.filter(it => it != undefined)
|
||||
if (potionUpdates.length > 0) {
|
||||
console.log('perte rêve de potions', potionUpdates)
|
||||
@ -987,13 +986,10 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
}
|
||||
|
||||
async addSortReserve(itemId) {
|
||||
if (itemId) {
|
||||
const item = this.items.get(itemId)
|
||||
if (item.type == ITEM_TYPES.sort && !item.system.isrituel) {
|
||||
this.$createSortReserve(item)
|
||||
return
|
||||
}
|
||||
async addSortReserve(item) {
|
||||
if (item?.type == ITEM_TYPES.sort && !item.system.isrituel) {
|
||||
this.$createSortReserve(item)
|
||||
return
|
||||
}
|
||||
const selectSortReserve = {
|
||||
title: "Créer un sort en réserve",
|
||||
@ -1197,49 +1193,8 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
new RdDRollDialogEthylisme(html, rollData, this, r => this.saouler(r.forceAlcool)).render(true);
|
||||
}
|
||||
|
||||
async actionPrincipale(item, onActionItem = async () => { }) {
|
||||
let result = await super.actionPrincipale(item, onActionItem)
|
||||
if (!result){
|
||||
result = await this.actionNourritureboisson(item)
|
||||
}
|
||||
if (!result){
|
||||
result = await this.itemActionPrincipale(item)
|
||||
}
|
||||
await onActionItem()
|
||||
return result
|
||||
}
|
||||
|
||||
async itemActionPrincipale(item) {
|
||||
switch (item.type) {
|
||||
case ITEM_TYPES.potion: return await this.consommerPotion(item);
|
||||
case ITEM_TYPES.livre: return await this.actionLire(item);
|
||||
case ITEM_TYPES.conteneur: return await item.sheet.render(true);
|
||||
case ITEM_TYPES.herbe: return await this.actionHerbe(item);
|
||||
case ITEM_TYPES.queue: case ITEM_TYPES.ombre: return await this.actionRefoulement(item);
|
||||
}
|
||||
}
|
||||
|
||||
async actionNourritureboisson(item) {
|
||||
switch (item.getUtilisationCuisine()) {
|
||||
case 'brut': {
|
||||
const utilisation = new Dialog({
|
||||
title: "Nourriture brute",
|
||||
content: `Que faire de votre ${item.name}`,
|
||||
buttons: {
|
||||
'cuisiner': { icon: '<i class="fa-solid fa-utensils"></i>', label: 'Cuisiner', callback: async () => await this.preparerNourriture(item) },
|
||||
'manger': { icon: '<i class="fa-solid fa-drumstick-bite"></i>', label: 'Manger cru', callback: async () => await this.mangerNourriture(item) }
|
||||
}
|
||||
});
|
||||
return utilisation.render(true);
|
||||
}
|
||||
case 'pret':
|
||||
return await this.mangerNourriture(item);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
async mangerNourriture(item) {
|
||||
return (await DialogConsommer.create(this, item)).render(true);
|
||||
async mangerNourriture(item, onActionItem) {
|
||||
return (await DialogConsommer.create(this, item, onActionItem)).render(true);
|
||||
}
|
||||
|
||||
async actionLire(item) {
|
||||
@ -2569,8 +2524,7 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async equiperObjet(itemID) {
|
||||
let item = this.getEmbeddedDocument('Item', itemID);
|
||||
async equiperObjet(item) {
|
||||
if (item?.isEquipable()) {
|
||||
const isEquipe = !item.system.equipe;
|
||||
await item.update({ "system.equipe": isEquipe });
|
||||
@ -2833,59 +2787,6 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
return guerisonData;
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async fabriquerPotion(herbeData) {
|
||||
let newPotion = {
|
||||
name: `Potion de ${herbeData.system.categorie} (${herbeData.name})`, type: 'potion',
|
||||
img: "systems/foundryvtt-reve-de-dragon/icons/objets/fiole_verre.webp",
|
||||
system: {
|
||||
quantite: 1, cout: 0, encombrement: 0.1,
|
||||
categorie: herbeData.system.categorie,
|
||||
herbe: herbeData.name,
|
||||
rarete: herbeData.system.rarete,
|
||||
herbebrins: herbeData.nbBrins,
|
||||
herbebonus: herbeData.herbebonus,
|
||||
description: ""
|
||||
}
|
||||
}
|
||||
await this.createEmbeddedDocuments('Item', [newPotion]);
|
||||
|
||||
let newQuantite = herbeData.system.quantite - herbeData.nbBrins;
|
||||
let messageData = {
|
||||
alias: this.getAlias(),
|
||||
nbBrinsReste: newQuantite,
|
||||
potion: newPotion,
|
||||
herbe: herbeData
|
||||
}
|
||||
this.diminuerQuantiteObjet(herbeData._id, herbeData.nbBrins);
|
||||
|
||||
ChatMessage.create({
|
||||
whisper: ChatUtility.getOwners(this),
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-fabriquer-potion-base.html`, messageData)
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async diminuerQuantiteObjet(id, nb, options = { supprimerSiZero: false }) {
|
||||
const item = this.getItem(id);
|
||||
if (item) {
|
||||
await item.diminuerQuantite(nb, options);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async consommerPotion(potion) {
|
||||
if (potion.system.categorie.includes('Soin')) {
|
||||
await this.consommerPotionSoin(potion);
|
||||
} else if (potion.system.categorie.includes('Repos')) {
|
||||
await this.consommerPotionRepos(potion);
|
||||
} else {
|
||||
await this.consommerPotionGenerique(potion);
|
||||
}
|
||||
await this.diminuerQuantiteObjet(potion.id, 1, { supprimerSiZero: potion.supprimer });
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async consommerPotionSoin(potionData) {
|
||||
potionData.alias = this.name;
|
||||
@ -2947,22 +2848,77 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async consommerPotionGenerique(potion) {
|
||||
potion.alias = this.name;
|
||||
async fabriquerPotion(herbeData) {
|
||||
let newPotion = {
|
||||
name: `Potion de ${herbeData.system.categorie} (${herbeData.name})`, type: 'potion',
|
||||
img: "systems/foundryvtt-reve-de-dragon/icons/objets/fiole_verre.webp",
|
||||
system: {
|
||||
quantite: 1, cout: 0, encombrement: 0.1,
|
||||
categorie: herbeData.system.categorie,
|
||||
herbe: herbeData.name,
|
||||
rarete: herbeData.system.rarete,
|
||||
herbebrins: herbeData.nbBrins,
|
||||
herbebonus: herbeData.herbebonus,
|
||||
description: ""
|
||||
}
|
||||
}
|
||||
await this.createEmbeddedDocuments('Item', [newPotion], { renderSheet: true });
|
||||
|
||||
if (potion.system.magique) {
|
||||
let newQuantite = herbeData.system.quantite - herbeData.nbBrins;
|
||||
let messageData = {
|
||||
alias: this.getAlias(),
|
||||
nbBrinsReste: newQuantite,
|
||||
potion: newPotion,
|
||||
herbe: herbeData
|
||||
}
|
||||
this.diminuerQuantiteObjet(herbeData._id, herbeData.nbBrins);
|
||||
|
||||
ChatMessage.create({
|
||||
whisper: ChatUtility.getOwners(this),
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-fabriquer-potion-base.html`, messageData)
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async diminuerQuantiteObjet(id, nb, options = { supprimerSiZero: false }) {
|
||||
const item = this.getItem(id);
|
||||
if (item) {
|
||||
await item.diminuerQuantite(nb, options);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async consommerPotionGenerique(potionData) {
|
||||
potionData.alias = this.name;
|
||||
|
||||
if (potionData.system.magique) {
|
||||
// Gestion de la résistance:
|
||||
potion.rolled = await RdDResolutionTable.roll(this.getReveActuel(), -8);
|
||||
if (potion.rolled.isEchec) {
|
||||
potionData.rolled = await RdDResolutionTable.roll(this.getReveActuel(), -8);
|
||||
if (potionData.rolled.isEchec) {
|
||||
await this.reveActuelIncDec(-1);
|
||||
}
|
||||
}
|
||||
ChatMessage.create({
|
||||
whisper: ChatUtility.getOwners(this),
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-consommer-potion-generique.html`, potion)
|
||||
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-consommer-potion-generique.html`, potionData)
|
||||
});
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async consommerPotion(potion, onActionItem = async () => { }) {
|
||||
const potionData = potion
|
||||
|
||||
if (potionData.system.categorie.includes('Soin')) {
|
||||
this.consommerPotionSoin(potionData);
|
||||
} else if (potionData.system.categorie.includes('Repos')) {
|
||||
this.consommerPotionRepos(potionData);
|
||||
} else {
|
||||
this.consommerPotionGenerique(potionData);
|
||||
}
|
||||
await this.diminuerQuantiteObjet(potion.id, 1, { supprimerSiZero: potionData.supprimer });
|
||||
await onActionItem()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async onUpdateActor(update, options, actorId) {
|
||||
const updatedEndurance = update?.system?.sante?.endurance
|
||||
|
@ -7,6 +7,7 @@ import { ITEM_TYPES } from "../constants.js";
|
||||
import { RdDItem } from "../item.js";
|
||||
import { RdDItemCompetenceCreature } from "../item-competencecreature.js";
|
||||
import { RdDTextEditor } from "../apps/rdd-text-roll-editor.js";
|
||||
import { ItemAction } from "../item/item-actions.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
@ -84,39 +85,32 @@ export class RdDBaseActorSheet extends ActorSheet {
|
||||
super.activateListeners(html);
|
||||
this.html = html;
|
||||
|
||||
this.html.find('.conteneur-name a').click(async event => {
|
||||
RdDUtility.toggleAfficheContenu(this.getItemId(event));
|
||||
this.render(true);
|
||||
});
|
||||
this.html.find('.actor-montrer').click(async event => this.actor.postActorToChat());
|
||||
this.html.find('.actionItem').click(event => ItemAction.onActionItem(event, this.actor, this.options))
|
||||
this.html.find('.item-edit').click(async event => this.itemActionEdit(event))
|
||||
this.html.find('.item-montrer').click(async event => this.getItem(event)?.postItemToChat());
|
||||
this.html.find('.conteneur-name a').click(async event => {
|
||||
RdDUtility.toggleAfficheContenu(this.getItemId(event))
|
||||
this.render(true)
|
||||
})
|
||||
|
||||
this.html.find('.actor-montrer').click(async event => this.actor.postActorToChat());
|
||||
|
||||
this.html.find('.recherche')
|
||||
.each((index, field) => {
|
||||
this._rechercheSelectArea(field);
|
||||
})
|
||||
.keyup(async event => this._rechercherKeyup(event))
|
||||
.change(async event => this._rechercherKeyup(event));
|
||||
this.html.find('.recherche').prop("disabled", false);
|
||||
.change(async event => this._rechercherKeyup(event))
|
||||
|
||||
this.html.find('.recherche').prop("disabled", false)
|
||||
|
||||
// Everything below here is only needed if the sheet is editable
|
||||
if (!this.options.editable) return;
|
||||
|
||||
this.html.find('.item-action').click(async event => {
|
||||
const item = RdDSheetUtility.getItem(event, this.actor);
|
||||
item?.actionPrincipale(this.actor, async () => this.render())
|
||||
});
|
||||
|
||||
|
||||
this.html.find('.item-split').click(async event => {
|
||||
const item = this.getItem(event);
|
||||
RdDSheetUtility.splitItem(item, this.actor);
|
||||
});
|
||||
this.html.find('.item-equip-armure').click(async event => this.actor.equiperObjet(this.getItem(event)))
|
||||
this.html.find('.item-delete').click(async event => RdDUtility.confirmActorItemDelete(this.getItem(event), this.actor));
|
||||
this.html.find('.item-split').click(async event => RdDSheetUtility.splitItem(this.getItem(event), this.actor))
|
||||
this.html.find('.item-quantite-plus').click(async event => this.actor.itemQuantiteIncDec(this.getItemId(event), 1));
|
||||
this.html.find('.item-quantite-moins').click(async event => this.actor.itemQuantiteIncDec(this.getItemId(event), -1));
|
||||
this.html.find('.item-delete').click(async event => RdDUtility.confirmActorItemDelete(this, this.getItem(event)));
|
||||
this.html.find('.item-vendre').click(async event => this.vendre(this.getItem(event)));
|
||||
|
||||
this.html.find('.creer-un-objet').click(async event => {
|
||||
this.selectObjetTypeToCreate();
|
||||
@ -202,7 +196,7 @@ export class RdDBaseActorSheet extends ActorSheet {
|
||||
/* -------------------------------------------- */
|
||||
async selectObjetTypeToCreate() {
|
||||
let types = this.getTypesInventaire().sort(Misc.ascending(type => Misc.typeName('Item', type)));
|
||||
let content = `<span class="competence-label">Selectionnez le type d'équipement</span><select class="item-type">`;
|
||||
let content = `<span class="generic-label">Selectionnez le type d'équipement</span><select class="item-type">`;
|
||||
for (let typeName of types) {
|
||||
content += `<option value="${typeName}">${Misc.typeName('Item', typeName)}</option>`
|
||||
}
|
||||
|
@ -737,25 +737,20 @@ export class RdDBaseActor extends Actor {
|
||||
|
||||
actionImpossible(action) {
|
||||
ui.notifications.info(`${this.getAlias()} ne peut pas faire cette action: ${action}`)
|
||||
|
||||
}
|
||||
|
||||
async jetEthylisme() { this.actionImpossible("jet d'éthylisme") }
|
||||
async rollAppelChance() { this.actionImpossible("appel à la chance") }
|
||||
async jetDeMoral() { this.actionImpossible("jet de moral") }
|
||||
|
||||
async actionPrincipale(item, onActionItem = async () => { }) {
|
||||
switch (item.type) {
|
||||
case ITEM_TYPES.conteneur: return await item.sheet.render(true);
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
async resetItemUse() { }
|
||||
async incDecItemUse(itemId, inc = 1) { }
|
||||
getItemUse(itemId) { return 0; }
|
||||
|
||||
async finDeRound(options = { terminer: false }) { }
|
||||
isActorCombat() { return false }
|
||||
getCaracInit(competence) { return 0 }
|
||||
|
||||
listActionsCombat() { return [] }
|
||||
listActionsPossessions() {
|
||||
return this.itemTypes[ITEM_TYPES.possession]
|
||||
|
@ -45,6 +45,7 @@ export class RdDCommerceSheet extends RdDBaseActorSheet {
|
||||
super.activateListeners(html);
|
||||
|
||||
this.html.find('a.item-acheter').click(async event => await this.vente(this.getItem(event)));
|
||||
this.html.find('.service-acheter').click(async event => await this.vente(this.getItem(event)));
|
||||
|
||||
if (!this.options.editable) return;
|
||||
|
||||
|
@ -14,6 +14,7 @@ import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||
import { RdDItem } from "./item.js";
|
||||
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { ItemAction } from "./item/item-actions.js";
|
||||
|
||||
/**
|
||||
* Extend the basic ItemSheet for RdD specific items
|
||||
@ -199,13 +200,14 @@ export class RdDItemSheet extends ItemSheet {
|
||||
this.html.find('.chat-roll-text').click(async event => await RdDTextEditor.chatRollText(event))
|
||||
|
||||
if (this.actor) {
|
||||
this.html.find('.consommer-potion').click(event => this.itemActionConsommer(event))
|
||||
this.html.find('.item-action').click(event => this.itemAction(event))
|
||||
// TODO
|
||||
this.html.find('.actionItem').click(event => ItemAction.onActionItem(event, this.actor, this.options))
|
||||
|
||||
this.html.find('.item-potion-consommer').click(event => this.itemActionConsommer(event))
|
||||
|
||||
this.html.find('.item-split').click( event => this.itemActionSplit(event))
|
||||
this.html.find('.item-edit').click(async event => RdDSheetUtility.getItem(event, this.actor)?.sheet.render(true));
|
||||
this.html.find('.item-delete').click(async event => RdDUtility.confirmActorItemDelete(this, RdDSheetUtility.getItem(event, this.actor)));
|
||||
this.html.find('.item-vendre').click(async event => RdDSheetUtility.getItem(event, this.actor)?.proposerVente());
|
||||
this.html.find('.item-montrer').click(async event => RdDSheetUtility.getItem(event, this.actor)?.postItemToChat());
|
||||
this.html.find('.item-delete').click(async event => this.itemActionDelete(event));
|
||||
|
||||
this.html.find('.item-quantite-plus').click(async event => {
|
||||
await this.actor.itemQuantiteIncDec(RdDSheetUtility.getItemId(event), 1)
|
||||
@ -223,6 +225,11 @@ export class RdDItemSheet extends ItemSheet {
|
||||
RdDTimestamp.handleTimestampEditor(this.html, 'system.temporel.fin', updateItemTimestamp);
|
||||
}
|
||||
|
||||
itemActionDelete(event) {
|
||||
const item = RdDSheetUtility.getItem(event, this.actor)
|
||||
return RdDUtility.confirmActorItemDelete(item, this.actor)
|
||||
}
|
||||
|
||||
async itemActionConsommer(event) {
|
||||
const item = RdDSheetUtility.getItem(event, this.actor)
|
||||
if (item) {
|
||||
@ -239,14 +246,6 @@ export class RdDItemSheet extends ItemSheet {
|
||||
}
|
||||
}
|
||||
|
||||
async itemAction(event) {
|
||||
const item = RdDSheetUtility.getItem(event, this.actor);
|
||||
if (item) {
|
||||
await item.actionPrincipale(this.actor)
|
||||
await RdDSheetUtility.renderItemBranch(this.actor, item)
|
||||
}
|
||||
}
|
||||
|
||||
_getEventActor(event) {
|
||||
let actorId = event.currentTarget.attributes['data-actor-id'].value;
|
||||
let actor = game.actors.get(actorId);
|
||||
|
122
module/item.js
122
module/item.js
@ -9,6 +9,7 @@ import { RdDRaretes } from "./item/raretes.js";
|
||||
import { CATEGORIES_COMPETENCES } from "./item-competence.js";
|
||||
import { CATEGORIES_COMPETENCES_CREATURES } from "./item-competencecreature.js";
|
||||
import { BASE_CORPS_A_CORPS, BASE_ESQUIVE } from "./item/base-items.js";
|
||||
import { ITEM_ACTIONS, DEFAULT_ACTIONS, COMMON_ACTIONS } from "./item/item-actions.js";
|
||||
|
||||
const typesInventaireMateriel = [
|
||||
ITEM_TYPES.arme,
|
||||
@ -45,41 +46,41 @@ densité 3.5 (~2.3 à 4, parfois plus) -- https://www.juwelo.fr/guide-des-pierre
|
||||
*/
|
||||
|
||||
export const defaultItemImg = {
|
||||
competence: "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp",
|
||||
competencecreature: "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp",
|
||||
arme: "systems/foundryvtt-reve-de-dragon/icons/armes_armures/epee_gnome.webp",
|
||||
armure: "systems/foundryvtt-reve-de-dragon/icons/armes_armures/armure_plaques.webp",
|
||||
conteneur: "systems/foundryvtt-reve-de-dragon/icons/objets/sac_a_dos.webp",
|
||||
sort: "systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp",
|
||||
herbe: "systems/foundryvtt-reve-de-dragon/icons/botanique/Endorlotte.webp",
|
||||
faune: "systems/foundryvtt-reve-de-dragon/icons/faune/rongeur.webp",
|
||||
ingredient: "systems/foundryvtt-reve-de-dragon/icons/objets/sable_poudre.webp",
|
||||
livre: "systems/foundryvtt-reve-de-dragon/icons/objets/livre.webp",
|
||||
potion: "systems/foundryvtt-reve-de-dragon/icons/objets/liqueur_de_bagdol.webp",
|
||||
rencontre: "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.webp",
|
||||
queue: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
||||
ombre: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
||||
souffle: "systems/foundryvtt-reve-de-dragon/icons/souffle_dragon.webp",
|
||||
tete: "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.webp",
|
||||
meditation: "systems/foundryvtt-reve-de-dragon/icons/meditations_ecrits/meditation_alchimie.webp",
|
||||
recettealchimique: "systems/foundryvtt-reve-de-dragon/icons/competence_alchimie.webp",
|
||||
chant: "systems/foundryvtt-reve-de-dragon/icons/arts/chant_0.webp",
|
||||
competence: "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp",
|
||||
competencecreature: "systems/foundryvtt-reve-de-dragon/icons/competence_defaut.webp",
|
||||
conteneur: "systems/foundryvtt-reve-de-dragon/icons/objets/sac_a_dos.webp",
|
||||
danse: "systems/foundryvtt-reve-de-dragon/icons/arts/danse_0.webp",
|
||||
empoignade: "systems/foundryvtt-reve-de-dragon/icons/empoignade.webp",
|
||||
extraitpoetique: "systems/foundryvtt-reve-de-dragon/icons/competence_ecriture.webp",
|
||||
faune: "systems/foundryvtt-reve-de-dragon/icons/faune/rongeur.webp",
|
||||
gemme: "systems/foundryvtt-reve-de-dragon/icons/gemmes/almaze.webp",
|
||||
herbe: "systems/foundryvtt-reve-de-dragon/icons/botanique/Endorlotte.webp",
|
||||
ingredient: "systems/foundryvtt-reve-de-dragon/icons/objets/sable_poudre.webp",
|
||||
jeu: "systems/foundryvtt-reve-de-dragon/icons/arts/jeux_petasse.webp",
|
||||
recettecuisine: "systems/foundryvtt-reve-de-dragon/icons/arts/recette_cuisine_1.webp",
|
||||
musique: "systems/foundryvtt-reve-de-dragon/icons/arts/chant_0.webp",
|
||||
livre: "systems/foundryvtt-reve-de-dragon/icons/objets/livre.webp",
|
||||
maladie: "systems/foundryvtt-reve-de-dragon/icons/maladies_venins/maladie.webp",
|
||||
poison: "systems/foundryvtt-reve-de-dragon/icons/maladies_venins/venin.webp",
|
||||
oeuvre: "systems/foundryvtt-reve-de-dragon/icons/competence_comedie.webp",
|
||||
meditation: "systems/foundryvtt-reve-de-dragon/icons/meditations_ecrits/meditation_alchimie.webp",
|
||||
musique: "systems/foundryvtt-reve-de-dragon/icons/arts/chant_0.webp",
|
||||
nourritureboisson: "systems/foundryvtt-reve-de-dragon/icons/objets/provision_crue.webp",
|
||||
oeuvre: "systems/foundryvtt-reve-de-dragon/icons/competence_comedie.webp",
|
||||
ombre: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
||||
poison: "systems/foundryvtt-reve-de-dragon/icons/maladies_venins/venin.webp",
|
||||
possession: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp",
|
||||
potion: "systems/foundryvtt-reve-de-dragon/icons/objets/liqueur_de_bagdol.webp",
|
||||
queue: "systems/foundryvtt-reve-de-dragon/icons/queue_dragon.webp",
|
||||
recettealchimique: "systems/foundryvtt-reve-de-dragon/icons/competence_alchimie.webp",
|
||||
recettecuisine: "systems/foundryvtt-reve-de-dragon/icons/arts/recette_cuisine_1.webp",
|
||||
rencontre: "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.webp",
|
||||
service: "systems/foundryvtt-reve-de-dragon/icons/services/lit.webp",
|
||||
signedraconique: "systems/foundryvtt-reve-de-dragon/icons/tmr/signe_draconique.webp",
|
||||
gemme: "systems/foundryvtt-reve-de-dragon/icons/gemmes/almaze.webp",
|
||||
possession: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp",
|
||||
sort: "systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp",
|
||||
sortreserve: "systems/foundryvtt-reve-de-dragon/icons/competence_oniros.webp",
|
||||
extraitpoetique: "systems/foundryvtt-reve-de-dragon/icons/competence_ecriture.webp",
|
||||
souffle: "systems/foundryvtt-reve-de-dragon/icons/souffle_dragon.webp",
|
||||
tarot: "systems/foundryvtt-reve-de-dragon/icons/tarots/dos-tarot.webp",
|
||||
empoignade: "systems/foundryvtt-reve-de-dragon/icons/competence_corps_a_corps.webp"
|
||||
tete: "systems/foundryvtt-reve-de-dragon/icons/tete_dragon.webp",
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -409,54 +410,51 @@ export class RdDItem extends Item {
|
||||
// appliquer le pourcentage
|
||||
return this.parent.calculerPrix(this);
|
||||
}
|
||||
return this.system.cout;
|
||||
return this.system.cout
|
||||
}
|
||||
|
||||
prepareDerivedData() {
|
||||
super.prepareDerivedData();
|
||||
if (this.isInventaire()) {
|
||||
this.system.encTotal = this.getEncTotal();
|
||||
this.system.actionPrincipale = this.getActionPrincipale({ warnIfNot: false });
|
||||
this.system.encTotal = this.getEncTotal()
|
||||
}
|
||||
this.equipable = this.isEquipable();
|
||||
this.equipable = this.isEquipable()
|
||||
}
|
||||
|
||||
getActionPrincipale(options = { warnIfNot: true }) {
|
||||
itemActions() {
|
||||
return COMMON_ACTIONS.concat(this.itemSpecificActions()).concat(DEFAULT_ACTIONS)
|
||||
}
|
||||
|
||||
itemSpecificActions() {
|
||||
const actions = ITEM_ACTIONS[this.type] ?? []
|
||||
// const actorTypes = actions.actorTypes ?? [ACTOR_TYPES.personnage]
|
||||
// if (!actorTypes.includes(this.actor?.type)) {
|
||||
// return []
|
||||
// }
|
||||
return actions
|
||||
}
|
||||
|
||||
isActionAllowed(code) {
|
||||
switch (this.type) {
|
||||
case ITEM_TYPES.conteneur: return 'Ouvrir';
|
||||
}
|
||||
if (this.actor?.isPersonnage()) {
|
||||
const warn = options.warnIfNot;
|
||||
if (this.getUtilisationCuisine() == 'brut') {
|
||||
return 'Cuisiner';
|
||||
}
|
||||
switch (this.type) {
|
||||
case ITEM_TYPES.nourritureboisson: return this._actionOrWarnQuantiteZero(this.system.boisson ? 'Boire' : 'Manger', warn);
|
||||
case ITEM_TYPES.potion: return this._actionOrWarnQuantiteZero('Consommer', warn);
|
||||
case ITEM_TYPES.livre: return this._actionOrWarnQuantiteZero('Lire', warn);
|
||||
case ITEM_TYPES.herbe: return this.isHerbeAPotion() ? this._actionOrWarnQuantiteZero('Décoction', warn) : undefined;
|
||||
case ITEM_TYPES.queue: case ITEM_TYPES.ombre: return this.system.refoulement > 0 ? 'Refouler' : undefined;
|
||||
}
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async actionPrincipale(actor, onActionItem = async () => { }) {
|
||||
if (!this.getActionPrincipale()) { return }
|
||||
await actor?.actionPrincipale(this, onActionItem);
|
||||
}
|
||||
|
||||
_actionOrWarnQuantiteZero(actionName, warn) {
|
||||
if ((this.system.quantite ?? 0) <= 0) {
|
||||
if (warn) {
|
||||
ui.notifications.warn(`Vous n'avez plus de ${this.name}.`);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
else {
|
||||
return actionName;
|
||||
case ITEM_TYPES.possession:
|
||||
case ITEM_TYPES.empoignade:
|
||||
case ITEM_TYPES.rencontre:
|
||||
case ITEM_TYPES.signedraconique:
|
||||
switch (code) {
|
||||
case 'item-edit':
|
||||
case 'item-delete':
|
||||
return game.user.isGM
|
||||
}
|
||||
case ITEM_TYPES.maladie:
|
||||
case ITEM_TYPES.poison:
|
||||
return game.user.isGM
|
||||
case ITEM_TYPES.casetmr:
|
||||
switch (code) {
|
||||
case 'item-delete':
|
||||
return game.user.isGM
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
async diminuerQuantite(nombre, options = { diminuerQuantite: true, supprimerSiZero: false }) {
|
||||
|
154
module/item/item-actions.js
Normal file
154
module/item/item-actions.js
Normal file
@ -0,0 +1,154 @@
|
||||
import { Misc } from "../misc.js"
|
||||
import { RdDSheetUtility } from "../rdd-sheet-utility.js"
|
||||
import { RdDUtility } from "../rdd-utility.js"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
* options.editable ?
|
||||
*
|
||||
*/
|
||||
const _SPACEHOLDER = { placeholder: true }
|
||||
|
||||
const _VENDRE = {
|
||||
code: 'item-vendre', label: 'Vendre ou donner', icon: it => 'fa-solid fa-comments-dollar',
|
||||
filter: it => Misc.toInt(it.system.quantite) > 0,
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => item.proposerVente()
|
||||
}
|
||||
const _ACHAT_SERVICE = {
|
||||
code: 'item-service-acheter', label: 'Acheter', icon: it => 'fa-regular fa-coins',
|
||||
//filter: it => Misc.toInt(it.system.quantite) > 0,
|
||||
//optionsFilter: options => options.editable,
|
||||
//action: (item, actor) => item.proposerVente()
|
||||
}
|
||||
const _MONTRER = {
|
||||
code: 'item-montrer', label: 'Montrer', icon: it => 'fa-solid fa-comment',
|
||||
action: (item, actor) => item.postItemToChat()
|
||||
}
|
||||
const _EDIT = {
|
||||
code: 'item-edit', label: 'Editer', icon: it => 'fa-solid fa-edit',
|
||||
action: (item, actor) => item.sheet.render(true)
|
||||
}
|
||||
const _DELETE = {
|
||||
code: 'item-delete', label: 'Supprimer', icon: it => 'fa-solid fa-trash',
|
||||
optionsFilter: options => options.editable && options.isOwner,
|
||||
action: (item, actor) => RdDUtility.confirmActorItemDelete(item, actor)
|
||||
}
|
||||
const _EQUIPER = {
|
||||
code: 'item-equip', label: 'Equiper', icon: it => it.system.equipe ? 'fa-solid fa-hand-rock' : 'fa-regular fa-hand-paper',
|
||||
filter: it => !it.estContenu && it.isEquipable(),
|
||||
action: (item, actor) => actor.equiperObjet(item)
|
||||
}
|
||||
|
||||
const _CUISINER = {
|
||||
code: 'item-cuisiner', label: 'Cuisiner', icon: it => 'fa-solid fa-utensils',
|
||||
filter: it => it.getUtilisation() == 'cuisine' && it.system.sust > 0,
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.preparerNourriture(item)
|
||||
}
|
||||
const _MANGER_CRU = {
|
||||
code: 'item-manger-cru', label: 'Manger cru', icon: it => 'fa-solid fa-drumstick-bite',
|
||||
filter: it => it.getUtilisation() == 'cuisine' && it.system.sust > 0,
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.mangerNourriture(item)
|
||||
}
|
||||
const _MANGER = {
|
||||
code: 'item-manger', label: 'Manger', icon: it => 'fa-solid fa-utensils',
|
||||
filter: it => !(it.system.boisson),
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.mangerNourriture(item)
|
||||
}
|
||||
const _BOIRE = {
|
||||
code: 'item-boire', label: 'Boire', icon: it => 'fa-solid fa-glass-water',
|
||||
filter: it => it.system.boisson,
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.mangerNourriture(item)
|
||||
}
|
||||
const _DECOCTION = {
|
||||
code: 'item-decoction', label: 'Décoction', icon: it => 'fa-solid fa-flask-vial',
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.actionHerbe(item)
|
||||
}
|
||||
const _OUVRIR = {
|
||||
code: 'item-edit', label: 'Ouvrir', icon: it => 'fa-solid fa-eye',
|
||||
action: (item, actor) => item.sheet.render(true)
|
||||
}
|
||||
|
||||
const _LIRE = {
|
||||
code: 'item-lire', label: 'Lire', icon: it => 'fa-solid fa-book-open',
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.actionLire(item)
|
||||
}
|
||||
|
||||
const _REFOULER = {
|
||||
code: 'item-refouler', label: 'Refouler', icon: it => 'fa-solid fa-burst',
|
||||
filter: it => it.system.refoulement > 0,
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.actionRefoulement(item)
|
||||
}
|
||||
|
||||
const _CONSOMMER_POTION = {
|
||||
code: 'item-potion-consommer', label: 'Consommer', icon: it => 'fa-solid fa-vial',
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => actor.consommerPotion(item)
|
||||
}
|
||||
|
||||
const _ENCHANTER = {
|
||||
code: 'item-enchanter', label: 'Enchanter', icon: it => 'fa-solid fa-sparkles',
|
||||
filter: it => it.isEnchantable(),
|
||||
optionsFilter: options => options.editable,
|
||||
action: (item, actor) => item.enchanterPotion()
|
||||
}
|
||||
|
||||
const _SORT_RESERVE = {
|
||||
code: 'item-sortreserve-add', label: 'Ajouter en réserve', icon: it => 'fa-solid fa-sparkles',
|
||||
filter: it => game.user.isGM && !it.system.isrituel,
|
||||
action: (item, actor) => actor.addSortReserve(item)
|
||||
}
|
||||
|
||||
export const COMMON_ACTIONS = [_EQUIPER]
|
||||
export const DEFAULT_ACTIONS = [_SPACEHOLDER, _VENDRE, _MONTRER, _EDIT, _DELETE]
|
||||
|
||||
export const ITEM_ACTIONS = {
|
||||
faune: [_CUISINER, _MANGER_CRU],
|
||||
ingredient: [_CUISINER, _MANGER_CRU],
|
||||
conteneur: [_OUVRIR],
|
||||
herbe: [_DECOCTION, _CUISINER, _MANGER_CRU],
|
||||
livre: [_LIRE],
|
||||
nourritureboisson: [_MANGER, _BOIRE],
|
||||
ombre: [_REFOULER],
|
||||
plante: [_CUISINER, _MANGER_CRU],
|
||||
potion: [_CONSOMMER_POTION, _ENCHANTER],
|
||||
queue: [_REFOULER],
|
||||
sort: [_SORT_RESERVE],
|
||||
service: [_ACHAT_SERVICE]
|
||||
}
|
||||
|
||||
|
||||
export class ItemAction {
|
||||
|
||||
static applies(action, item, options) {
|
||||
return action
|
||||
&& item.isActionAllowed(action.code)
|
||||
&& (!action.filter || action.filter(item))
|
||||
&& (!action.optionsFilter || action.optionsFilter(options))
|
||||
}
|
||||
|
||||
static icon(action, item) {
|
||||
if (action && action.icon) {
|
||||
return action.icon(item)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
static onActionItem(event, actor, options) {
|
||||
const item = RdDSheetUtility.getItem(event, actor)
|
||||
const code = $(event.currentTarget).data('code')
|
||||
const action = item.itemActions().find(it => it.code == code)
|
||||
if (action && (!action.optionsFilter || action.optionsFilter(options))) {
|
||||
action.action(item, actor)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
import { ITEM_TYPES } from "../constants.js";
|
||||
import { Grammar } from "../grammar.js";
|
||||
import { RdDItem } from "../item.js";
|
||||
import { SystemCompendiums } from "../settings/system-compendiums.js";
|
||||
import { RdDTimestamp } from "../time/rdd-timestamp.js";
|
||||
import { ITEM_ACTIONS } from "./item-actions.js";
|
||||
import { DialogEnchanter } from "./potion/dialog-enchanter.js";
|
||||
|
||||
const POTION_MAGIQUE = ['AlchimieEnchante', 'ReposEnchante', 'SoinEnchante', 'AutreEnchante']
|
||||
@ -41,6 +42,10 @@ export class RdDItemPotion extends RdDItem {
|
||||
isEnchantable() { return POTION_ENCHANTABLE.includes(this.system.categorie) }
|
||||
isMagique() { return POTION_MAGIQUE.includes(this.system.categorie) }
|
||||
|
||||
itemSpecificActions() {
|
||||
return ITEM_ACTIONS[ITEM_TYPES.potion]
|
||||
}
|
||||
|
||||
getActions(options = { warnIfNot: true }) {
|
||||
const actionConsommer = this.prepareAction('Consommer', options.warnIfNot);
|
||||
if (this.isEnchantable()) {
|
||||
@ -53,8 +58,7 @@ export class RdDItemPotion extends RdDItem {
|
||||
actionConsommer
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
// TDOD: purifier?
|
||||
getUtilisation() {
|
||||
switch (this.system.categorie) {
|
||||
case 'Alchimie': case 'AlchimieEnchante':
|
||||
@ -89,11 +93,11 @@ export class RdDItemPotion extends RdDItem {
|
||||
if (this.system.magique && !this.system.prpermanent && this.system.pr > 0) {
|
||||
const nouveauReve = Math.max(this.system.pr - 1, 0)
|
||||
return {
|
||||
_id: it._id,
|
||||
_id: this.id,
|
||||
name: this.name,
|
||||
img: this.img,
|
||||
'system.pr': nouveauReve,
|
||||
'system.quantite': nouveauReve > 0 ? it.system.quantite : 0,
|
||||
'system.quantite': nouveauReve > 0 ? this.system.quantite : 0,
|
||||
'system.magique': nouveauReve > 0
|
||||
}
|
||||
}
|
||||
@ -113,16 +117,16 @@ export class RdDItemPotion extends RdDItem {
|
||||
})
|
||||
}
|
||||
else {
|
||||
const updates = {
|
||||
await this.update({
|
||||
'system.pr': enchanter.nouveaupr,
|
||||
'system.purifie': enchanter.purifier,
|
||||
'system.magique': true,
|
||||
'system.categorie': this.categorieEnchantement().enchante,
|
||||
'system.prpermanent': enchanter.prpermanent,
|
||||
'system.prdate': RdDItemPotion.dateEnchantement()
|
||||
}
|
||||
this.update(updates)
|
||||
})
|
||||
}
|
||||
this.sheet?.render(true)
|
||||
}
|
||||
|
||||
calculPuissance() { return this.system.herbebonus * this.system.pr }
|
||||
@ -134,7 +138,7 @@ export class RdDItemPotion extends RdDItem {
|
||||
}
|
||||
|
||||
static dateEnchantement() {
|
||||
return game.system.rdd.calendrier.getTimestamp().debutJournee()
|
||||
return game.system.rdd.calendrier.getTimestamp().debutJournee().indexDate
|
||||
}
|
||||
|
||||
static buildHerbesList(listeHerbes, max) {
|
||||
|
@ -43,7 +43,8 @@ export class RdDPotionItemSheet extends RdDItemInventaireSheet {
|
||||
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
this.html.find('.enchanter-potion').click((event) => this.potion.enchanterPotion())
|
||||
|
||||
this.html.find('.item-enchanter').click((event) => this.potion.enchanterPotion())
|
||||
|
||||
this.html.find('.date-enchantement').change((event) => {
|
||||
const jour = Number(this.html.find('input.date-enchantement[name="enchantement.jour"]').val())
|
||||
|
@ -428,7 +428,6 @@ export class RdDEmpoignade {
|
||||
return await Item.create({
|
||||
name: "Empoignade en cours de " + attacker.name + ' sur ' + defender.name,
|
||||
type: 'empoignade',
|
||||
img: "systems/foundryvtt-reve-de-dragon/icons/entites/possession2.webp",
|
||||
system: { description: "", empoignadeid: foundry.utils.randomID(16), compteempoigne: 0, empoigneurid: attacker.id, empoigneid: defender.id, ptsemp: 0, empoigneurname: attacker.name, empoignename: defender.name }
|
||||
},
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ export class RdDPossession {
|
||||
await RdDResolutionTable.displayRollData(rollData, rollData.attacker, 'chat-resultat-possession.html')
|
||||
if (rollData.possession.isPosseder || rollData.possession.isConjurer) {
|
||||
// conjuration
|
||||
victime.deleteEmbeddedDocuments("Item", [rollData.possession._id])
|
||||
await victime.deleteEmbeddedDocuments("Item", [rollData.possession._id])
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,11 @@ export class RdDRoll extends Dialog {
|
||||
this.rollData.selectedCarac = this.rollData.carac[this.actor.mapCarac(this.rollData.competence.system.defaut_carac)]
|
||||
}
|
||||
if (this.rollData.selectedCarac) {
|
||||
this.html.find("[name='carac']").val(RdDCarac.caracDetails(this.rollData.selectedCarac.label).code)
|
||||
this.html.find("[name='carac']").val(
|
||||
this.actor?.type == ACTOR_TYPES.personnage
|
||||
? RdDCarac.caracDetails(this.rollData.selectedCarac.label).code
|
||||
: this.rollData.selectedCarac.label
|
||||
)
|
||||
}
|
||||
if (this.rollData.selectedSort) {
|
||||
this.setSelectedSort(this.rollData.selectedSort);
|
||||
|
@ -241,7 +241,7 @@ export class RdDTMRDialog extends Dialog {
|
||||
this._getTokensRencontres().forEach(t => this._trackToken(t))
|
||||
this._getTokensSortsReserve().forEach(t => this._trackToken(t))
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
updateTokens() {
|
||||
this._removeTokens(t => true);
|
||||
|
@ -24,6 +24,7 @@ import { RdDBaseActor } from "./actor/base-actor.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { Monnaie } from "./item-monnaie.js";
|
||||
import { ItemAction } from "./item/item-actions.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// This table starts at 0 -> niveau -10
|
||||
@ -116,6 +117,7 @@ export class RdDUtility {
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor-entite-sheet.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor-vehicule-sheet.html',
|
||||
// sous-parties de feuilles de personnages
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/header-buttons.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/header-etat.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/header-compteurs.html',
|
||||
@ -130,47 +132,46 @@ export class RdDUtility {
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/carac-derivee.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/carac-creature.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/carac-entitee.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/comp-creature.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/comp-possession.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/comp-creature.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/comp-possession.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/carac-total.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/competence.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/competence.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/competence-categorie.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/xp-competences.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/combat.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/blessures.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/blessure.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/maladies-poisons.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/possessions.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/maladies-poisons.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/possessions.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/resonances.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/taches.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/taches.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/oeuvres.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/taches.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/oeuvres.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/jeus.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/alchimie.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/alchimie.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/astrologie.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/chirurgie.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/chirurgie.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/haut-revant.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queues.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-tetes.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-signes-draconiques.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-rencontres.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts-reserve.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-meditations.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/dragon-tetes.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-signes-draconiques.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-rencontres.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts-reserve.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-meditations.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/hr-casetmrs.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/xp-journal.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/inventaire.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-item.hbs',
|
||||
"systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.html",
|
||||
"systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.hbs",
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/liens-animaux.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/liens-suivants.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/liens-vehicules.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire.html',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire.hbs',
|
||||
'systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire-item.hbs',
|
||||
//Items
|
||||
'systems/foundryvtt-reve-de-dragon/templates/scripts/autocomplete-script.hbs',
|
||||
@ -336,6 +337,8 @@ export class RdDUtility {
|
||||
Handlebars.registerHelper('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, field));
|
||||
// Items
|
||||
Handlebars.registerHelper('rarete-getChamp', (rarete, field) => RdDRaretes.getChamp(rarete, field));
|
||||
Handlebars.registerHelper('item-action-applies', (action, item, options) => ItemAction.applies(action, item, options))
|
||||
Handlebars.registerHelper('item-action-icon', (action, item) => ItemAction.icon(action, item))
|
||||
|
||||
// TMRs
|
||||
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
||||
@ -469,6 +472,7 @@ export class RdDUtility {
|
||||
static filterItemsPerTypeForSheet(formData, itemTypes) {
|
||||
Object.values(ITEM_TYPES).forEach(t => {
|
||||
formData[t + 's'] = Misc.arrayOrEmpty(itemTypes[t])
|
||||
itemTypes[t].forEach(item => item.actions = item.itemActions())
|
||||
})
|
||||
|
||||
formData.maladiesPoisons = formData.maladies.concat(formData.poisons)
|
||||
@ -898,7 +902,7 @@ export class RdDUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async confirmActorItemDelete(sheet, item, htmlToDelete) {
|
||||
static async confirmActorItemDelete(item, actor) {
|
||||
const itemId = item.id;
|
||||
const confirmationSuppression = {
|
||||
settingConfirmer: "confirmation-supprimer-" + item.getItemGroup(),
|
||||
@ -907,8 +911,7 @@ export class RdDUtility {
|
||||
buttonLabel: "Supprimer",
|
||||
onAction: () => {
|
||||
console.log('Delete : ', itemId);
|
||||
sheet.actor.deleteEmbeddedDocuments('Item', [itemId], { renderSheet: false });
|
||||
RdDUtility.slideOnDelete(sheet, htmlToDelete);
|
||||
actor.deleteEmbeddedDocuments('Item', [itemId], { renderSheet: false });
|
||||
}
|
||||
};
|
||||
if (item.isConteneurNonVide()) {
|
||||
@ -921,8 +924,7 @@ export class RdDUtility {
|
||||
label: "Supprimer conteneur et contenu",
|
||||
callback: () => {
|
||||
console.log("Delete : ", itemId);
|
||||
sheet.actor.deleteAllConteneur(itemId, { renderSheet: false });
|
||||
RdDUtility.slideOnDelete(sheet, htmlToDelete);
|
||||
actor.deleteAllConteneur(itemId, { renderSheet: false });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -335,9 +335,7 @@ export class RdDTimestamp {
|
||||
}
|
||||
|
||||
debutJournee() {
|
||||
return RdDTimestamp.timestamp(this.timestamp.annee,
|
||||
this.timestamp.mois,
|
||||
this.timestamp.jour)
|
||||
return RdDTimestamp.timestamp(this.annee, this.mois, this.jour)
|
||||
}
|
||||
|
||||
async appliquerDuree(duree, actor) {
|
||||
|
@ -67,7 +67,8 @@
|
||||
|
||||
/* =================== 3. some constants ============ */
|
||||
--color-controls:rgba(0, 0, 0, 0.9);
|
||||
--color-controls-hover:rgba(255, 255, 128, 0.7);
|
||||
--color-controls-light:hsla(0, 0%, 20%, 0.8);
|
||||
--color-controls-hover:hsla(60, 100%, 75%, 0.7);
|
||||
--color-control-border-hover:rgba(255, 128, 0, 0.8);
|
||||
--color-gold: rgba(191, 149, 63, 0.8);
|
||||
--gradient-gold: linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3));
|
||||
@ -391,9 +392,7 @@ table {border: 1px solid #7a7971;}
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.flex-group-center,
|
||||
.flex-group-left,
|
||||
.flex-group-right {
|
||||
.flex-group-center {
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
@ -405,8 +404,11 @@ table {border: 1px solid #7a7971;}
|
||||
}
|
||||
|
||||
.flex-group-left {
|
||||
-webkit-box-align: start;
|
||||
-webkit-box-pack: start;
|
||||
-ms-flex-align: start;
|
||||
-ms-flex-pack: start;
|
||||
align-items: start;
|
||||
justify-content: flex-start;
|
||||
text-align: left;
|
||||
}
|
||||
@ -417,8 +419,11 @@ table {border: 1px solid #7a7971;}
|
||||
}
|
||||
|
||||
.flex-group-right {
|
||||
-webkit-box-align: end;
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-align: end;
|
||||
-ms-flex-pack: end;
|
||||
align-items: end;
|
||||
justify-content: flex-end;
|
||||
text-align: right;
|
||||
}
|
||||
@ -440,9 +445,9 @@ table {border: 1px solid #7a7971;}
|
||||
}
|
||||
.flex-shrink {
|
||||
flex: 'flex-shrink' ;
|
||||
flex-shrink: 2;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
:is(.flex-grow, .flex-grow-3) {
|
||||
.flex-grow, .flex-grow-3 {
|
||||
flex-grow: 3;
|
||||
}
|
||||
.flex-grow-2 {
|
||||
@ -493,12 +498,13 @@ span.equipement-detail-buttons {
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
.item-actions-controls,
|
||||
.equipement-actions {
|
||||
margin: 0;
|
||||
flex-grow: 2;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: left;
|
||||
align-items: end;
|
||||
justify-content: flex-end;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.blessure-control {
|
||||
@ -813,16 +819,21 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.competence-list .item-controls {
|
||||
.competence-list .item-controls,
|
||||
.competence-list .item-actions-controls {
|
||||
display: contents !important;
|
||||
}
|
||||
.competence-list .item-actions-controls.hidden-controls,
|
||||
.competence-list .item-controls.hidden-controls {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.item-actions-controls a.actionItem i:is(.fas, .fa, .fa-solid, .fa-regular),
|
||||
.item-controls i:is(.fas, .fa, .fa-solid, .fa-regular) {
|
||||
font-size: 0.8em;
|
||||
color: var(--color-controls);
|
||||
color: var(--color-controls-light);
|
||||
}
|
||||
.item-actions-controls a.actionItem i:is(.fas, .fa, .fa-solid, .fa-regular):hover,
|
||||
.item-controls i:is(.fas, .far, .fa-solid, .fa-regular):hover {
|
||||
opacity: 0.6;
|
||||
}
|
||||
@ -1088,25 +1099,29 @@ li label.compteur {
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-xp {
|
||||
.window-app.sheet .window-content .carac-value,
|
||||
.window-app.sheet .window-content .competence-xp {
|
||||
flex-grow: 0;
|
||||
margin: 0.05rem;
|
||||
flex-basis: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-value {
|
||||
.window-app.sheet .window-content .carac-value,
|
||||
.window-app.sheet .window-content .competence-value {
|
||||
flex-grow: 0;
|
||||
margin: 0.05rem;
|
||||
flex-basis: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-archetype {
|
||||
.window-app.sheet .window-content .carac-value,
|
||||
.window-app.sheet .window-content .competence-archetype {
|
||||
flex-grow: 0;
|
||||
margin: 0.05rem;
|
||||
flex-basis: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
.window-app.sheet .window-content .carac-value, .window-app.sheet .window-content .competence-xp-sort {
|
||||
.window-app.sheet .window-content .carac-value,
|
||||
.window-app.sheet .window-content .competence-xp-sort {
|
||||
flex-grow: 0;
|
||||
margin: 0.05rem;
|
||||
flex-basis: 2rem;
|
||||
@ -1196,6 +1211,9 @@ ul.chat-list li:nth-child(odd) {
|
||||
.item-controls i.fas.allouer-stress.level-up {
|
||||
color: var(--color-gold);
|
||||
}
|
||||
.item-action-controls i.fa-solid.allouer-stress.level-up {
|
||||
color: var(--color-gold);
|
||||
}
|
||||
.blessures-list ul {
|
||||
display: flex;
|
||||
}
|
||||
@ -1312,21 +1330,11 @@ div.competence-column div.categorie-competence{
|
||||
font-weight: bold;
|
||||
flex-grow: 0;
|
||||
}
|
||||
.arme-label,
|
||||
.generic-label,
|
||||
.competence-label,
|
||||
.astrologie-label,
|
||||
.tache-label,
|
||||
.generic-label,
|
||||
.subacteur-label,
|
||||
.chant-label,
|
||||
.musique-label,
|
||||
.oeuvre-label,
|
||||
.chant-label,
|
||||
.danse-label,
|
||||
.recette-label,
|
||||
.jeu-label,
|
||||
.recettecuisine-label,
|
||||
.description-label {
|
||||
.list-item-label,
|
||||
.list-title-label {
|
||||
flex-grow: 2;
|
||||
}
|
||||
.attribut-value,
|
||||
|
@ -53,7 +53,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="flex-group-left flexcol competence-column">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/comp-creature.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/comp-creature.hbs"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
|
||||
{{!-- Equipment Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire.html"}}
|
||||
</div>
|
||||
|
||||
|
@ -40,8 +40,8 @@
|
||||
</div>
|
||||
<div class="flex-group-left flexcol">
|
||||
<div class="flex-group-left flexcol competence-column">
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/comp-creature.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/comp-possession.html"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/comp-creature.hbs"}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/comp-possession.hbs"}}
|
||||
</div>
|
||||
<div>
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/resonances.hbs"}}
|
||||
|
@ -111,19 +111,19 @@
|
||||
<div class="tab combat" data-group="primary" data-tab="combat">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/combat.html"}}<hr>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/blessures.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/maladies-poisons.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/possessions.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/maladies-poisons.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/possessions.hbs"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if options.isObserver}}{{!-- Connaissances Tab --}}
|
||||
<div class="tab connaissances" data-group="primary" data-tab="connaissances">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/astrologie.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/taches.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/chirurgie.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvres.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/taches.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/chirurgie.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvres.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/jeus.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/alchimie.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/alchimie.hbs"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if options.isObserver}}{{!-- hautreve Tab --}}
|
||||
@ -143,7 +143,7 @@
|
||||
|
||||
{{!-- Equipment Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/liens-animaux.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/liens-vehicules.hbs"}}
|
||||
|
@ -91,7 +91,7 @@
|
||||
|
||||
{{!-- Equipment Tab --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire.html"}}
|
||||
</div>
|
||||
|
||||
|
11
templates/actor/alchimie.hbs
Normal file
11
templates/actor/alchimie.hbs
Normal file
@ -0,0 +1,11 @@
|
||||
{{#if recettealchimiques.length}}
|
||||
<h3>Recettes Alchimiques</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each (trier recettealchimiques) as |recette id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{recette._id}}">
|
||||
<span class="list-item-label"><a class="item-edit">{{recette.name}}</a></span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=recette options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
@ -1,15 +0,0 @@
|
||||
{{#if recettealchimiques.length}}
|
||||
<h3>Recettes Alchimiques</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each (trier recettealchimiques) 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>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
@ -3,7 +3,7 @@
|
||||
<li class="caracteristique item flexrow list-item" data-item-id="{{armure.id}}">
|
||||
<span class="flex-grow">
|
||||
<img class="sheet-competence-img subacteur-open" src="{{armure.img}}" data-tooltip="{{armure.name}}"/>
|
||||
<a class="item-equip" data-tooltip="Equiper">{{#if armure.system.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a>
|
||||
<a class="item-equip-armure" data-tooltip="Equiper">{{#if armure.system.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a>
|
||||
<a>{{armure.name}}</a>
|
||||
{{#if armure.system.malus}}
|
||||
<span class="derivee-value">({{armure.system.malus}})</span>
|
||||
|
@ -33,10 +33,5 @@
|
||||
{{#if system.origine}}<span>Par {{system.origine}}</span>{{/if}}
|
||||
{{#if system.localisation}}<span>{{system.localisation}}</span>{{/if}}
|
||||
</span>
|
||||
<span class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Editer"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=this options=@root.options}}
|
||||
</li>
|
||||
|
@ -10,14 +10,9 @@
|
||||
<li class="item flexrow list-item" data-item-id="{{tache._id}}"
|
||||
data-tooltip="Premiers soins: {{tache.name}} ({{tache.system.points_de_tache_courant}}/{{tache.system.points_de_tache}})">
|
||||
<img class="sheet-competence-img" src="{{tache.img}}"/>
|
||||
<span class="competence-title tache-label"><a>{{tache.name}}
|
||||
<span class="list-item-label"><a class="action-tache">{{tache.name}}
|
||||
({{tache.system.points_de_tache_courant}}/{{tache.system.points_de_tache}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=tache options=@root.options}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/each}}
|
@ -1,10 +1,10 @@
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title competence-label">Armes et Défenses</span>
|
||||
<span class="competence-title competence-value">Niveau</span>
|
||||
<span class="competence-title competence-value">+dom</span>
|
||||
<span class="competence-title competence-value"></span>
|
||||
<span class="competence-title initiative-value">Initiative</span>
|
||||
<span class="generic-label">Armes et Défenses</span>
|
||||
<span class="competence-value">Niveau</span>
|
||||
<span class="competence-value">+dom</span>
|
||||
<span class="competence-value"></span>
|
||||
<span class="initiative-value">Initiative</span>
|
||||
</li>
|
||||
{{#each combat as |arme key|}}
|
||||
<li class="item flexrow list-item"
|
||||
@ -12,7 +12,7 @@
|
||||
data-arme-name="{{arme.name}}"
|
||||
data-competence-name="{{arme.system.competence}}"
|
||||
data-tooltip="{{arme.name}}: niveau {{plusMoins arme.system.niveau}}">
|
||||
<span class="arme-label">
|
||||
<span class="list-item-label">
|
||||
<a class="roll-arme">
|
||||
{{#if arme.img}}
|
||||
<img class="sheet-competence-img" src="{{arme.img}}" data-tooltip="{{arme.name}}"/>
|
||||
@ -31,7 +31,7 @@
|
||||
{{#each esquives as |esq key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{esq._id}}"
|
||||
data-tooltip="{{esq.name}}: niveau {{plusMoins esq.system.niveau}}">
|
||||
<span class="competence-label">
|
||||
<span class="list-item-label">
|
||||
<a class="roll-competence" name="{{esq.name}}">
|
||||
<img class="sheet-competence-img" src="{{esq.img}}" />
|
||||
<span>{{esq.name}}</span>
|
||||
@ -47,26 +47,20 @@
|
||||
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title competence-label">Empoignades</span>
|
||||
<span class="competence-title competence-value">Points d'Emp</span>
|
||||
<span class="flex-grow-3">Empoignades</span>
|
||||
<span class="flex-group-right">Points d'Emp</span>
|
||||
<span class="item-controls"></span>
|
||||
</li>
|
||||
{{#each empoignades as |emp key|}}
|
||||
<li class="item flexrow list-item"
|
||||
data-item-id="{{emp._id}}" data-arme-name="{{emp.name}}"
|
||||
data-tooltip="{{emp.name}}: niveau {{plusMoins emp.system.niveau}}">
|
||||
<span class="empoignade-label">
|
||||
<a>
|
||||
{{#if emp.img}}
|
||||
<img class="sheet-competence-img" src="{{emp.img}}"/>
|
||||
{{/if}}
|
||||
<span>{{emp.name}}</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="competence-value">{{emp.system.pointsemp}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
data-tooltip="{{emp.name}}: niveau {{plusMoins emp.system.pointsemp}}">
|
||||
<a class="flex-grow-3 action-empoignade">
|
||||
<img class="sheet-competence-img" src="{{emp.img}}"/>
|
||||
<span>{{emp.name}}</span>
|
||||
</a>
|
||||
<span class="flex-grow-0-5 flex-group-right">{{emp.system.pointsemp}}</span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=emp options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -39,46 +39,13 @@
|
||||
{{editor description target="system.description" button=true owner=options.isOwner editable=options.isOwner engine="prosemirror"}}
|
||||
</div>
|
||||
<hr>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/commerce-inventaire.hbs"}}
|
||||
{{#unless system.illimite}}
|
||||
{{#if @root.options.isObserver}}
|
||||
<hr>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/inventaire-monnaie.hbs"}}
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{!--
|
||||
<br>
|
||||
<div class="flexcol">
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="item flexrow list-item">
|
||||
<label class="flex-grow">Service</label>
|
||||
<label>Moral</label>
|
||||
<label>Qualité</label>
|
||||
<label>Prix (sols)</label>
|
||||
<label>
|
||||
{{#unless disabled}}
|
||||
<a class="service-add"><i class="fas fa-plus-circle"></i></a>
|
||||
{{/unless}}
|
||||
</label>
|
||||
</li>
|
||||
{{#each (trier system.services) as |service key|}}
|
||||
<li class="item flexrow list-item" data-key="{{key}}">
|
||||
<input {{@root.disabled}} type="text" name="services[{{key}}].name" value="{{service.name}}" data-dtype="String" />
|
||||
<input {{@root.disabled}} type="checkbox" name="services[{{key}}].system.moral" {{#if service.system.moral}}checked{{/if}} />
|
||||
<input {{@root.disabled}} type="number" name="services[{{key}}].system.qualite" value="{{service.system.qualite}}" data-dtype="Number" min="-10" max="10"/>
|
||||
<input {{@root.disabled}} type="number" class="input-prix" name="services[{{key}}].system.cout" value="{{numberFormat service.system.cout decimals=2 sign=false}}" data-dtype="Number" min="0" />
|
||||
<div class="item-controls">
|
||||
<a class="service-acheter" data-tooltip="Acheter"><i class="fa-sharp fa-solid fa-coins"></i></a>
|
||||
{{#unless @root.disabled}}
|
||||
<a class="service-vendre" data-tooltip="Proposer"><i class="fas fa-comments-dollar"></i></a>
|
||||
<a class="service-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
--}}
|
||||
<br>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/editor-notes-mj.html"}}
|
||||
<br>
|
||||
|
@ -39,23 +39,7 @@
|
||||
{{/if}} />
|
||||
{{/unless}}
|
||||
</span>
|
||||
<span class="equipement-actions item-controls">
|
||||
{{#if options.isOwner}}
|
||||
<a class="item-edit" data-tooltip="Editer"><i class="fas fa-edit"></i></a>
|
||||
{{#unless (and (eq item.type 'conteneur') (not vide))}}
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
{{#if (or item.parent.system.illimite (ne item.system.quantite 0))}}
|
||||
<a class="item-vendre" data-tooltip="Vendre"><i class="fas fa-comments-dollar"></i></a>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{#unless (and (eq item.type 'conteneur') (not vide))}}
|
||||
{{#if (or item.parent.system.illimite (gt item.system.quantite 0))}}
|
||||
<a class="item-acheter" data-tooltip="Acheter"><i class="fa-regular fa-coins"></i></a>
|
||||
{{/if}}
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
{{/unless}}
|
||||
</span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=item options=@root.options}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/unless}}
|
@ -4,7 +4,7 @@
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each (trier competences) as |comp key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{comp._id}}">
|
||||
<a class="competence-label roll-competence">
|
||||
<a class="list-item-label roll-competence">
|
||||
<img class="sheet-competence-img" src="{{comp.img}}" data-tooltip="{{comp.name}}"/>
|
||||
<span>{{comp.name}}</span>
|
||||
</a>
|
||||
@ -23,12 +23,7 @@
|
||||
{{#unless @root.options.vueDetaillee}}disabled{{/unless}}
|
||||
{{else}}disabled{{/if}}
|
||||
/>
|
||||
{{#if @root.options.vueDetaillee}}
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=comp options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -4,11 +4,8 @@
|
||||
{{#each possessions as |possession key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
|
||||
<img class="sheet-competence-img" src="{{possession.img}}" data-tooltip="{{possession.name}}"/>
|
||||
<span class="competence-label">{{possession.name}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
<span class="list-item-label">{{possession.name}}</span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=possession options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
@ -14,17 +14,17 @@
|
||||
<span class="competence-xp-sort">sort</span>
|
||||
{{/if}}
|
||||
<div class="item-controls">
|
||||
<i class="far fa-arrow-alt-circle-up"></i>
|
||||
<i class="fa-regular fa-arrow-alt-circle-up"></i>
|
||||
<span class="competence-archetype">Arch.</span>
|
||||
<i class="far fa-edit"></i>
|
||||
<i class="fa-regular fa-edit"></i>
|
||||
{{#if @root.options.isGM}}
|
||||
<i class="far fa-trash"></i>
|
||||
<i class="fa-regular fa-trash"></i>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{#each competences as |comp key|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.html" comp}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/competence.hbs" comp}}
|
||||
{{/each}}
|
||||
<li></li>
|
||||
</ul>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{#unless system.isHidden}}
|
||||
<li class="item flexrow list-item {{#if system.isLevelUp}}xp-level-up{{/if}}" data-item-id="{{_id}}">
|
||||
<span class="tooltip">
|
||||
<a class="competence-label roll-competence" name="{{name}}" data-tooltip="Niveau {{plusMoins system.niveau}} en {{name}}">
|
||||
<a class="list-item-label roll-competence" name="{{name}}" data-tooltip="Niveau {{plusMoins system.niveau}} en {{name}}">
|
||||
<img class="sheet-competence-img" src="{{img}}"/>
|
||||
<span>{{name}}</span>
|
||||
</a>
|
||||
@ -46,13 +46,8 @@
|
||||
<input class="competence-archetype niveau-archetype" type="text" compname="{{name}}" name="comp-archetype-{{name}}"
|
||||
value="{{plusMoins system.niveau_archetype}}" data-dtype="number" data-tooltip="Niveau d'archétype {{plusMoins system.niveau_archetype}}"
|
||||
{{#if (not @root.options.vueArchetype)}}disabled{{/if}} />
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
{{#if @root.options.isGM}}
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
{{/if}}
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=this options=@root.options}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/unless}}
|
@ -7,11 +7,5 @@
|
||||
{{/if}}
|
||||
<a>{{queue.name}}</a>
|
||||
</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
{{#if queue.system.refoulement}}
|
||||
<a class="item-action">Refouler</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=queue options=@root.options}}
|
||||
</li>
|
@ -6,10 +6,10 @@
|
||||
</h3>
|
||||
<ul class="item-list">
|
||||
{{#each queues as |queue key|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.html" queue=queue key=key}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.hbs" queue=queue key=key}}
|
||||
{{/each}}
|
||||
{{#each ombres as |ombre key|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.html" queue=ombre key=key}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queue.hbs" queue=ombre key=key}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
@ -5,10 +5,7 @@
|
||||
<li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}" data-tooltip="Souffle: {{souffle.name}}">
|
||||
<img class="sheet-competence-img" src="{{souffle.img}}"/>
|
||||
<span class="item-edit flex-grow"><a>{{souffle.name}}</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=souffle options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -5,10 +5,7 @@
|
||||
<li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}" data-tooltip="Tête: {{tete.name}}">
|
||||
<img class="sheet-competence-img" src="{{tete.img}}"/>
|
||||
<span class="item-edit flex-grow"><a>{{tete.name}}</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=tete options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -10,7 +10,7 @@
|
||||
</li>
|
||||
{{/if}}
|
||||
<li class="item flexrow">
|
||||
<span class="competence-label flex-shrink">Demi rêve :
|
||||
<span class="generio-label">Demi rêve :
|
||||
{{#if options.isGM}}
|
||||
{{caseTmr-label system.reve.tmrpos.coord}}
|
||||
</span><span>
|
||||
@ -28,9 +28,9 @@
|
||||
</li>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/non-haut-revant.hbs"}}
|
||||
<hr>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-signes-draconiques.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-rencontres.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts-reserve.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-meditations.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-signes-draconiques.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-rencontres.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-sorts-reserve.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-meditations.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/hr-casetmrs.hbs"}}
|
||||
|
@ -6,11 +6,7 @@
|
||||
<img class="sheet-competence-img" src="{{casetmr.img}}"/>
|
||||
<span class="item-edit"><a>{{casetmr.name}}</a></span>
|
||||
<span>{{casetmr.system.coord}} - {{caseTmr-label casetmr.system.coord}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=casetmr options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
@ -5,12 +5,7 @@
|
||||
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}" data-tooltip="Méditation: {{meditation.name}}">
|
||||
<img class="sheet-competence-img" src="{{meditation.img}}"/>
|
||||
<span class="meditation-label flex-grow"><a data-item-id="{{meditation._id}}">{{meditation.name}} - {{meditation.system.competence}}</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Editer"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=meditation options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -10,9 +10,7 @@
|
||||
{{#if rencontre.system.date}}
|
||||
<span class="flex-shrink">{{upperFirst rencontre.system.heure}}, le {{rencontre.system.date}}</span>
|
||||
{{/if}}
|
||||
<div class="item-controls">
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=rencontre options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -6,9 +6,7 @@
|
||||
<img class="sheet-competence-img" src="{{signe.img}}"/>
|
||||
<span class="item-edit flex-grow"><a>{{signe.name}}</a></span>
|
||||
<span class="flex-shrink">{{signe.system.difficulte}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=signe options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -1,8 +1,5 @@
|
||||
{{#if sortreserves.length}}
|
||||
<h3>Sorts en Réserve{{#if options.isGM}} <a class="sortreserve-add">
|
||||
<i class="fa-solid fa-sparkles"></i>
|
||||
</a>{{/if}}
|
||||
</h3>
|
||||
<h3>Sorts en Réserve</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each (trier sortreserves) as |sort key|}}
|
||||
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}"
|
||||
@ -10,9 +7,7 @@
|
||||
<img class="sheet-competence-img" src="{{sort.img}}"/>
|
||||
<span class="item-edit"><a>{{#if sort.system.echectotal}}Echec total: {{/if}}{{sort.name}} r{{sort.system.ptreve}}</a></span>
|
||||
<span>{{sort.system.coord}} - {{caseTmr-label sort.system.coord}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-delete flex-shrink" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=sort options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -15,16 +15,7 @@
|
||||
{{#if sort.system.caseTMRspeciale}}{{sort.system.caseTMRspeciale}}{{else}}{{upperFirst sort.system.caseTMR}}{{/if}}
|
||||
</span>
|
||||
<span class="flex-grow-1">R{{itemSort-spaceIfText sort.system.difficulte}} r{{itemSort-spaceIfText sort.system.ptreve}}</span>
|
||||
<div class="item-controls flex-shrink">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
{{#if (and @root.options.isGM (not sort.system.isrituel))}}
|
||||
<a class="sortreserve-add" data-tooltip="Ajouter ce sort en réserve">
|
||||
<i class="fa-solid fa-sparkles"></i>
|
||||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=sort options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -31,27 +31,6 @@
|
||||
</span>
|
||||
<span class="equipement-detail">{{numberFormat item.system.encTotal decimals=2}}</span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=item options=options}}
|
||||
{{!-- <span class="equipement-actions item-controls">
|
||||
{{#if options.isOwner}}
|
||||
{{#unless item.estContenu}}
|
||||
{{#if item.equipable}}
|
||||
<a class="item-equip" data-tooltip="Equiper">{{#if item.system.equipe}}<i class="fas fa-hand-rock"></i>{{else}}<i class="far fa-hand-paper"></i>{{/if}}</a>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
<a class="item-edit" data-tooltip="Editer"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
{{#if (ne item.system.quantite 0)}}
|
||||
<a class="item-vendre" data-tooltip="Vendre ou donner"><i class="fas fa-comments-dollar"></i></a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
{{#if options.isOwner}}
|
||||
{{#if item.system.actionPrincipale}}
|
||||
<a class="item-action">{{item.system.actionPrincipale}}</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</span> --}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
|
@ -21,12 +21,9 @@
|
||||
<a class="item-quantite-plus"><i class="fa-solid fa-square-plus"></i></a>
|
||||
</span>
|
||||
{{/if}}
|
||||
<span class="equipement-actions item-controls">
|
||||
{{#if @root.options.isOwner}}
|
||||
<a class="item-edit" data-tooltip="Editer"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{#if @root.options.isOwner}}
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=signe options=@root.options}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
16
templates/actor/item-action-controls.hbs
Normal file
16
templates/actor/item-action-controls.hbs
Normal file
@ -0,0 +1,16 @@
|
||||
<span class="item-actions-controls item-controls">
|
||||
{{#each item.actions as |action|}}
|
||||
{{#if action.placeholder}}
|
||||
|
||||
{{/if}}
|
||||
{{#if (item-action-applies action ../item ../options)}}
|
||||
<a class="actionItem" data-tooltip="{{action.label}}" data-code="{{action.code}}">
|
||||
{{#if (item-action-icon action ../item)}}
|
||||
<i class="{{item-action-icon action ../item}}"></i>
|
||||
{{else}}
|
||||
{{action.label}}
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</span>
|
@ -3,13 +3,8 @@
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each jeus 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.system.base}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
<div class="action-jeu list-item-label"><a>{{jeu.name}} (base {{jeu.system.base}})</a></div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=jeu options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
@ -3,20 +3,20 @@
|
||||
{{#each subacteurs.suivants as |suivant id|}}
|
||||
<li class="item flexrow list-item" data-subactor-id="{{suivant.id}}" data-tooltip="{{suivant.name}}">
|
||||
<img class="sheet-competence-img subacteur-open" src="{{suivant.img}}"/>
|
||||
<span class="competence-title subacteur-label subacteur-open">
|
||||
<span class="subacteur-label subacteur-open">
|
||||
<a>{{suivant.name}}</a>
|
||||
</span>
|
||||
{{#if suivant.ephemere}}
|
||||
<span></span>
|
||||
<span></span>
|
||||
{{else}}
|
||||
<span class="competence-title subacteur-coeur-toggle">
|
||||
<span class="subacteur-coeur-toggle">
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/coeur/afficher-coeur.hbs' numero=1 courant=suivant.coeur prochain=suivant.prochainCoeur}}
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/coeur/afficher-coeur.hbs' numero=2 courant=suivant.coeur prochain=suivant.prochainCoeur}}
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/coeur/afficher-coeur.hbs' numero=3 courant=suivant.coeur prochain=suivant.prochainCoeur}}
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/coeur/afficher-coeur.hbs' numero=4 courant=suivant.coeur prochain=suivant.prochainCoeur}}
|
||||
</span>
|
||||
<span class="competence-title subacteur-label">
|
||||
<span class="subacteur-label">
|
||||
{{#if (gte suivant.coeur 1)}}
|
||||
<a class="subacteur-tendre-moment chat-card-button" data-tooltip="Proposer à {{suivant.name}} de passer un tendre moment">Tendre moment</a>
|
||||
{{/if}}
|
||||
|
@ -2,32 +2,29 @@
|
||||
<h3 class="item-label">Maladies & Poisons:</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title flex-grow competence-label">Nom</span>
|
||||
<span class="competence-title competence-label">Type</span>
|
||||
<span class="competence-title competence-value">Remèdes</span>
|
||||
<span class="competence-title flex-grow competence-value">Edition</span>
|
||||
<span class="list-title-label">Nom</span>
|
||||
<span class="list-title-label">Type</span>
|
||||
<span class="competence-value">Remèdes</span>
|
||||
<span class="flex-grow competence-value">Edition</span>
|
||||
</li>
|
||||
{{#each maladiesPoisons as |maladie key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{maladie._id}}">
|
||||
<span class="competence-label">
|
||||
<span class="list-item-label">
|
||||
{{#if (or @root.options.isGM maladie.system.identifie)}}
|
||||
{{maladie.name}}
|
||||
{{else}}
|
||||
Inconnue
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="competence-label">{{maladie.type}}</span>
|
||||
<span class="competence-label">
|
||||
<span class="list-item-label">{{maladie.type}}</span>
|
||||
<span class="list-item-label">
|
||||
{{#if (or @root.options.isGM maladie.system.remedesconnus)}}
|
||||
{{maladie.system.remedes}}
|
||||
{{else}}
|
||||
Remèdes Inconnus
|
||||
{{/if}}
|
||||
</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=maladie options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
@ -8,7 +8,7 @@
|
||||
pour rendre le personnage Haut-Rêvant.</p>
|
||||
{{/if}}
|
||||
<li class="item flexrow">
|
||||
<span class="competence-label">Seuil de Rêve :</span>
|
||||
<span class="generic-label">Seuil de Rêve :</span>
|
||||
<span>
|
||||
{{#if options.isGM}}
|
||||
<input class="competence-value seuil-reve-value" type="text" name="system.reve.seuil.value" value="{{system.reve.seuil.value}}" data-dtype="Number"/>
|
||||
@ -18,7 +18,7 @@
|
||||
</span>
|
||||
</li>
|
||||
<li class="item flexrow" >
|
||||
<span class="competence-label">Refoulement : </span>
|
||||
<span class="generic-label">Refoulement : </span>
|
||||
<span>
|
||||
{{#if options.isGM}}
|
||||
<input class="competence-value" type="text" name="system.reve.refoulement.value" value="{{system.reve.refoulement.value}}" data-dtype="Number"/>
|
||||
@ -29,7 +29,7 @@
|
||||
</li>
|
||||
{{#if system.reve.reve.thanatosused}}
|
||||
<li class="item flexrow" >
|
||||
<span class="competence-label">La prochaine queue est une Ombre</span>
|
||||
<span class="generic-label">La prochaine queue est une Ombre</span>
|
||||
<span>
|
||||
<img class="sheet-competence-img" src="systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp"/>
|
||||
</span>
|
||||
@ -37,5 +37,5 @@
|
||||
{{/if}}
|
||||
<hr>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-queues.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-tetes.html"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-souffles.hbs"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/dragon-tetes.hbs"}}
|
||||
|
9
templates/actor/oeuvre.hbs
Normal file
9
templates/actor/oeuvre.hbs
Normal file
@ -0,0 +1,9 @@
|
||||
<li class="item flexrow list-item" data-item-id="{{oeuvre._id}}">
|
||||
<img class="sheet-competence-img" src="{{oeuvre.img}}" data-tooltip="{{upperFirst typeOeuvre}}: {{oeuvre.name}}"/>
|
||||
<span>{{upperFirst typeOeuvre}}</span>
|
||||
<span class="{{classOeuvre}}">
|
||||
<a>{{oeuvre.name}} (niveau {{oeuvre.system.niveau}})</a>
|
||||
</span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=oeuvre options=@root.options}}
|
||||
</li>
|
||||
|
@ -1,14 +0,0 @@
|
||||
<li class="item flexrow list-item" data-item-id="{{oeuvre._id}}">
|
||||
<img class="sheet-competence-img" src="{{oeuvre.img}}" data-tooltip="{{upperFirst typeOeuvre}}: {{oeuvre.name}}"/>
|
||||
<span>{{upperFirst typeOeuvre}}</span>
|
||||
<span class="competence-title {{classOeuvre}}">
|
||||
<a>{{oeuvre.name}} (niveau {{oeuvre.system.niveau}})</a>
|
||||
</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -1,18 +1,18 @@
|
||||
<h3>Oeuvres diverses</h3><a class="chat-card-button creer-une-oeuvre">Créer une oeuvre</a>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each (trier chants) as |chant id|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=chant typeOeuvre="Chant" classOeuvre="chant-label"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.hbs" oeuvre=chant typeOeuvre="Chant" classOeuvre="action-chant list-item-label"}}
|
||||
{{/each}}
|
||||
{{#each (trier musiques) as |musique id|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=musique typeOeuvre="Musique" classOeuvre="musique-label"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.hbs" oeuvre=musique typeOeuvre="Musique" classOeuvre="action-musique list-item-label"}}
|
||||
{{/each}}
|
||||
{{#each (trier danses) as |danse id|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=danse typeOeuvre="Danse" classOeuvre="danse-label"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.hbs" oeuvre=danse typeOeuvre="Danse" classOeuvre="action-danse list-item-label"}}
|
||||
{{/each}}
|
||||
{{#each (trier oeuvres) as |oeuvre id|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=oeuvre typeOeuvre=oeuvre.system.competence classOeuvre="oeuvre-label"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.hbs" oeuvre=oeuvre typeOeuvre=oeuvre.system.competence classOeuvre="action-oeuvre list-item-label"}}
|
||||
{{/each}}
|
||||
{{#each (trier recettecuisines) as |recette id|}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.html" oeuvre=recette typeOeuvre="Recette de cuisine" classOeuvre="recettecuisine-label"}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor/oeuvre.hbs" oeuvre=recette typeOeuvre="Recette de cuisine" classOeuvre="action-recettecuisine list-item-label"}}
|
||||
{{/each}}
|
||||
</ul>
|
19
templates/actor/possessions.hbs
Normal file
19
templates/actor/possessions.hbs
Normal file
@ -0,0 +1,19 @@
|
||||
{{#if possessions.length}}
|
||||
{{!-- Possession --}}
|
||||
<h3 class="item-label">Possession:</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="list-title-label">Nom</span>
|
||||
<span class="list-title-label">Type</span>
|
||||
</li>
|
||||
{{#each possessions as |possession key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
|
||||
<span class="list-item-label">
|
||||
<a class="sheet-possession-attack">{{possession.name}} (Conjurer)</a>
|
||||
</span>
|
||||
<span class="list-item-label">{{possession.system.type}}</span>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=possession options=@root.options}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
@ -1,24 +0,0 @@
|
||||
{{#if possessions.length}}
|
||||
{{!-- Possession --}}
|
||||
<h3 class="item-label">Possession:</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
<li class="competence-header flexrow">
|
||||
<span class="competence-title flex-grow competence-label">Nom</span>
|
||||
<span class="competence-title competence-label">Type</span>
|
||||
</li>
|
||||
{{#each possessions as |possession key|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{possession._id}}">
|
||||
<span class="competence-label">
|
||||
<a class="sheet-possession-attack">{{possession.name}} (Conjurer)</a>
|
||||
</span>
|
||||
<span class="competence-label">{{possession.system.type}}</span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
@ -6,6 +6,8 @@
|
||||
<li class="item flexrow list-item" data-actor-id="{{actor.id}}">
|
||||
<img class="sheet-competence-img subacteur-open" src="{{actor.img}}" data-tooltip="{{actor.name}}"/>
|
||||
<span class="subacteur-label subacteur-open"><a>{{actor.name}}</a></span>
|
||||
|
||||
{{!-- {{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=oeuvre options=@root.options}} --}}
|
||||
<div class="flex-shrink">
|
||||
<a class="resonance-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
|
@ -4,16 +4,11 @@
|
||||
{{#unless (eq tache.system.competence 'Chirurgie')}}
|
||||
<li class="item flexrow list-item" data-item-id="{{tache._id}}" data-tooltip="Tâche: {{tache.name}}" >
|
||||
<img class="sheet-competence-img" src="{{tache.img}}"/>
|
||||
<span class="competence-title tache-label"><a>{{tache.name}}
|
||||
<span class="list-item-label"><a class="action-tache">{{tache.name}}
|
||||
({{tache.system.points_de_tache_courant}}{{#if
|
||||
(or @root.options.isGM (not tache.system.cacher_points_de_tache))
|
||||
}}/{{tache.system.points_de_tache}}{{/if}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-edit" data-tooltip="Modifier"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-delete" data-tooltip="Supprimer"><i class="fas fa-trash"></i></a>
|
||||
|
||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></i></a>
|
||||
</div>
|
||||
{{>'systems/foundryvtt-reve-de-dragon/templates/actor/item-action-controls.hbs' item=tache options=@root.options}}
|
||||
</li>
|
||||
{{/unless}}
|
||||
{{/each}}
|
@ -5,10 +5,10 @@
|
||||
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
|
||||
<span>
|
||||
{{#if options.isOwned}}
|
||||
<a class="consommer-potion chat-card-button" data-actor-id="{{actorId}}" data-tooltip="Consommer cette potion et appliquer ses effets">Consommer</a>
|
||||
<a class="item-potion-consommer chat-card-button" data-actor-id="{{actorId}}" data-tooltip="Consommer cette potion et appliquer ses effets">Consommer</a>
|
||||
{{/if}}
|
||||
{{#if enchantable}}
|
||||
<a class="enchanter-potion chat-card-button" data-actor-id="{{actorId}}" data-tooltip="Enchanter cette potion">Enchanter</a>
|
||||
<a class="item-enchanter chat-card-button" data-actor-id="{{actorId}}" data-tooltip="Enchanter cette potion">Enchanter</a>
|
||||
{{/if}}
|
||||
</span>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user