Work on creating more of the necessary data models
This commit is contained in:
parent
ef9a3f2542
commit
eb8d4f7c11
8 changed files with 56 additions and 15 deletions
|
|
@ -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,
|
||||
}),
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue