mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +01:00
Fixes
This commit is contained in:
parent
cd517252fa
commit
973e54df96
4 changed files with 13 additions and 6 deletions
|
|
@ -1080,6 +1080,9 @@
|
||||||
"hint": "The number of extra Long Rest Moves the character can take during a Long Rest."
|
"hint": "The number of extra Long Rest Moves the character can take during a Long Rest."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"maxLoadout": {
|
||||||
|
"label": "Max Loadout Cards Bonus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Character": {
|
"Character": {
|
||||||
|
|
|
||||||
|
|
@ -260,9 +260,9 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
||||||
icon: 'fa-solid fa-arrow-up',
|
icon: 'fa-solid fa-arrow-up',
|
||||||
condition: target => getDocFromElement(target).system.inVault,
|
condition: target => getDocFromElement(target).system.inVault,
|
||||||
callback: target => {
|
callback: target => {
|
||||||
const elem = getDocFromElement(target),
|
const doc = getDocFromElement(target),
|
||||||
actorLoadout = elem.actor?.system.loadoutSlot ?? null;
|
actorLoadout = doc.actor?.system.loadoutSlot ?? null;
|
||||||
if(actorLoadout?.available) return elem.update({ 'system.inVault': false });
|
if(actorLoadout?.available) return doc.update({ 'system.inVault': false });
|
||||||
ui.notifications.warn(game.i18n.format('DAGGERHEART.UI.Notifications.loadoutMaxReached', { max: actorLoadout.max }))
|
ui.notifications.warn(game.i18n.format('DAGGERHEART.UI.Notifications.loadoutMaxReached', { max: actorLoadout.max }))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -296,8 +296,8 @@ export default function DHApplicationMixin(Base) {
|
||||||
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem',
|
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem',
|
||||||
icon: 'fa-solid fa-burst',
|
icon: 'fa-solid fa-burst',
|
||||||
condition: target => {
|
condition: target => {
|
||||||
const elem = getDocFromElement(target);
|
const doc = getDocFromElement(target);
|
||||||
return !(elem.type === 'domainCard' && elem.system.inVault)
|
return !(doc.type === 'domainCard' && doc.system.inVault)
|
||||||
},
|
},
|
||||||
callback: (target, event) => getDocFromElement(target).use(event)
|
callback: (target, event) => getDocFromElement(target).use(event)
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -203,7 +203,11 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
maxLoadout : new fields.NumberField({ integer: true, initial: 0 })
|
maxLoadout : new fields.NumberField({
|
||||||
|
integer: true,
|
||||||
|
initial: 0,
|
||||||
|
label: 'DAGGERHEART.GENERAL.Bonuses.maxLoadout.label'
|
||||||
|
})
|
||||||
}),
|
}),
|
||||||
companion: new ForeignDocumentUUIDField({ type: 'Actor', nullable: true, initial: null }),
|
companion: new ForeignDocumentUUIDField({ type: 'Actor', nullable: true, initial: null }),
|
||||||
rules: new fields.SchemaField({
|
rules: new fields.SchemaField({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue