Support des maladresses
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
|
||||
import { CompendiumTable, CompendiumTableHelpers, SystemCompendiums } from "./settings/system-compendiums.js";
|
||||
|
||||
export class RdDRollTables {
|
||||
@ -28,8 +29,8 @@ export class RdDRollTables {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async drawTextFromRollTable(tableName, toChat) {
|
||||
const drawResult = await RdDRollTables.genericGetTableResult(tableName, toChat);
|
||||
static async drawTextFromRollTable(tableName, options = {}) {
|
||||
const drawResult = await RdDRollTables.genericGetTableResult(tableName, options.toChat);
|
||||
return drawResult.text;
|
||||
}
|
||||
|
||||
@ -101,9 +102,10 @@ export class RdDRollTables {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async getMaladresse(options = { toChat: false, arme: false }) {
|
||||
return await RdDRollTables.drawTextFromRollTable(
|
||||
const maladresse = await RdDRollTables.drawTextFromRollTable(
|
||||
options.arme ? "Maladresse armé" : "Maladresses non armé",
|
||||
options.toChat);
|
||||
options);
|
||||
return await RdDTextEditor.enrichHTML(maladresse, undefined, {showLink:false})
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user