Remove properties from the data model that aspects don't need
This commit is contained in:
parent
96f5b17785
commit
1ba6cd0617
1 changed files with 9 additions and 2 deletions
|
|
@ -3,10 +3,17 @@ import { DescribedItemData } from "./DescribedItemData.mjs";
|
|||
export class AspectItemData extends DescribedItemData {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
const parentSchema = super.defineSchema();
|
||||
|
||||
// Purge fields that I don't want in this schema
|
||||
delete parentSchema.quantity;
|
||||
delete parentSchema.quantity_affects_used_capacity;
|
||||
delete parentSchema.usage_cost;
|
||||
|
||||
return mergeObject(parentSchema, {
|
||||
used: new fields.BooleanField({ initial: false }),
|
||||
/** The number of seconds that the effect of the aspect stays */
|
||||
deactivateAfter: new fields.NumberField({ nullable: true }),
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue