mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
FEAT: BaseDataItem class
add TODO comments for future improvements FIX: Remove effect field on template FIX: remove unused DhpEffects file
This commit is contained in:
parent
5a2c69d48f
commit
ec7f32cdc7
14 changed files with 298 additions and 201 deletions
|
|
@ -1,11 +1,23 @@
|
|||
import featuresSchema from '../interface/featuresSchema.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,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export default class DHCommunity extends foundry.abstract.TypeDataModel {
|
||||
/** @inheritDoc */
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
description: new fields.HTMLField({}),
|
||||
...super.defineSchema(),
|
||||
//TODO: use DocumentUUIDField, DocumentIdField or create LocalDocumentField
|
||||
abilities: featuresSchema()
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue