From 063cbe02ee9afd8ee55e2f7062a8d8c71433f64d Mon Sep 17 00:00:00 2001 From: akrigline Date: Sun, 13 Sep 2020 12:07:57 -0400 Subject: [PATCH] register sheet with betterRolls --- src/foundryvtt-compactBeyond5eSheet.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/foundryvtt-compactBeyond5eSheet.ts b/src/foundryvtt-compactBeyond5eSheet.ts index 01634b4..ae45fc8 100644 --- a/src/foundryvtt-compactBeyond5eSheet.ts +++ b/src/foundryvtt-compactBeyond5eSheet.ts @@ -185,17 +185,22 @@ Hooks.once('setup', function () { // ready }); +// Register compactBeyond5eSheet Sheet +Actors.registerSheet('dnd5e', CompactBeyond5eSheet, { + types: ['character'], + makeDefault: false, +}); + /* ------------------------------------ */ /* When ready */ /* ------------------------------------ */ Hooks.once('ready', function () { - // Do anything once the module is ready + // register this sheet with BetterRolls + //@ts-ignore + if (window.BetterRolls) { + //@ts-ignore + window.BetterRolls.hooks.addActorSheet('CompactBeyond5eSheet'); + } }); // Add any additional hooks if necessary - -// Register compactBeyond5eSheet Sheet -Actors.registerSheet('dnd5e', CompactBeyond5eSheet, { - types: ['character'], - makeDefault: false, -});