mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-09 20:51:21 +01:00
Le massive export update
This commit is contained in:
parent
9c30e51546
commit
ea9e96ae96
60 changed files with 919 additions and 914 deletions
|
|
@ -1,7 +1,5 @@
|
|||
import BaseDataItem from './base.mjs';
|
||||
import ActionField from '../fields/actionField.mjs';
|
||||
import { weaponFeatures } from '../../config/itemConfig.mjs';
|
||||
import { actionsTypes } from '../action/_module.mjs';
|
||||
|
||||
export default class DHWeapon extends BaseDataItem {
|
||||
/** @inheritDoc */
|
||||
|
|
@ -71,7 +69,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
}
|
||||
|
||||
for (var feature of added) {
|
||||
const featureData = weaponFeatures[feature.value];
|
||||
const featureData = CONFIG.DH.ITEM.weaponFeatures[feature.value];
|
||||
if (featureData.effects?.length > 0) {
|
||||
const embeddedItems = await this.parent.createEmbeddedDocuments('ActiveEffect', [
|
||||
{
|
||||
|
|
@ -84,7 +82,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
}
|
||||
if (featureData.actions?.length > 0) {
|
||||
const newActions = featureData.actions.map(action => {
|
||||
const cls = actionsTypes[action.type];
|
||||
const cls = CONFIG.DH.ACTIONS.actionsTypes[action.type];
|
||||
return new cls(
|
||||
{ ...action, _id: foundry.utils.randomID(), name: game.i18n.localize(action.name) },
|
||||
{ parent: this }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue