mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Review Inventory (#55)
* Weapons and Armor are now stored like any other item on the PC. Added equip/unequip logic. * Changed so that equip attempts always go through and the neccessary weapons are unequipped to fascilitate it * Fixed drag equip and extracted unequipBeforeEquip logic
This commit is contained in:
parent
d36520438a
commit
cf51153432
14 changed files with 106 additions and 143 deletions
|
|
@ -2,6 +2,7 @@ export default class DhpArmor extends foundry.abstract.TypeDataModel {
|
|||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
equipped: new fields.BooleanField({ initial: false }),
|
||||
baseScore: new fields.NumberField({ initial: 1, integer: true }),
|
||||
feature: new fields.StringField({
|
||||
choices: SYSTEM.ITEM.armorFeatures,
|
||||
|
|
@ -16,6 +17,7 @@ export default class DhpArmor extends foundry.abstract.TypeDataModel {
|
|||
major: new fields.NumberField({ initial: 0, integer: true }),
|
||||
severe: new fields.NumberField({ initial: 0, integer: true })
|
||||
}),
|
||||
quantity: new fields.NumberField({ initial: 1, integer: true }),
|
||||
description: new fields.HTMLField({})
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue