Skip to content

Commit

Permalink
add OSE specific Treasure table detection and handling, remove roll o…
Browse files Browse the repository at this point in the history
…ption from table.draw.
  • Loading branch information
Stew-rt committed Jun 2, 2023
1 parent 51b238a commit 1916af6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/module/helpers-macros.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @file Functions that make working with hotbar macros easier
*/
import {rollTreasure} from "./helpers-treasure";
/* -------------------------------------------- */
/* Hotbar Macros */
/* -------------------------------------------- */
Expand Down Expand Up @@ -114,6 +115,11 @@ export function rollTableMacro(tableUuId) {
})
);
}
return table.draw({ roll: true, displayChat: true });
//

if (table.getFlag(game.system.id, "treasure")) {
return rollTreasure(table);
}
return table.draw({ displayChat: true });
});
}
2 changes: 1 addition & 1 deletion src/module/helpers-treasure.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function drawTreasure(table, data) {
* @param table
* @param options
*/
async function rollTreasure(table, options = {}) {
export async function rollTreasure(table, options = {}) {
// Draw treasure
const data = await drawTreasure(table, {});
const templateData = {
Expand Down

0 comments on commit 1916af6

Please sign in to comment.