v11.0.10 - Les Songes de Khrachtchoum le Problémeux #658
@ -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) });
|
||||||
|
Loading…
Reference in New Issue
Block a user