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,10 +1,21 @@
|
|||
import DaggerheartAction from "../action.mjs";
|
||||
import BaseDataItem from "./base.mjs";
|
||||
|
||||
export default class DHDomainCard extends BaseDataItem {
|
||||
/** @inheritDoc */
|
||||
static get metadata() {
|
||||
return foundry.utils.mergeObject(super.metadata, {
|
||||
label: "TYPES.Item.domainCard",
|
||||
type: "domainCard",
|
||||
hasDescription: true,
|
||||
});
|
||||
}
|
||||
|
||||
export default class DHDomainCard extends foundry.abstract.TypeDataModel {
|
||||
/** @inheritDoc */
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
...super.defineSchema(),
|
||||
domain: new fields.StringField(
|
||||
{ choices: SYSTEM.DOMAIN.domains, integer: false },
|
||||
{ required: true, initial: [] }
|
||||
|
|
@ -16,7 +27,6 @@ export default class DHDomainCard extends foundry.abstract.TypeDataModel {
|
|||
{ required: true, initial: [] }
|
||||
),
|
||||
foundation: new fields.BooleanField({ initial: false }),
|
||||
effect: new fields.HTMLField({}),
|
||||
inVault: new fields.BooleanField({ initial: false }),
|
||||
actions: new fields.ArrayField(new fields.EmbeddedDataField(DaggerheartAction))
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue