Compare commits
9 Commits
foundryvtt
...
d4fddf8600
| Author | SHA1 | Date | |
|---|---|---|---|
| d4fddf8600 | |||
|
|
4b1862fa48 | ||
|
|
82115ed8d7 | ||
| 3359492f13 | |||
| 676e6739a6 | |||
|
|
872d3fff31 | ||
| 9c71827baa | |||
| fc9ef06e7b | |||
|
|
9e63706de6 |
@@ -37,8 +37,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async getData() {
|
async getData() {
|
||||||
const objectData = Misc.data(this.object);
|
const objectData = Misc.data(this.object);
|
||||||
|
this.timerRecherche = undefined;
|
||||||
//this.actor.checkMonnaiePresence(this.actor.data.items); // Always check
|
|
||||||
|
|
||||||
let formData = {
|
let formData = {
|
||||||
title: this.title,
|
title: this.title,
|
||||||
@@ -78,8 +77,8 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
};
|
};
|
||||||
|
|
||||||
formData.competences.forEach(item => {
|
formData.competences.forEach(item => {
|
||||||
item.visible = this.options.cherchercompetence
|
item.visible = this.options.recherche
|
||||||
? RdDItemCompetence.nomContientTexte(item, this.options.cherchercompetence)
|
? RdDItemCompetence.nomContientTexte(item, this.options.recherche.text)
|
||||||
: (!this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(item));
|
: (!this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(item));
|
||||||
RdDItemCompetence.levelUp(item, formData.data.compteurs.experience.value);
|
RdDItemCompetence.levelUp(item, formData.data.compteurs.experience.value);
|
||||||
});
|
});
|
||||||
@@ -424,12 +423,28 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
this.options.editCaracComp = !this.options.editCaracComp;
|
this.options.editCaracComp = !this.options.editCaracComp;
|
||||||
this.render(true);
|
this.render(true);
|
||||||
});
|
});
|
||||||
html.find('.cherchercompetence').change(async event => {
|
|
||||||
this.options.cherchercompetence = event.currentTarget.value;
|
html.find('.recherche')
|
||||||
this.render(true);
|
.each((index, field) => {
|
||||||
});
|
if (this.options.recherche) {
|
||||||
|
field.focus();
|
||||||
|
field.setSelectionRange(this.options.recherche.start, this.options.recherche.end);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.keyup(async event => {
|
||||||
|
this.options.recherche = this._optionRecherche(event.currentTarget)
|
||||||
|
if (this.timerRecherche) {
|
||||||
|
clearTimeout(this.timerRecherche);
|
||||||
|
}
|
||||||
|
this.timerRecherche = setTimeout(() => {
|
||||||
|
this.timerRecherche = undefined;
|
||||||
|
this.render(true);
|
||||||
|
}, 500);
|
||||||
|
})
|
||||||
|
.change(async event =>
|
||||||
|
this.options.recherche = this._optionRecherche(event.currentTarget)
|
||||||
|
);
|
||||||
html.find('.vue-detaillee').click(async event => {
|
html.find('.vue-detaillee').click(async event => {
|
||||||
console.log("CONTROLS", this.options.vueDetaillee)
|
|
||||||
this.options.vueDetaillee = !this.options.vueDetaillee;
|
this.options.vueDetaillee = !this.options.vueDetaillee;
|
||||||
this.render(true);
|
this.render(true);
|
||||||
});
|
});
|
||||||
@@ -515,6 +530,17 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_optionRecherche(target) {
|
||||||
|
if (!target.value?.length){
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
text: target.value,
|
||||||
|
start: target.selectionStart,
|
||||||
|
end: target.selectionEnd,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
_getEventArmeCombat(event) {
|
_getEventArmeCombat(event) {
|
||||||
const li = $(event.currentTarget)?.parents(".item");
|
const li = $(event.currentTarget)?.parents(".item");
|
||||||
let armeName = li.data("arme-name");
|
let armeName = li.data("arme-name");
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ import { RollDataAjustements } from "./rolldata-ajustements.js";
|
|||||||
import { DialogItemAchat } from "./dialog-item-achat.js";
|
import { DialogItemAchat } from "./dialog-item-achat.js";
|
||||||
import { RdDItem } from "./item.js";
|
import { RdDItem } from "./item.js";
|
||||||
import { RdDPossession } from "./rdd-possession.js";
|
import { RdDPossession } from "./rdd-possession.js";
|
||||||
import { SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
/**
|
/**
|
||||||
@@ -239,7 +240,7 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getForce() {
|
getForce() {
|
||||||
if (this.isEntiteCauchemar()) {
|
if (this.isEntite()) {
|
||||||
return Misc.toInt(Misc.templateData(this).carac.reve?.value);
|
return Misc.toInt(Misc.templateData(this).carac.reve?.value);
|
||||||
}
|
}
|
||||||
return Misc.toInt(Misc.templateData(this).carac.force?.value);
|
return Misc.toInt(Misc.templateData(this).carac.force?.value);
|
||||||
@@ -612,7 +613,10 @@ export class RdDActor extends Actor {
|
|||||||
content: "Remise à neuf de " + this.name
|
content: "Remise à neuf de " + this.name
|
||||||
};
|
};
|
||||||
const actorData = Misc.data(this);
|
const actorData = Misc.data(this);
|
||||||
if (this.isEntiteCauchemar()) {
|
if (this.isEntite([ENTITE_NONINCARNE])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.isEntite([ENTITE_INCARNE, ENTITE_BLURETTE])) {
|
||||||
await this.santeIncDec("endurance", actorData.data.sante.endurance.max - actorData.data.sante.endurance.value);
|
await this.santeIncDec("endurance", actorData.data.sante.endurance.max - actorData.data.sante.endurance.value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1622,7 +1626,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async setSonne(sonne = true) {
|
async setSonne(sonne = true) {
|
||||||
if (this.isEntiteCauchemar()) {
|
if (this.isEntite()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!game.combat && sonne) {
|
if (!game.combat && sonne) {
|
||||||
@@ -1634,7 +1638,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getSConst() {
|
getSConst() {
|
||||||
if (this.isEntiteCauchemar()) {
|
if (this.isEntite()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return RdDCarac.calculSConst(Misc.templateData(this).carac.constitution.value);
|
return RdDCarac.calculSConst(Misc.templateData(this).carac.constitution.value);
|
||||||
@@ -1751,7 +1755,7 @@ export class RdDActor extends Actor {
|
|||||||
result.newValue = Math.max(minValue, Math.min(compteur.value + inc, compteur.max));
|
result.newValue = Math.max(minValue, Math.min(compteur.value + inc, compteur.max));
|
||||||
//console.log("New value ", inc, minValue, result.newValue);
|
//console.log("New value ", inc, minValue, result.newValue);
|
||||||
let fatigue = 0;
|
let fatigue = 0;
|
||||||
if (name == "endurance" && !this.isEntiteCauchemar()) {
|
if (name == "endurance" && !this.isEntite()) {
|
||||||
if (result.newValue == 0 && inc < 0 && !isCritique) { // perte endurance et endurance devient 0 (sauf critique) -> -1 vie
|
if (result.newValue == 0 && inc < 0 && !isCritique) { // perte endurance et endurance devient 0 (sauf critique) -> -1 vie
|
||||||
sante.vie.value--;
|
sante.vie.value--;
|
||||||
result.perteVie = true;
|
result.perteVie = true;
|
||||||
@@ -1788,7 +1792,7 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isDead() {
|
isDead() {
|
||||||
return !this.isEntiteCauchemar() && Misc.templateData(this).sante.vie.value < -this.getSConst()
|
return !this.isEntite() && Misc.templateData(this).sante.vie.value < -this.getSConst()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
@@ -3347,7 +3351,7 @@ export class RdDActor extends Actor {
|
|||||||
let encaissement = await this.jetEncaissement(rollData);
|
let encaissement = await this.jetEncaissement(rollData);
|
||||||
|
|
||||||
this.ajouterBlessure(encaissement); // Will upate the result table
|
this.ajouterBlessure(encaissement); // Will upate the result table
|
||||||
const perteVie = this.isEntiteCauchemar()
|
const perteVie = this.isEntite()
|
||||||
? { newValue: 0 }
|
? { newValue: 0 }
|
||||||
: await this.santeIncDec("vie", - encaissement.vie);
|
: await this.santeIncDec("vie", - encaissement.vie);
|
||||||
const perteEndurance = await this.santeIncDec("endurance", -encaissement.endurance, encaissement.critiques > 0);
|
const perteEndurance = await this.santeIncDec("endurance", -encaissement.endurance, encaissement.critiques > 0);
|
||||||
@@ -3362,7 +3366,7 @@ export class RdDActor extends Actor {
|
|||||||
sonne: perteEndurance.sonne,
|
sonne: perteEndurance.sonne,
|
||||||
jetEndurance: perteEndurance.jetEndurance,
|
jetEndurance: perteEndurance.jetEndurance,
|
||||||
endurance: santeOrig.endurance.value - perteEndurance.newValue,
|
endurance: santeOrig.endurance.value - perteEndurance.newValue,
|
||||||
vie: this.isEntiteCauchemar() ? 0 : (santeOrig.vie.value - perteVie.newValue),
|
vie: this.isEntite() ? 0 : (santeOrig.vie.value - perteVie.newValue),
|
||||||
show: defenderRoll?.show ?? {}
|
show: defenderRoll?.show ?? {}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3552,8 +3556,8 @@ export class RdDActor extends Actor {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async accorder(entite, when = 'avant-encaissement') {
|
async accorder(entite, when = 'avant-encaissement') {
|
||||||
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
||||||
|| !entite.isEntiteCauchemar()
|
|| !entite.isEntite([ENTITE_INCARNE])
|
||||||
|| entite.isEntiteCauchemarAccordee(this)) {
|
|| entite.isEntiteAccordee(this)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const tplData = Misc.templateData(this);
|
const tplData = Misc.templateData(this);
|
||||||
@@ -3577,20 +3581,21 @@ export class RdDActor extends Actor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
isEntiteCauchemar() {
|
isEntite(typeentite = [] ) {
|
||||||
return this.data.type == 'entite';
|
return this.data.type == 'entite' && (typeentite.length == 0 || typeentite.includes(this.data.data.typeentite));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
isEntiteCauchemarAccordee(attaquant) {
|
isEntiteAccordee(attaquant) {
|
||||||
if (!this.isEntiteCauchemar()) { return true; }
|
if (!this.isEntite([ENTITE_INCARNE]))
|
||||||
|
{ return true; }
|
||||||
let resonnance = Misc.templateData(this).sante.resonnance;
|
let resonnance = Misc.templateData(this).sante.resonnance;
|
||||||
return (resonnance.actors.find(it => it == attaquant.id));
|
return (resonnance.actors.find(it => it == attaquant.id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async setEntiteReveAccordee(attaquant) {
|
async setEntiteReveAccordee(attaquant) {
|
||||||
if (!this.isEntiteCauchemar()) {
|
if (!this.isEntite([ENTITE_INCARNE])) {
|
||||||
ui.notifications.error("Impossible de s'accorder à " + this.name + ": ce n'est pas une entite de cauchemer/rêve");
|
ui.notifications.error("Impossible de s'accorder à " + this.name + ": ce n'est pas une entite de cauchemer/rêve");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4153,7 +4158,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async setStatusEffect(label, status, updates = {}) {
|
async setStatusEffect(label, status, updates = {}) {
|
||||||
if (this.isEntiteCauchemar() || this.data.type == 'vehicule') {
|
if (this.isEntite() || this.data.type == 'vehicule') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log("setStatusEffect", label, status, updates)
|
console.log("setStatusEffect", label, status, updates)
|
||||||
|
|||||||
@@ -3,3 +3,7 @@ export const SYSTEM_SOCKET_ID = 'system.foundryvtt-reve-de-dragon';
|
|||||||
|
|
||||||
export const HIDE_DICE = 'hide';
|
export const HIDE_DICE = 'hide';
|
||||||
export const SHOW_DICE = 'show';
|
export const SHOW_DICE = 'show';
|
||||||
|
|
||||||
|
export const ENTITE_INCARNE = 'incarne';
|
||||||
|
export const ENTITE_NONINCARNE = 'nonincarne';
|
||||||
|
export const ENTITE_BLURETTE = 'blurette';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ChatUtility } from "./chat-utility.js";
|
import { ChatUtility } from "./chat-utility.js";
|
||||||
import { HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
import { ENTITE_INCARNE, ENTITE_NONINCARNE, HIDE_DICE, SYSTEM_RDD, SYSTEM_SOCKET_ID } from "./constants.js";
|
||||||
import { Grammar } from "./grammar.js";
|
import { Grammar } from "./grammar.js";
|
||||||
import { RdDItemArme } from "./item-arme.js";
|
import { RdDItemArme } from "./item-arme.js";
|
||||||
import { RdDItemCompetence } from "./item-competence.js";
|
import { RdDItemCompetence } from "./item-competence.js";
|
||||||
@@ -457,7 +457,7 @@ export class RdDCombat {
|
|||||||
else {
|
else {
|
||||||
const defender = target?.actor;
|
const defender = target?.actor;
|
||||||
const defenderTokenId = target?.data._id;
|
const defenderTokenId = target?.data._id;
|
||||||
if ( defender.type == 'entite' && defender.data.data.definition.typeentite == 'nonincarne') {
|
if ( defender.type == 'entite' && defender.data.data.definition.typeentite == ENTITE_NONINCARNE) {
|
||||||
ui.notifications.warn("Vous ne pouvez pas cibler une entité non incarnée !!!!");
|
ui.notifications.warn("Vous ne pouvez pas cibler une entité non incarnée !!!!");
|
||||||
} else {
|
} else {
|
||||||
return this.create(attacker, defender, defenderTokenId, target)
|
return this.create(attacker, defender, defenderTokenId, target)
|
||||||
@@ -799,7 +799,7 @@ export class RdDCombat {
|
|||||||
async _onAttaqueNormale(attackerRoll) {
|
async _onAttaqueNormale(attackerRoll) {
|
||||||
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
console.log("RdDCombat.onAttaqueNormale >>>", attackerRoll);
|
||||||
|
|
||||||
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntiteCauchemar());
|
attackerRoll.dmg = RdDBonus.dmg(attackerRoll, this.attacker.getBonusDegat(), this.defender.isEntite());
|
||||||
let defenderRoll = { attackerRoll: attackerRoll, passeArme: attackerRoll.passeArme, show: {} }
|
let defenderRoll = { attackerRoll: attackerRoll, passeArme: attackerRoll.passeArme, show: {} }
|
||||||
attackerRoll.show = {
|
attackerRoll.show = {
|
||||||
cible: this.target ? this.defender.data.name : 'la cible',
|
cible: this.target ? this.defender.data.name : 'la cible',
|
||||||
@@ -1249,8 +1249,8 @@ export class RdDCombat {
|
|||||||
async accorderEntite(when = 'avant-encaissement') {
|
async accorderEntite(when = 'avant-encaissement') {
|
||||||
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
if (when != game.settings.get(SYSTEM_RDD, "accorder-entite-cauchemar")
|
||||||
|| this.defender == undefined
|
|| this.defender == undefined
|
||||||
|| !this.defender.isEntiteCauchemar()
|
|| !this.defender.isEntite([ENTITE_INCARNE])
|
||||||
|| this.defender.isEntiteCauchemarAccordee(this.attacker)) {
|
|| this.defender.isEntiteAccordee(this.attacker)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { ENTITE_BLURETTE, ENTITE_INCARNE, ENTITE_NONINCARNE } from "./constants.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extend the base Dialog entity by defining a custom window to perform roll.
|
* Extend the base Dialog entity by defining a custom window to perform roll.
|
||||||
* @extends {Dialog}
|
* @extends {Dialog}
|
||||||
@@ -7,15 +9,19 @@ export class RdDEncaisser extends Dialog {
|
|||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
constructor(html, actor) {
|
constructor(html, actor) {
|
||||||
// Common conf
|
// Common conf
|
||||||
const buttonsCreatures = {
|
let buttons = {};
|
||||||
"mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") },
|
if (!actor.isEntite()){
|
||||||
"non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") },
|
buttons = {
|
||||||
"sonne": { label: "Sonné", callback: html => this.actor.setSonne() },
|
"mortel": { label: "Mortel", callback: html => this.performEncaisser("mortel") },
|
||||||
};
|
"non-mortel": { label: "Non-mortel", callback: html => this.performEncaisser("non-mortel") },
|
||||||
const buttonsEntitesCauchemar = {
|
"sonne": { label: "Sonné", callback: html => this.actor.setSonne() },
|
||||||
"cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") }
|
};
|
||||||
};
|
}
|
||||||
const buttons = actor.isEntiteCauchemar() ? buttonsEntitesCauchemar : buttonsCreatures;
|
else if (actor.isEntite([ENTITE_BLURETTE, ENTITE_INCARNE])){
|
||||||
|
buttons = {
|
||||||
|
"cauchemar": { label: "cauchemar", callback: html => this.performEncaisser("cauchemar") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let dialogConf = {
|
let dialogConf = {
|
||||||
title: "Jet d'Encaissement",
|
title: "Jet d'Encaissement",
|
||||||
@@ -24,7 +30,6 @@ export class RdDEncaisser extends Dialog {
|
|||||||
default: "mortel"
|
default: "mortel"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let dialogOptions = {
|
let dialogOptions = {
|
||||||
classes: ["rdddialog"],
|
classes: ["rdddialog"],
|
||||||
width: 320,
|
width: 320,
|
||||||
|
|||||||
@@ -465,34 +465,32 @@ export class RdDUtility {
|
|||||||
/** Construit la structure récursive des conteneurs, avec imbrication potentielle
|
/** Construit la structure récursive des conteneurs, avec imbrication potentielle
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static buildConteneur(objet, niveau) {
|
static buildConteneur(objet, profondeur) {
|
||||||
if (!niveau) niveau = 1;
|
if (!profondeur) profondeur = 1;
|
||||||
objet.niveau = niveau;
|
objet.niveau = profondeur;
|
||||||
//console.log("OBJ:", objet);
|
const isConteneur = objet.type == 'conteneur';
|
||||||
let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html']({ item: objet });
|
const isOuvert = isConteneur && this.getAfficheContenu(objet._id);
|
||||||
if (objet.type == 'conteneur') {
|
const isVide = isConteneur && Misc.templateData(objet).contenu.length == 0;
|
||||||
const afficherContenu = this.getAfficheContenu(objet._id);
|
const conteneur = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html']({
|
||||||
str = str + RdDUtility.buildContenu(objet, niveau, afficherContenu);
|
item: objet,
|
||||||
}
|
vide: isVide,
|
||||||
return str;
|
ouvert: isOuvert
|
||||||
|
});
|
||||||
|
const contenu = isConteneur ? RdDUtility.buildContenu(objet, profondeur, isOuvert) : '';
|
||||||
|
return conteneur + contenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static buildContenu(objet, niveau, afficherContenu) {
|
static buildContenu(objet, profondeur, afficherContenu) {
|
||||||
if (!niveau) niveau = 1;
|
if (!profondeur) profondeur = 1;
|
||||||
objet.niveau = niveau;
|
objet.niveau = profondeur;
|
||||||
let strContenu = "";
|
const display = afficherContenu ? 'item-display-show' : 'item-display-hide';
|
||||||
//console.log("ITEM DISPLAYED", objet );
|
//console.log("ITEM DISPLAYED", objet );
|
||||||
if (afficherContenu) {
|
let strContenu = `<ul class='item-list alterne-list ${display} list-item-margin${profondeur}'>`;
|
||||||
strContenu = "<ul class='item-list alterne-list item-display-show list-item-margin" + niveau + "'>";
|
|
||||||
} else {
|
|
||||||
strContenu = "<ul class='item-list alterne-list item-display-hide list-item-margin" + niveau + "'>";
|
|
||||||
}
|
|
||||||
for (let subItem of objet.subItems) {
|
for (let subItem of objet.subItems) {
|
||||||
strContenu = strContenu + this.buildConteneur(subItem, niveau + 1);
|
strContenu += this.buildConteneur(subItem, profondeur + 1);
|
||||||
}
|
}
|
||||||
strContenu = strContenu + "</ul>";
|
return strContenu + "</ul>";
|
||||||
return strContenu;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
|||||||
@@ -806,16 +806,22 @@ ul, li {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-item-margin1 {
|
.list-item-margin1 {
|
||||||
margin-left: 1rem;
|
margin-left: 0.5rem;
|
||||||
}
|
}
|
||||||
.list-item-margin2 {
|
.list-item-margin2 {
|
||||||
margin-left: 2rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
.list-item-margin3 {
|
.list-item-margin3 {
|
||||||
margin-left: 3rem;
|
margin-left: 1.5rem;
|
||||||
}
|
}
|
||||||
.list-item-margin4 {
|
.list-item-margin4 {
|
||||||
margin-left: 4rem;
|
margin-left: 2rem;
|
||||||
|
}
|
||||||
|
.list-item-margin5 {
|
||||||
|
margin-left: 2.5rem;
|
||||||
|
}
|
||||||
|
.list-item-margin6 {
|
||||||
|
margin-left: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sheet-competence-img {
|
.sheet-competence-img {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/",
|
||||||
"license": "LICENSE.txt",
|
"license": "LICENSE.txt",
|
||||||
"flags": {},
|
"flags": {},
|
||||||
"version": "1.5.83",
|
"version": "1.5.85",
|
||||||
"minimumCoreVersion": "0.8.0",
|
"minimumCoreVersion": "0.8.0",
|
||||||
"compatibleCoreVersion": "9",
|
"compatibleCoreVersion": "9",
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
@@ -500,7 +500,7 @@
|
|||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"socket": true,
|
"socket": true,
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v1.5/system.json",
|
"manifest": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/v1.5/system.json",
|
||||||
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.83.zip",
|
"download": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/archive/foundryvtt-reve-de-dragon-1.5.85.zip",
|
||||||
"protected": false,
|
"protected": false,
|
||||||
"gridDistance": 1,
|
"gridDistance": 1,
|
||||||
"gridUnits": "m",
|
"gridUnits": "m",
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
{{#select data.definition.typeentite}}
|
{{#select data.definition.typeentite}}
|
||||||
<option value="incarne">Incarnée</option>
|
<option value="incarne">Incarnée</option>
|
||||||
<option value="nonincarne">Non Incarnée</option>
|
<option value="nonincarne">Non Incarnée</option>
|
||||||
|
<option value="blurette">Blurete</option>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1,9 +1,28 @@
|
|||||||
<li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true">
|
<li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true">
|
||||||
<img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/>
|
|
||||||
|
|
||||||
{{#if (eq item.type 'conteneur')}}
|
{{#if (eq item.type 'conteneur')}}
|
||||||
<span class="item-name conteneur-name flex-grow"><a data-item-id="{{item._id}}">+{{item.name}}</a></span>
|
<span class="sheet-competence-img conteneur-name">
|
||||||
|
{{#if vide}}
|
||||||
|
<i class="far fa-square"></i>
|
||||||
|
{{else}}
|
||||||
|
<a data-item-id="{{item._id}}">
|
||||||
|
{{#if ouvert}}
|
||||||
|
<i class="far fa-minus-square"></i>
|
||||||
|
<!-- <i class="far fa-caret-square-down"></i> -->
|
||||||
|
{{else}}
|
||||||
|
<i class="far fa-plus-square"></i>
|
||||||
|
<!-- <i class="fas fa-caret-square-right"></i> -->
|
||||||
|
{{/if}}
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
</span>
|
||||||
|
<span class="item-name conteneur-name flex-grow">
|
||||||
|
<a data-item-id="{{item._id}}">
|
||||||
|
<img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/>
|
||||||
|
{{item.name}}
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
<img class="sheet-competence-img" src="{{item.img}}" title="{{item.name}}"/>
|
||||||
<span class="item-name flex-grow">{{item.name}}</span>
|
<span class="item-name flex-grow">{{item.name}}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<span class="item-quantite">{{item.data.quantite}}
|
<span class="item-quantite">{{item.data.quantite}}
|
||||||
@@ -30,3 +49,4 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
@@ -217,7 +217,7 @@
|
|||||||
{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
{{#if options.editCaracComp}}Verrouiller{{else}}Déverrouiller{{/if}}</a></span>
|
||||||
<span class="flexrow">
|
<span class="flexrow">
|
||||||
<i class="fas fa-search"></i>
|
<i class="fas fa-search"></i>
|
||||||
<input class="cherchercompetence" type="text" value="{{options.cherchercompetence}}" name="cherchercompetence"
|
<input class="recherche" type="text" value="{{options.recherche.text}}" name="recherche"
|
||||||
size="8" data-dtype="String" placeholder="chercher"/>
|
size="8" data-dtype="String" placeholder="chercher"/>
|
||||||
<span></span>
|
<span></span>
|
||||||
</span>
|
</span>
|
||||||
@@ -690,7 +690,7 @@
|
|||||||
{{#each objets as |item id|}}
|
{{#each objets as |item id|}}
|
||||||
{{#unless item.estContenu}}
|
{{#unless item.estContenu}}
|
||||||
{{#if (ne item.type 'conteneur')}}
|
{{#if (ne item.type 'conteneur')}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html" item=item }}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-inventaire-conteneur.html" item=item vide=true ouvert=true }}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
Reference in New Issue
Block a user