Merge branch 'dev' into dev_skillslist
# Conflicts: # CHANGELOG.md # system/lang/en-en.json # system/lang/fr-fr.json # system/scripts/actor.js # system/scripts/actors/base-character-sheet.js # system/scripts/combat.js # system/scripts/config.js # system/scripts/dice/dice-picker-dialog.js # system/scripts/dice/roll-n-keep-dialog.js # system/scripts/gm/gm-monitor.js # system/scripts/gm/gm-toolbox.js # system/scripts/hooks.js # system/scripts/items/technique-sheet.js # system/scripts/main-l5r5e.js # system/scripts/migration.js # system/scripts/preloadTemplates.js # system/scripts/settings.js # system/scripts/socket-handler.js # system/styles/l5r5e.css # system/system.json # system/templates/actors/character-sheet.html
This commit is contained in:
@@ -274,7 +274,7 @@ export class HelpersL5r5e {
|
||||
document.prepareData();
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn("L5R5E | ", err);
|
||||
console.warn("L5R5E | Helpers | ", err);
|
||||
}
|
||||
return document;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ export class HelpersL5r5e {
|
||||
break;
|
||||
|
||||
default:
|
||||
console.log(`L5R5E | createObjectFromCompendium - Unmanaged type ${type}`);
|
||||
console.log(`L5R5E | Helpers | createObjectFromCompendium - Unmanaged type ${type}`);
|
||||
break;
|
||||
} // swi
|
||||
|
||||
@@ -330,7 +330,7 @@ export class HelpersL5r5e {
|
||||
if (gameProp) {
|
||||
return { id: gameProp.id, name: gameProp.name };
|
||||
} else {
|
||||
console.warn(`L5R5E | Unknown property id[${property.id}]`);
|
||||
console.warn(`L5R5E | Helpers | Unknown property id[${property.id}]`);
|
||||
}
|
||||
return property;
|
||||
})
|
||||
@@ -825,14 +825,14 @@ export class HelpersL5r5e {
|
||||
static async drawManyFromPack(pack, tableName, retrieve = 5, opt = { rollMode: "selfroll" }) {
|
||||
const comp = game.packs.get(pack);
|
||||
if (!comp) {
|
||||
console.log(`L5R5E | Pack not found[${pack}]`);
|
||||
console.log(`L5R5E | Helpers | Pack not found[${pack}]`);
|
||||
return;
|
||||
}
|
||||
await comp.getDocuments();
|
||||
|
||||
const table = await (/^[a-zA-Z0-9]{16}$/.test(tableName) ? comp.get(tableName) : comp.getName(tableName));
|
||||
if (!table) {
|
||||
console.log(`L5R5E | Table not found[${tableName}]`, comp, table);
|
||||
console.log(`L5R5E | Helpers | Table not found[${tableName}]`, comp, table);
|
||||
return;
|
||||
}
|
||||
return await table.drawMany(retrieve, opt);
|
||||
@@ -953,7 +953,7 @@ export class HelpersL5r5e {
|
||||
)}`;
|
||||
|
||||
choiceDiv.addEventListener("click", (clickEvent) => {
|
||||
const selectedIndex = clickEvent.target.attributes["data-id"].value;
|
||||
const selectedIndex = clickEvent.target.attributes["data-id"]?.value;
|
||||
if (!list[selectedIndex]) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user