Remove properties from the data model that aspects don't need

This commit is contained in:
Oliver-Akins 2024-03-23 13:00:09 -06:00
parent 96f5b17785
commit 1ba6cd0617

View file

@ -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 }),
};
});
};
};