mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Fix conflicts
This commit is contained in:
commit
f747dc3c32
1060 changed files with 10292 additions and 4494 deletions
|
|
@ -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
7
module/dice/baseRoll.mjs
Normal 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';
|
||||
}
|
||||
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue