/auberge working again with 0.5.6

This commit is contained in:
LeRatierBretonnien 2020-05-12 09:24:49 +02:00
parent 5b1ea857f0
commit ce7002a738
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ const _manage_inn_roll = async (content, msg) => {
{
msg["type"] = 0;
msg["rollMode"] = "gmroll";
var compendium = game.packs.find(p => p.collection === 'WH4-fr-translation.plats-dauberges');
var compendium = game.packs.get('WH4-fr-translation.plats-dauberges');
let rollList = [];
await compendium.getIndex().then(index => rollList = index);
//console.log("Got compendium...", rollList.length);
@ -20,9 +20,9 @@ const _manage_inn_roll = async (content, msg) => {
if ( rollTab.name.toLowerCase().includes(command[1].toLowerCase()) ) {
let my_rollTable;
await compendium.getEntity(rollTab._id).then(mytab => my_rollTable = mytab);
var result = my_rollTable.roll();
console.log("RES: ", result[0], result[1] );
msg.content = my_rollTable.name + " : " + result[1].text;
let myroll = my_rollTable.roll();
//console.log("RES: ", myroll );
msg.content = my_rollTable.name + " : " + myroll.results[0].text;
//my_rollTable.draw();
ChatMessage.create(msg);
return false;

View File

@ -2,7 +2,7 @@
"name": "WH4-fr-translation",
"title": "Traduction du module WH4 en Français.",
"description": "La traduction du module WH4.",
"version": "0.71",
"version": "0.72",
"minimumCoreVersion" : "0.5.6",
"compatibleCoreVersion": "0.5.6",
"author": "LeRatierBretonnien",