Remplacement progressif rencontres
This commit is contained in:
@ -48,8 +48,7 @@ export class SystemCompendiums extends FormApplication {
|
||||
|
||||
static async getContent(compendium, docType) {
|
||||
const pack = SystemCompendiums.getPack(compendium);
|
||||
if (pack.metadata.type == docType)
|
||||
{
|
||||
if (pack.metadata.type == docType) {
|
||||
return await pack.getDocuments();
|
||||
}
|
||||
return [];
|
||||
@ -59,6 +58,14 @@ export class SystemCompendiums extends FormApplication {
|
||||
return await SystemCompendiums.getContent(compendium, 'Item')
|
||||
}
|
||||
|
||||
static async getDefaultItems(compendium) {
|
||||
const pack = game.packs.get(SystemCompendiums._getDefaultCompendium(compendium));
|
||||
if (pack.metadata.type == 'Item') {
|
||||
return await pack.getDocuments();
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
static getCompendium(compendium) {
|
||||
const setting = CONFIGURABLE_COMPENDIUMS[compendium]?.setting;
|
||||
return setting ? game.settings.get(SYSTEM_RDD, setting) : SystemCompendiums._getDefaultCompendium(compendium);
|
||||
|
Reference in New Issue
Block a user