mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
FEAT: add DHHeritageSheet
This commit is contained in:
parent
89e1511aaa
commit
61ea8b85fb
7 changed files with 276 additions and 209 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import DHHeritageSheetV2 from './heritage.mjs';
|
||||
import DHHeritageSheet from '../api/heritage-sheet.mjs';
|
||||
|
||||
const { ItemSheetV2 } = foundry.applications.sheets;
|
||||
export default class AncestrySheet extends DHHeritageSheetV2(ItemSheetV2) {
|
||||
export default class AncestrySheet extends DHHeritageSheet {
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ['ancestry']
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,14 +50,11 @@ export default class ClassSheet extends DHBaseItemSheet {
|
|||
/** @inheritdoc */
|
||||
static TABS = {
|
||||
primary: {
|
||||
tabs: [
|
||||
{ id: 'description' },
|
||||
{ id: 'settings' },
|
||||
],
|
||||
initial: "description",
|
||||
labelPrefix: "DAGGERHEART.Sheets.Feature.Tabs"
|
||||
tabs: [{ id: 'description' }, { id: 'settings' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.Feature.Tabs'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_attachPartListeners(partId, htmlElement, options) {
|
||||
super._attachPartListeners(partId, htmlElement, options);
|
||||
|
|
@ -72,7 +69,6 @@ export default class ClassSheet extends DHBaseItemSheet {
|
|||
return context;
|
||||
}
|
||||
|
||||
|
||||
onAddTag(e) {
|
||||
if (e.detail.index === 2) {
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.Notification.Info.ClassCanOnlyHaveTwoDomains'));
|
||||
|
|
@ -137,9 +133,9 @@ export default class ClassSheet extends DHBaseItemSheet {
|
|||
|
||||
async selectActionType() {
|
||||
const content = await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/views/actionType.hbs',
|
||||
{ types: SYSTEM.ACTIONS.actionTypes }
|
||||
),
|
||||
'systems/daggerheart/templates/views/actionType.hbs',
|
||||
{ types: SYSTEM.ACTIONS.actionTypes }
|
||||
),
|
||||
title = 'Select Action Type',
|
||||
type = 'form',
|
||||
data = {};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
import DHHeritageSheetV2 from './heritage.mjs';
|
||||
import DHHeritageSheet from '../api/heritage-sheet.mjs';
|
||||
|
||||
const { ItemSheetV2 } = foundry.applications.sheets;
|
||||
export default class CommunitySheet extends DHHeritageSheetV2(ItemSheetV2) {
|
||||
export default class CommunitySheet extends DHHeritageSheet {
|
||||
/**@inheritdoc */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ['community']
|
||||
};
|
||||
|
||||
/**@inheritdoc */
|
||||
static PARTS = {
|
||||
header: { template: 'systems/daggerheart/templates/sheets/items/community/header.hbs' },
|
||||
...super.PARTS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue