mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-21 18:09:54 +02:00
Internalised ChatDamageData.prepareRolls to its own constructor
This commit is contained in:
parent
f1599bf566
commit
124c4749db
3 changed files with 7 additions and 4 deletions
|
|
@ -1,6 +1,12 @@
|
|||
import { triggerChatRollFx } from '../../helpers/utils.mjs';
|
||||
|
||||
export class ChatDamageData extends foundry.abstract.DataModel {
|
||||
constructor(data = {}, options = {}) {
|
||||
super(data, options);
|
||||
|
||||
this._prepareRolls();
|
||||
}
|
||||
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
|
||||
|
|
@ -21,7 +27,7 @@ export class ChatDamageData extends foundry.abstract.DataModel {
|
|||
if (!roll.evaluated) throw new Error('Roll objects added to ChatMessage documents must be evaluated');
|
||||
}
|
||||
|
||||
prepareRolls() {
|
||||
_prepareRolls() {
|
||||
for (const key of Object.keys(this.types)) {
|
||||
const type = this.types[key];
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue