Work on creating more of the necessary data models

This commit is contained in:
Oliver-Akins 2024-01-15 22:47:47 -07:00
parent ef9a3f2542
commit eb8d4f7c11
8 changed files with 56 additions and 15 deletions

View file

@ -1,11 +1,22 @@
import { itemTiers } from "../../config.mjs";
export class CommonItemData extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
cost: new fields.NumberField({
buy: new fields.NumberField({
initial: null,
nullable: true,
}),
usage_cost: new fields.NumberField({
initial: null,
nullable: true,
}),
tier: new fields.StringField({
initial: `simple`,
nullable: false,
choices: itemTiers,
}),
};
};
};