Minor fixes
This commit is contained in:
parent
3a8a8fa5fb
commit
99f67565cc
@ -198,7 +198,7 @@ export class RdDActor extends Actor {
|
||||
async checkMonnaiePresence(items) { // Ajout opportuniste si les pièces n'existent pas.
|
||||
if (!items) return; // Sanity check during import
|
||||
let manquantes = Monnaie.monnaiesManquantes(items);
|
||||
console.log("Manque : ", manquantes);
|
||||
//console.log("Manque : ", manquantes);
|
||||
if (manquantes.length > 0) {
|
||||
await this.createEmbeddedDocuments('Item', manquantes, { renderSheet: false });
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export class Monnaie {
|
||||
|
||||
static isSystemMonnaie(item) {
|
||||
let present = monnaiesData.find( monnaie => monnaie.data.valeur_deniers == item.data?.data?.valeur_deniers);
|
||||
return present;
|
||||
return present != undefined;
|
||||
}
|
||||
|
||||
static monnaiesData() {
|
||||
@ -39,12 +39,9 @@ export class Monnaie {
|
||||
}
|
||||
|
||||
static monnaiesManquantes(items) {
|
||||
const valeurs = Monnaie.filtrerMonnaies(items)
|
||||
.map(it => Misc.templateData(it).valeur_deniers);
|
||||
const manquantes = monnaiesData.filter(monnaie => !valeurs.find(v => v != Misc.templateData(monnaie).valeur_deniers));
|
||||
//const manquantes = monnaiesData.filter(monnaie => !valeurs.find(v => v != Misc.templateData(monnaie).valeur_deniers) );
|
||||
console.log("Valeurs : ", valeurs, manquantes);
|
||||
return []; //manquantes;
|
||||
const valeursPresentes = Monnaie.filtrerMonnaies(items)
|
||||
.map(it => Misc.templateData(it).valeur_deniers)
|
||||
return monnaiesData.filter(monnaie => !valeursPresentes.includes(Misc.templateData(monnaie).valeur_deniers) );
|
||||
}
|
||||
|
||||
static deValeur(monnaie, v) {
|
||||
|
@ -342,7 +342,7 @@ export class RdDUtility {
|
||||
formData.ombres = this.checkNull(formData.itemsByType['ombre']);
|
||||
formData.tetes = this.checkNull(formData.itemsByType['tete']);
|
||||
formData.taches = this.checkNull(formData.itemsByType['tache']);
|
||||
formData.monnaie = this.checkNull(formData.itemsByType['monnaie']);
|
||||
formData.monnaie = this.checkNull(formData.itemsByType['monnaie']);
|
||||
formData.nourritureboissons = this.checkNull(formData.itemsByType['nourritureboisson']);
|
||||
formData.meditations = this.checkNull(formData.itemsByType['meditation']);
|
||||
formData.chants = this.checkNull(formData.itemsByType['chant']);
|
||||
|
Loading…
Reference in New Issue
Block a user