Cleanup
This commit is contained in:
parent
9e6d5856b1
commit
a3694c1673
@ -2388,9 +2388,10 @@ export class RdDActor extends RdDBaseActor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async creerTacheDepuisLivre(item, options = { renderSheet: true }) {
|
async creerTacheDepuisLivre(item, options = { renderSheet: true }) {
|
||||||
|
// TODO: déplacer vers Item pour livres
|
||||||
const nomTache = "Lire " + item.name;
|
const nomTache = "Lire " + item.name;
|
||||||
const filterTacheLecture = it => it.type == 'tache' && it.name == nomTache;
|
const filterTacheLecture = it => it.name == nomTache;
|
||||||
let tachesExistantes = this.filterItems(filterTacheLecture);
|
let tachesExistantes = this.filterItems(filterTacheLecture, 'tache');
|
||||||
if (tachesExistantes.length == 0) {
|
if (tachesExistantes.length == 0) {
|
||||||
const tache = {
|
const tache = {
|
||||||
name: nomTache, type: 'tache',
|
name: nomTache, type: 'tache',
|
||||||
@ -2406,7 +2407,7 @@ export class RdDActor extends RdDBaseActor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
await this.createEmbeddedDocuments('Item', [tache], options);
|
await this.createEmbeddedDocuments('Item', [tache], options);
|
||||||
tachesExistantes = this.filterItems(filterTacheLecture);
|
tachesExistantes = this.filterItems(filterTacheLecture, 'tache');
|
||||||
}
|
}
|
||||||
return tachesExistantes.length > 0 ? tachesExistantes[0] : undefined;
|
return tachesExistantes.length > 0 ? tachesExistantes[0] : undefined;
|
||||||
}
|
}
|
||||||
|
@ -77,21 +77,21 @@ export class SystemReveDeDragon {
|
|||||||
this.RdDHotbar = RdDHotbar;
|
this.RdDHotbar = RdDHotbar;
|
||||||
this.itemClasses = {
|
this.itemClasses = {
|
||||||
blessure: RdDItemBlessure,
|
blessure: RdDItemBlessure,
|
||||||
service: RdDItemService,
|
|
||||||
maladie: RdDItemMaladie,
|
maladie: RdDItemMaladie,
|
||||||
|
ombre: RdDItemOmbre,
|
||||||
poison: RdDItemPoison,
|
poison: RdDItemPoison,
|
||||||
queue: RdDItemQueue,
|
queue: RdDItemQueue,
|
||||||
ombre: RdDItemOmbre,
|
rencontre: RdDRencontre,
|
||||||
souffle: RdDItemSouffle,
|
service: RdDItemService,
|
||||||
signedraconique: RdDItemSigneDraconique,
|
signedraconique: RdDItemSigneDraconique,
|
||||||
rencontre: RdDRencontre
|
souffle: RdDItemSouffle,
|
||||||
}
|
}
|
||||||
this.actorClasses = {
|
this.actorClasses = {
|
||||||
|
commerce: RdDCommerce,
|
||||||
creature: RdDActor,
|
creature: RdDActor,
|
||||||
entite: RdDActor,
|
entite: RdDActor,
|
||||||
personnage: RdDActor,
|
personnage: RdDActor,
|
||||||
vehicule: RdDActor,
|
vehicule: RdDActor,
|
||||||
commerce: RdDCommerce,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user