mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Feature] Allow Dice Reroll in ChatMessage (#395)
* Troubleshooting Created test button in 'duality-roll.hbs' and functionality in chatLog.mjs * Updated functionality dialog recheck. * Update duality-roll.hbs testing toggle on specific areas so only tooltip is triggered. Rest of CSS functionality not affected. * Redoing Dice Reroll functionality Attempting something new * The rise of NaNs Resolved Dice Parsing Errors, now dealing with parsing errors from system values. * Forcing string evaluation for testing * Fixed rerolling of duality dice * Fixed message.rolls not being updated * Added support for d20 rolls * PR fixes --------- Co-authored-by: Nikhil Nagarajan <potter.nikhil@gmail.com>
This commit is contained in:
parent
2721dfe417
commit
6301e575e3
13 changed files with 593 additions and 490 deletions
|
|
@ -2,14 +2,14 @@ import { SYSTEM } from './module/config/system.mjs';
|
|||
import * as applications from './module/applications/_module.mjs';
|
||||
import * as models from './module/data/_module.mjs';
|
||||
import * as documents from './module/documents/_module.mjs';
|
||||
import * as dice from './module/dice/_module.mjs';
|
||||
import RegisterHandlebarsHelpers from './module/helpers/handlebarsHelper.mjs';
|
||||
import { enricherConfig, enricherRenderSetup } from './module/enrichers/_module.mjs';
|
||||
import { getCommandTarget, rollCommandToJSON } from './module/helpers/utils.mjs';
|
||||
import { NarrativeCountdowns } from './module/applications/ui/countdowns.mjs';
|
||||
import { DualityRollColor } from './module/data/settings/Appearance.mjs';
|
||||
import { DHRoll, DualityRoll, D20Roll, DamageRoll, DualityDie } from './module/dice/_module.mjs';
|
||||
import { enrichedDualityRoll, renderDualityButton } from './module/enrichers/DualityRollEnricher.mjs';
|
||||
import { renderMeasuredTemplate } from './module/enrichers/TemplateEnricher.mjs';
|
||||
import { enrichedDualityRoll } from './module/enrichers/DualityRollEnricher.mjs';
|
||||
import { registerCountdownHooks } from './module/data/countdowns.mjs';
|
||||
import {
|
||||
handlebarsRegistration,
|
||||
|
|
@ -20,14 +20,14 @@ import { placeables } from './module/canvas/_module.mjs';
|
|||
import { registerRollDiceHooks } from './module/dice/dhRoll.mjs';
|
||||
import { registerDHActorHooks } from './module/documents/actor.mjs';
|
||||
import './node_modules/@yaireo/tagify/dist/tagify.css';
|
||||
import { renderDamageButton } from './module/enrichers/DamageEnricher.mjs';
|
||||
|
||||
Hooks.once('init', () => {
|
||||
CONFIG.DH = SYSTEM;
|
||||
game.system.api = {
|
||||
applications,
|
||||
models,
|
||||
documents
|
||||
documents,
|
||||
dice
|
||||
};
|
||||
|
||||
CONFIG.TextEditor.enrichers.push(...enricherConfig);
|
||||
|
|
@ -49,7 +49,12 @@ Hooks.once('init', () => {
|
|||
DamageRoll: DamageRoll
|
||||
};
|
||||
|
||||
CONFIG.Dice.rolls = [...CONFIG.Dice.rolls, ...[DHRoll, DualityRoll, D20Roll, DamageRoll]];
|
||||
CONFIG.Dice.terms = {
|
||||
...CONFIG.Dice.terms,
|
||||
DualityDie
|
||||
};
|
||||
|
||||
CONFIG.Dice.rolls = [...CONFIG.Dice.rolls, DHRoll, DualityRoll, D20Roll, DamageRoll];
|
||||
CONFIG.MeasuredTemplate.objectClass = placeables.DhMeasuredTemplate;
|
||||
|
||||
const { DocumentSheetConfig } = foundry.applications.apps;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue