mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Dialog setup
This commit is contained in:
parent
97f8da69cd
commit
80c347471b
19 changed files with 473 additions and 14 deletions
|
|
@ -2,6 +2,7 @@ import CostSelectionDialog from '../../applications/costSelectionDialog.mjs';
|
|||
import { DHActionDiceData, DHActionRollData, DHDamageData, DHDamageField } from './actionDice.mjs';
|
||||
import DhpActor from '../../documents/actor.mjs';
|
||||
import D20RollDialog from '../../dialogs/d20RollDialog.mjs';
|
||||
import BeastformDialog from '../../dialogs/beastformDialog.mjs';
|
||||
|
||||
const fields = foundry.data.fields;
|
||||
|
||||
|
|
@ -271,7 +272,8 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
|||
}
|
||||
|
||||
if (this instanceof DhBeastformAction) {
|
||||
console.log('Test');
|
||||
config = await BeastformDialog.configure(config);
|
||||
if (!config) return;
|
||||
}
|
||||
|
||||
if (this.doFollowUp()) {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import DHFeature from './feature.mjs';
|
|||
import DHMiscellaneous from './miscellaneous.mjs';
|
||||
import DHSubclass from './subclass.mjs';
|
||||
import DHWeapon from './weapon.mjs';
|
||||
import DHBeastform from './beastform.mjs';
|
||||
|
||||
export {
|
||||
DHAncestry,
|
||||
|
|
@ -19,7 +20,8 @@ export {
|
|||
DHFeature,
|
||||
DHMiscellaneous,
|
||||
DHSubclass,
|
||||
DHWeapon
|
||||
DHWeapon,
|
||||
DHBeastform
|
||||
};
|
||||
|
||||
export const config = {
|
||||
|
|
@ -32,5 +34,6 @@ export const config = {
|
|||
feature: DHFeature,
|
||||
miscellaneous: DHMiscellaneous,
|
||||
subclass: DHSubclass,
|
||||
weapon: DHWeapon
|
||||
weapon: DHWeapon,
|
||||
beastform: DHBeastform
|
||||
};
|
||||
|
|
|
|||
32
module/data/item/beastform.mjs
Normal file
32
module/data/item/beastform.mjs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import ActionField from '../fields/actionField.mjs';
|
||||
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
|
||||
import BaseDataItem from './base.mjs';
|
||||
|
||||
export default class DHBeastform extends BaseDataItem {
|
||||
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Beastform'];
|
||||
|
||||
/** @inheritDoc */
|
||||
static get metadata() {
|
||||
return foundry.utils.mergeObject(super.metadata, {
|
||||
label: 'TYPES.Item.beastform',
|
||||
type: 'beastform',
|
||||
hasDescription: false
|
||||
});
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
...super.defineSchema(),
|
||||
tier: new fields.StringField({
|
||||
required: true,
|
||||
choices: SYSTEM.GENERAL.tiers,
|
||||
initial: SYSTEM.GENERAL.tiers.tier1.id
|
||||
}),
|
||||
examples: new fields.StringField(),
|
||||
advantageOn: new fields.ArrayField(new fields.StringField()),
|
||||
features: new ForeignDocumentUUIDArrayField({ type: 'Item' })
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue