Add a setting to disable the auto tracking
This commit is contained in:
parent
1a4d764a15
commit
dff2455dc7
3 changed files with 22 additions and 1 deletions
|
|
@ -3,7 +3,8 @@ import { determinePrivacyFromRollMode } from "../utils/privacy.mjs";
|
|||
Hooks.on(`preCreateChatMessage`, (_message, context, options, author) => {
|
||||
const isNew = options.action === `create`;
|
||||
const hasRolls = context.rolls?.length > 0;
|
||||
if (!isNew || !hasRolls) { return };
|
||||
const autoTracking = game.settings.get(__ID__, `autoTrackRolls`);
|
||||
if (!isNew || !hasRolls || !autoTracking) { return };
|
||||
|
||||
/** An object of dice denomination to rows to add */
|
||||
const rows = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue