12.0.5 - Les mauvais jours d'Astrobazzarh #706
@ -232,6 +232,7 @@ export class RdDBaseActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async cleanupConteneurs() {
|
async cleanupConteneurs() {
|
||||||
|
if (Misc.isOwnerPlayerOrUniqueConnectedGM(this)) {
|
||||||
let updates = this.itemTypes['conteneur']
|
let updates = this.itemTypes['conteneur']
|
||||||
.filter(c => c.system.contenu.filter(id => this.getItem(id) == undefined).length > 0)
|
.filter(c => c.system.contenu.filter(id => this.getItem(id) == undefined).length > 0)
|
||||||
.map(c => { return { _id: c._id, 'system.contenu': c.system.contenu.filter(id => this.getItem(id) != undefined) } });
|
.map(c => { return { _id: c._id, 'system.contenu': c.system.contenu.filter(id => this.getItem(id) != undefined) } });
|
||||||
@ -239,6 +240,7 @@ export class RdDBaseActor extends Actor {
|
|||||||
await this.updateEmbeddedDocuments("Item", updates)
|
await this.updateEmbeddedDocuments("Item", updates)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
getFortune() {
|
getFortune() {
|
||||||
|
Loading…
Reference in New Issue
Block a user