Fix conflicts

This commit is contained in:
Dapoolp 2025-08-22 12:27:50 +02:00
commit f747dc3c32
1060 changed files with 10292 additions and 4494 deletions

View file

@ -1,3 +1,4 @@
export { default as BaseRoll } from './baseRoll.mjs';
export { default as D20Roll } from './d20Roll.mjs';
export { default as DamageRoll } from './damageRoll.mjs';
export { default as DHRoll } from './dhRoll.mjs';

7
module/dice/baseRoll.mjs Normal file
View file

@ -0,0 +1,7 @@
export default class BaseRoll extends Roll {
/** @inheritdoc */
static CHAT_TEMPLATE = 'systems/daggerheart/templates/ui/chat/foundryRoll.hbs';
/** @inheritdoc */
static TOOLTIP_TEMPLATE = 'systems/daggerheart/templates/ui/chat/foundryRollTooltip.hbs';
}

View file

@ -81,7 +81,7 @@ export default class DHRoll extends Roll {
static async toMessage(roll, config) {
const cls = getDocumentClass('ChatMessage'),
msg = {
msgData = {
type: this.messageType,
user: game.user.id,
title: roll.title,
@ -91,8 +91,16 @@ export default class DHRoll extends Roll {
rolls: [roll]
};
config.selectedRollMode ??= game.settings.get('core', 'rollMode');
if (roll._evaluated) return await cls.create(msg, { rollMode: config.selectedRollMode });
return msg;
if (roll._evaluated) {
const message = await cls.create(msgData, { rollMode: config.selectedRollMode });
if (game.modules.get('dice-so-nice')?.active) {
await game.dice3d.waitFor3DAnimationByMessageID(message.id);
}
return message;
} else return msgData;
}
/** @inheritDoc */