mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 12:11:07 +01:00
Changed so ancestry uses a single Features field
This commit is contained in:
parent
635dae7a2e
commit
0bda6b5dbe
3 changed files with 46 additions and 31 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
||||
import ForeignDocumentUUIDField from '../fields/foreignDocumentUUIDField.mjs';
|
||||
import BaseDataItem from './base.mjs';
|
||||
|
||||
|
|
@ -14,11 +13,15 @@ export default class DHAncestry extends BaseDataItem {
|
|||
|
||||
/** @inheritDoc */
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
...super.defineSchema(),
|
||||
features: new ForeignDocumentUUIDArrayField({ type: 'Item' }),
|
||||
primaryFeature: new ForeignDocumentUUIDField({ type: 'Item' }),
|
||||
secondaryFeature: new ForeignDocumentUUIDField({ type: 'Item' })
|
||||
features: new fields.ArrayField(
|
||||
new fields.SchemaField({
|
||||
primary: new fields.BooleanField(),
|
||||
value: new ForeignDocumentUUIDField({ type: 'Item' })
|
||||
})
|
||||
)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue