Compare commits
1 Commits
a9b7dff83a
...
e138bc2b56
Author | SHA1 | Date | |
---|---|---|---|
e138bc2b56 |
@ -1,7 +1,4 @@
|
|||||||
# 12.0
|
# 12.0
|
||||||
## 12.0.28 - Les réserves d'Astrobazzarh
|
|
||||||
- possibilité de mettre en réserve depuis un sort connu
|
|
||||||
|
|
||||||
## 12.0.27 - Les vêtements d'Astrobazzarh
|
## 12.0.27 - Les vêtements d'Astrobazzarh
|
||||||
- Ajout de la liste des armures dans l'onglet caractéristiques
|
- Ajout de la liste des armures dans l'onglet caractéristiques
|
||||||
- Ajout d'une option pour choisir une carte des TMR alternatives
|
- Ajout d'une option pour choisir une carte des TMR alternatives
|
||||||
@ -118,9 +115,11 @@
|
|||||||
- encodage de l'export en windows-1252
|
- encodage de l'export en windows-1252
|
||||||
- export de l'esquive avec armure et sans armure
|
- export de l'esquive avec armure et sans armure
|
||||||
|
|
||||||
## 12.0.9 - 12.0.10 - Le scriptorium d'Astrobazzarh
|
## 12.0.10 - Le scriptorium d'Astrobazzarh
|
||||||
- corrections de l'export scriptarium
|
- corrections de l'export scriptarium
|
||||||
- ajout d'une fonction avancée pour un exporter "scriptarium" des personnages
|
|
||||||
|
## 12.0.9 - Le scriptorium d'Astrobazzarh
|
||||||
|
- ajout d'une fonction avancée pour exporter les personnages dans un format csv
|
||||||
|
|
||||||
## 12.0.8 - La quincaillerie d'Astrobazzarh
|
## 12.0.8 - La quincaillerie d'Astrobazzarh
|
||||||
- le propriétaire est indiqué dans les feuilles d'équipements/compétences/...
|
- le propriétaire est indiqué dans les feuilles d'équipements/compétences/...
|
||||||
|
@ -262,24 +262,7 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/chat-signe-draconique-actor.html'
|
'systems/foundryvtt-reve-de-dragon/templates/chat-signe-draconique-actor.html'
|
||||||
];
|
];
|
||||||
|
|
||||||
// foundry et options
|
|
||||||
Handlebars.registerHelper('RDD_CONFIG', path => RDD_CONFIG[path])
|
|
||||||
Handlebars.registerHelper('linkCompendium', (pack, id, name) => RdDUtility.linkCompendium(pack, id, name));
|
|
||||||
Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionnelles.isUsing(option));
|
|
||||||
|
|
||||||
Handlebars.registerHelper('plusMoins', diff => (diff > 0 ? '+' : '') + Math.round(diff))
|
|
||||||
|
|
||||||
// Handle v12 removal of this helper
|
|
||||||
Handlebars.registerHelper('select', function (selected, options) {
|
|
||||||
const escapedValue = RegExp.escape(Handlebars.escapeExpression(selected));
|
|
||||||
const rgx = new RegExp(' value=[\"\']' + escapedValue + '[\"\']');
|
|
||||||
const html = options.fn(this);
|
|
||||||
return html.replace(rgx, "$& selected");
|
|
||||||
})
|
|
||||||
|
|
||||||
// logic
|
|
||||||
Handlebars.registerHelper('either', (a, b) => a ?? b);
|
Handlebars.registerHelper('either', (a, b) => a ?? b);
|
||||||
// string manipulation
|
|
||||||
Handlebars.registerHelper('upperFirst', str => Misc.upperFirst(str ?? 'Null'));
|
Handlebars.registerHelper('upperFirst', str => Misc.upperFirst(str ?? 'Null'));
|
||||||
Handlebars.registerHelper('lowerFirst', str => Misc.lowerFirst(str ?? 'Null'));
|
Handlebars.registerHelper('lowerFirst', str => Misc.lowerFirst(str ?? 'Null'));
|
||||||
Handlebars.registerHelper('uppercase', str => str?.toUpperCase() ?? '');
|
Handlebars.registerHelper('uppercase', str => str?.toUpperCase() ?? '');
|
||||||
@ -289,52 +272,47 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('grammar-un', str => Grammar.articleIndetermine(str));
|
Handlebars.registerHelper('grammar-un', str => Grammar.articleIndetermine(str));
|
||||||
Handlebars.registerHelper('grammar-accord', (genre, ...args) => Grammar.accord(genre, args));
|
Handlebars.registerHelper('grammar-accord', (genre, ...args) => Grammar.accord(genre, args));
|
||||||
|
|
||||||
// math
|
Handlebars.registerHelper('RDD_CONFIG', path => RDD_CONFIG[path])
|
||||||
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
|
||||||
Handlebars.registerHelper('repeat', function(n, block) {
|
|
||||||
let accum = '';
|
|
||||||
for(let i = 0; i < n; ++i){
|
|
||||||
accum += block.fn(i)
|
|
||||||
}
|
|
||||||
return accum
|
|
||||||
})
|
|
||||||
|
|
||||||
// tableaux, listes
|
|
||||||
Handlebars.registerHelper('array-includes', (array, value) => array.includes(value));
|
|
||||||
Handlebars.registerHelper('isLastIndex', (index, list) => index + 1 >= list.length);
|
|
||||||
Handlebars.registerHelper('trier', list => list.sort((a, b) => a.name.localeCompare(b.name)));
|
|
||||||
|
|
||||||
// table de résolution
|
|
||||||
Handlebars.registerHelper('computeResolutionScore', (row, col) => RdDResolutionTable.computePercentage(row, col));
|
Handlebars.registerHelper('computeResolutionScore', (row, col) => RdDResolutionTable.computePercentage(row, col));
|
||||||
Handlebars.registerHelper('computeResolutionChances', (row, col) => RdDResolutionTable.computeChances(row, col));
|
Handlebars.registerHelper('computeResolutionChances', (row, col) => RdDResolutionTable.computeChances(row, col));
|
||||||
|
Handlebars.registerHelper('buildLigneInventaire', (item, options) => { return new Handlebars.SafeString(RdDUtility.buildLigneInventaire(item, options)); });
|
||||||
|
Handlebars.registerHelper('buildInventaireConteneur', (actorId, itemId, options) => { return new Handlebars.SafeString(RdDUtility.buildInventaireConteneur(actorId, itemId, options)); });
|
||||||
|
Handlebars.registerHelper('buildContenuConteneur', (item, options) => { return new Handlebars.SafeString(RdDUtility.buildContenuConteneur(item, options)); });
|
||||||
|
Handlebars.registerHelper('calculerPrixCommercant', item => item.calculerPrixCommercant());
|
||||||
|
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
||||||
|
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
||||||
|
Handlebars.registerHelper('typeTmr-name', type => TMRUtility.typeTmrName(type));
|
||||||
|
Handlebars.registerHelper('effetRencontre-name', coord => TMRUtility.typeTmrName(coord));
|
||||||
|
|
||||||
// gestion des dates et heures
|
|
||||||
Handlebars.registerHelper('timestamp-imgSigneHeure', (heure) => { return new Handlebars.SafeString(RdDTimestamp.imgSigneHeure(heure)) });
|
Handlebars.registerHelper('timestamp-imgSigneHeure', (heure) => { return new Handlebars.SafeString(RdDTimestamp.imgSigneHeure(heure)) });
|
||||||
Handlebars.registerHelper('timestamp-imgSigne', (heure) => { return new Handlebars.SafeString(RdDTimestamp.imgSigne(heure)) });
|
Handlebars.registerHelper('timestamp-imgSigne', (heure) => { return new Handlebars.SafeString(RdDTimestamp.imgSigne(heure)) });
|
||||||
Handlebars.registerHelper('timestamp-extract', timestamp => new RdDTimestamp(timestamp).toCalendrier());
|
Handlebars.registerHelper('timestamp-extract', timestamp => new RdDTimestamp(timestamp).toCalendrier());
|
||||||
Handlebars.registerHelper('timestamp-formulesDuree', () => RdDTimestamp.formulesDuree());
|
Handlebars.registerHelper('timestamp-formulesDuree', () => RdDTimestamp.formulesDuree());
|
||||||
Handlebars.registerHelper('timestamp-formulesPeriode', () => RdDTimestamp.formulesPeriode());
|
Handlebars.registerHelper('timestamp-formulesPeriode', () => RdDTimestamp.formulesPeriode());
|
||||||
|
|
||||||
// informations sur les acteurs
|
|
||||||
Handlebars.registerHelper('actor-default', (actorType, ...path) => RdDBaseActor.getDefaultValue(actorType, path.slice(0, -1)));
|
Handlebars.registerHelper('actor-default', (actorType, ...path) => RdDBaseActor.getDefaultValue(actorType, path.slice(0, -1)));
|
||||||
Handlebars.registerHelper('filtreTriCompetences', competences => RdDItemCompetence.triVisible(competences));
|
|
||||||
Handlebars.registerHelper('experienceLog-topic', topic => ExperienceLog.labelTopic(topic));
|
|
||||||
|
|
||||||
// inventaire et marchands
|
Handlebars.registerHelper('array-includes', (array, value) => array.includes(value));
|
||||||
Handlebars.registerHelper('buildLigneInventaire', (item, options) => { return new Handlebars.SafeString(RdDUtility.buildLigneInventaire(item, options)); });
|
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
|
||||||
Handlebars.registerHelper('buildInventaireConteneur', (actorId, itemId, options) => { return new Handlebars.SafeString(RdDUtility.buildInventaireConteneur(actorId, itemId, options)); });
|
Handlebars.registerHelper('isLastIndex', (index, list) => index + 1 >= list.length);
|
||||||
Handlebars.registerHelper('buildContenuConteneur', (item, options) => { return new Handlebars.SafeString(RdDUtility.buildContenuConteneur(item, options)); });
|
Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionnelles.isUsing(option));
|
||||||
Handlebars.registerHelper('calculerPrixCommercant', item => item.calculerPrixCommercant());
|
Handlebars.registerHelper('trier', list => list.sort((a, b) => a.name.localeCompare(b.name)));
|
||||||
|
Handlebars.registerHelper('filtreTriCompetences', competences => RdDItemCompetence.triVisible(competences));
|
||||||
|
Handlebars.registerHelper('linkCompendium', (pack, id, name) => RdDUtility.linkCompendium(pack, id, name));
|
||||||
Handlebars.registerHelper('uniteQuantite', (itemId, actorId) => RdDUtility.getItem(itemId, actorId)?.getUniteQuantite());
|
Handlebars.registerHelper('uniteQuantite', (itemId, actorId) => RdDUtility.getItem(itemId, actorId)?.getUniteQuantite());
|
||||||
Handlebars.registerHelper('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, field));
|
Handlebars.registerHelper('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, field));
|
||||||
// Items
|
|
||||||
Handlebars.registerHelper('rarete-getChamp', (rarete, field) => RdDRaretes.getChamp(rarete, field));
|
Handlebars.registerHelper('rarete-getChamp', (rarete, field) => RdDRaretes.getChamp(rarete, field));
|
||||||
|
|
||||||
// TMRs
|
Handlebars.registerHelper('plusMoins', diff => (diff > 0 ? '+' : '') + Math.round(diff))
|
||||||
Handlebars.registerHelper('caseTmr-label', coord => TMRUtility.getTMRLabel(coord));
|
Handlebars.registerHelper('experienceLog-topic', topic => ExperienceLog.labelTopic(topic));
|
||||||
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
|
||||||
Handlebars.registerHelper('typeTmr-name', type => TMRUtility.typeTmrName(type));
|
// Handle v12 removal of this helper
|
||||||
Handlebars.registerHelper('effetRencontre-name', coord => TMRUtility.typeTmrName(coord));
|
Handlebars.registerHelper('select', function (selected, options) {
|
||||||
|
const escapedValue = RegExp.escape(Handlebars.escapeExpression(selected));
|
||||||
|
const rgx = new RegExp(' value=[\"\']' + escapedValue + '[\"\']');
|
||||||
|
const html = options.fn(this);
|
||||||
|
return html.replace(rgx, "$& selected");
|
||||||
|
});
|
||||||
|
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
|
@ -824,6 +824,17 @@ input:is(.blessure-premiers_soins, .blessure-soins_complets) {
|
|||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.item-controls-img {
|
||||||
|
max-width: 1em;
|
||||||
|
max-height: 1em;
|
||||||
|
border-width: 0;
|
||||||
|
margin: 0;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
img.item-controls-img:hover {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
.rdd-roll-dialog .description-sort {
|
.rdd-roll-dialog .description-sort {
|
||||||
max-width: 550px;
|
max-width: 550px;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{#if sortsReserve.length}}
|
{{#if sortsReserve.length}}
|
||||||
<h3>Sorts en Réserve{{#if options.isGM}} <a class="sortreserve-add">
|
<h3>Sorts en Réserve{{#if options.isGM}} <a class="sortreserve-add">
|
||||||
<i class="fa-solid fa-sparkles"></i>
|
<img class="item-controls-img" src="systems/foundryvtt-reve-de-dragon/icons/tmr/sort-reserve.svg"/>
|
||||||
</a>{{/if}}
|
</a>{{/if}}
|
||||||
</h3>
|
</h3>
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
|
@ -2,14 +2,11 @@
|
|||||||
<h3>Sorts</h3>
|
<h3>Sorts</h3>
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
{{#each (trier sorts) as |sort key|}}
|
{{#each (trier sorts) as |sort key|}}
|
||||||
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}" data-tooltip="{{#if sort.system.isrituel}}Rituel{{else}}Sort{{/if}}: {{sort.name}}">
|
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}" data-tooltip="{{#if sort.system.isrituel}}Rituel{{else}}Sort{{/if}}: {{sort.name}}">
|
||||||
<img class="sheet-competence-img" src="{{sort.img}}"/>
|
<img class="sheet-competence-img" src="{{sort.img}}"/>
|
||||||
<span class="flex-shrink">{{itemSort-shortDraconic sort.system.draconic}}</span>
|
<span class="flex-shrink">{{itemSort-shortDraconic sort.system.draconic}}</span>
|
||||||
<span class="item-edit flex-grow-3">{{sort.name}}
|
<span class="item-edit flex-grow-3">{{sort.name}}
|
||||||
{{#if sort.system.isrituel}}<i class="fa-solid fa-book-sparkles"></i>{{/if}}
|
{{#if sort.system.isrituel}} <i class="fa-regular fa-book-sparkles"></i>{{/if}}
|
||||||
{{#if sort.system.coutseuil}}
|
|
||||||
{{#repeat sort.system.coutseuil}}<i class="fa-solid fa-star-sharp" data-tooltip="coût de seuil: {{sort.system.coutseuil}}"></i>{{/repeat}}
|
|
||||||
{{/if}}
|
|
||||||
</span>
|
</span>
|
||||||
<span class="flex-grow-2">
|
<span class="flex-grow-2">
|
||||||
{{#if sort.system.caseTMRspeciale}}{{sort.system.caseTMRspeciale}}{{else}}{{upperFirst sort.system.caseTMR}}{{/if}}
|
{{#if sort.system.caseTMRspeciale}}{{sort.system.caseTMRspeciale}}{{else}}{{upperFirst sort.system.caseTMR}}{{/if}}
|
||||||
@ -21,7 +18,7 @@
|
|||||||
<a class="item-montrer" data-tooltip="Montrer"><i class="fas fa-comment"></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))}}
|
{{#if (and @root.options.isGM (not sort.system.isrituel))}}
|
||||||
<a class="sortreserve-add" data-tooltip="Ajouter ce sort en réserve">
|
<a class="sortreserve-add" data-tooltip="Ajouter ce sort en réserve">
|
||||||
<i class="fa-solid fa-sparkles"></i>
|
<img class="item-controls-img" src="systems/foundryvtt-reve-de-dragon/icons/tmr/sort-reserve.svg"/>
|
||||||
</a>
|
</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user