change armor and weapon to be attachableItem

This commit is contained in:
psitacus 2025-07-11 19:11:04 -06:00
parent 1fc136c81b
commit a78e1533d7
5 changed files with 82 additions and 19 deletions

View file

@ -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));