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

@ -79,15 +79,6 @@ export default class DHWeapon 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: 'weapon'
});
}
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));