Add the data model for structures and prevent them from being embedded in most actors.
This commit is contained in:
parent
5286f403a1
commit
762b297895
4 changed files with 50 additions and 2 deletions
22
module/models/Item/Structure.mjs
Normal file
22
module/models/Item/Structure.mjs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { DescribedItemData } from "./DescribedItemData.mjs";
|
||||
|
||||
export class StructureItemData extends DescribedItemData {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return mergeObject(super.defineSchema(), {
|
||||
one_night: new fields.NumberField({
|
||||
initial: null,
|
||||
nullable: true,
|
||||
}),
|
||||
upkeep: new fields.NumberField({
|
||||
initial: null,
|
||||
nullable: true,
|
||||
}),
|
||||
construction_length: new fields.NumberField({
|
||||
min: 0,
|
||||
initial: 0,
|
||||
nullable: false,
|
||||
}),
|
||||
});
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue