mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
change armor and weapon to be attachableItem
This commit is contained in:
parent
1fc136c81b
commit
a78e1533d7
5 changed files with 82 additions and 19 deletions
|
|
@ -54,15 +54,6 @@ export default class DHArmor extends AttachableItem {
|
|||
const allowed = await super._preUpdate(changes, options, user);
|
||||
if (allowed === false) return false;
|
||||
|
||||
// Handle equipped status changes for attachment effects
|
||||
if (changes.system?.equipped !== undefined && changes.system.equipped !== this.equipped) {
|
||||
await handleAttachmentEffectsOnEquipChange({
|
||||
parentItem: this.parent,
|
||||
newEquippedStatus: changes.system.equipped,
|
||||
parentType: 'armor'
|
||||
});
|
||||
}
|
||||
|
||||
if (changes.system.features) {
|
||||
const removed = this.features.filter(x => !changes.system.features.includes(x));
|
||||
const added = changes.system.features.filter(x => !this.features.includes(x));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue