v11.0.10 - Les Songes de Khrachtchoum le Problémeux #658

Merged
uberwald merged 7 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2023-06-24 09:22:25 +02:00
Showing only changes of commit a43ceb3188 - Show all commits

View File

@ -119,7 +119,7 @@ export class RdDBaseActor extends Actor {
} }
listItems(type = undefined) { return (type ? this.itemTypes[type] : this.items); } listItems(type = undefined) { return (type ? this.itemTypes[type] : this.items); }
filterItems(filter, type = undefined) { return type ? this.itemTypes[type]?.filter(filter) ?? [] : []; } filterItems(filter, type = undefined) { return (type ? this.itemTypes[type] : this.items)?.filter(filter) ?? []; }
findItemLike(idOrName, type) { findItemLike(idOrName, type) {
return this.getItem(idOrName, type) return this.getItem(idOrName, type)
?? Misc.findFirstLike(idOrName, this.listItems(type), { description: Misc.typeName('Item', type) }); ?? Misc.findFirstLike(idOrName, this.listItems(type), { description: Misc.typeName('Item', type) });