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
+19
View File
@@ -0,0 +1,19 @@
export default class PrismRPGConsumable extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields
const requiredInteger = { required: true, nullable: false, integer: true }
const schema = {}
schema.description = new fields.HTMLField({ required: true, textSearch: true })
schema.usesMax = new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 })
schema.uses = new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 })
schema.encLoad = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
schema.cost = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
schema.notes = new fields.HTMLField({ required: true })
return schema
}
/** @override */
static LOCALIZATION_PREFIXES = ["PRISMRPG.Consumable"]
}