mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
PR Fixes
This commit is contained in:
parent
af24b5064e
commit
baa7f6352e
10 changed files with 10 additions and 11 deletions
|
|
@ -61,7 +61,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
const removed = this.features.filter(x => !changes.system.features.includes(x));
|
||||
const added = changes.system.features.filter(x => !this.features.includes(x));
|
||||
|
||||
for (var weaponFeature of removed) {
|
||||
for (let weaponFeature of removed) {
|
||||
for (var effectId of weaponFeature.effectIds) {
|
||||
await this.parent.effects.get(effectId).delete();
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
changes.system.actions = this.actions.filter(x => !weaponFeature.actionIds.includes(x._id));
|
||||
}
|
||||
|
||||
for (var weaponFeature of added) {
|
||||
for (let weaponFeature of added) {
|
||||
const featureData = CONFIG.DH.ITEM.weaponFeatures[weaponFeature.value];
|
||||
if (featureData.effects?.length > 0) {
|
||||
const embeddedItems = await this.parent.createEmbeddedDocuments('ActiveEffect', [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue