Implements inventory system, wip

This commit is contained in:
2026-05-19 22:23:31 +02:00
parent 68e3d35af1
commit 4ff46865c2
29 changed files with 1317 additions and 35 deletions
+15
View File
@@ -136,6 +136,21 @@ export default class PrismRPGCharacter extends foundry.abstract.TypeDataModel {
}, {}),
)
// Sub-attribute choices for movement rating and burden selectors
const subAttributeChoices = () =>
Object.values(SYSTEM.SUB_ATTRIBUTES).reduce((obj, s) => { obj[s.id] = s.label; return obj }, {})
schema.movementRating = new fields.SchemaField({
subAttribute: new fields.StringField({ required: true, initial: "stamina", choices: subAttributeChoices }),
other: new fields.NumberField({ ...requiredInteger, initial: 0 }),
reduction: new fields.NumberField({ ...requiredInteger, initial: 0 })
})
schema.burden = new fields.SchemaField({
subAttribute: new fields.StringField({ required: true, initial: "vigor", choices: subAttributeChoices }),
other: new fields.NumberField({ ...requiredInteger, initial: 0 })
})
return schema
}