Added actions and effects to Ancestry and Community (#143)

This commit is contained in:
WBHarry 2025-06-15 13:18:52 +02:00 committed by GitHub
parent 5b94675db1
commit 0fbba51ad7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 272 additions and 170 deletions

View file

@ -1,12 +1,13 @@
import ActionField from '../fields/actionField.mjs';
import BaseDataItem from './base.mjs';
export default class DHAncestry extends BaseDataItem {
/** @inheritDoc */
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {
label: "TYPES.Item.ancestry",
type: "ancestry",
hasDescription: true,
label: 'TYPES.Item.ancestry',
type: 'ancestry',
hasDescription: true
});
}
@ -15,7 +16,7 @@ export default class DHAncestry extends BaseDataItem {
const fields = foundry.data.fields;
return {
...super.defineSchema(),
//TODO: add features field
actions: new fields.ArrayField(new ActionField())
};
}
}

View file

@ -1,22 +1,22 @@
import ActionField from '../fields/actionField.mjs';
import BaseDataItem from './base.mjs';
export default class DHCommunity extends BaseDataItem {
/** @inheritDoc */
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {
label: "TYPES.Item.community",
type: "community",
hasDescription: true,
label: 'TYPES.Item.community',
type: 'community',
hasDescription: true
});
}
/** @inheritDoc */
static defineSchema() {
const fields = foundry.data.fields;
return {
...super.defineSchema(),
//TODO: add features field
actions: new fields.ArrayField(new ActionField())
};
}
}