Various fixes around commands and rolltables

This commit is contained in:
2022-11-19 21:42:22 +01:00
parent a16a83457e
commit 2d6091d477
6 changed files with 31 additions and 28 deletions

View File

@ -57,10 +57,10 @@ const _manage_inn_roll = async (content, msg) => {
if (command[0] == "/auberge" && command[1]) {
msg["type"] = 0;
msg["rollMode"] = "gmroll";
var compendium = game.packs.get('WH4-fr-translation.plats-dauberges');
let rollList = [];
await compendium.getIndex().then(index => rollList = index);
rollList = rollList.contents;
var compendium = game.packs.get('wh4-fr-translation.plats-dauberges')
const pack = game.packs.get(compendium);
let rollList = await compendium.getDocuments()
//console.log("AUBERGE", rollList)
for (var i = 0; i < rollList.length; i++) {
var rollTab = rollList[i];
console.log("Got compendium...", rollList, rollTab.name);