Fix: /table milieu
régression causée par les changements de la fenêtre de recherche
This commit is contained in:
		| @@ -85,18 +85,18 @@ export class Environnement { | ||||
|   } | ||||
|  | ||||
|   async searchToChatMessage(milieux, typeName) { | ||||
|     const table = await this.buildEnvironnementTable(milieux); | ||||
|     const table = await this.buildEnvironnementTable(milieux, it => it.isEnvironnement()); | ||||
|     await CompendiumTableHelpers.tableToChatMessage(table, 'Item', ITEM_ENVIRONNEMENT_TYPES, typeName); | ||||
|     return true | ||||
|   } | ||||
|  | ||||
|   async getRandom(milieux, typeName) { | ||||
|     const table = await this.buildEnvironnementTable(milieux); | ||||
|     const table = await this.buildEnvironnementTable(milieux, it => it.isEnvironnement()); | ||||
|     return await CompendiumTableHelpers.getRandom(table, 'Item', ITEM_ENVIRONNEMENT_TYPES, undefined, typeName); | ||||
|   } | ||||
|  | ||||
|   async buildEnvironnementTable(milieux, filter) { | ||||
|     if (!milieux){ | ||||
|     if (!milieux) { | ||||
|       milieux = await this.milieux() | ||||
|     } | ||||
|     const frequence = item => item.getRarete(milieux)?.frequence ?? 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user