mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
. (#1322)
This commit is contained in:
parent
81e7f24d22
commit
e6a242ba43
208 changed files with 421 additions and 206 deletions
|
|
@ -57,7 +57,11 @@ export default class ActionSelectionDialog extends HandlebarsApplicationMixin(Ap
|
|||
|
||||
/** @inheritDoc */
|
||||
async _prepareContext(options) {
|
||||
const actions = this.#item.system.actionsList,
|
||||
const actions = this.#item.system.actionsList.map(action => ({
|
||||
...action.toObject(),
|
||||
id: action.id,
|
||||
img: action.baseAction ? action.parent.parent.img : action.img
|
||||
})),
|
||||
itemName = this.#item.name;
|
||||
return {
|
||||
...(await super._prepareContext(options)),
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
|
|||
_id: new fields.DocumentIdField({ initial: () => foundry.utils.randomID() }),
|
||||
systemPath: new fields.StringField({ required: true, initial: 'actions' }),
|
||||
type: new fields.StringField({ initial: undefined, readonly: true, required: true }),
|
||||
baseAction: new fields.BooleanField({ initial: false }),
|
||||
name: new fields.StringField({ initial: undefined }),
|
||||
description: new fields.HTMLField(),
|
||||
img: new fields.FilePathField({ initial: undefined, categories: ['IMAGE'], base64: false }),
|
||||
|
|
|
|||
|
|
@ -258,7 +258,11 @@ export function ActionMixin(Base) {
|
|||
const systemData = {
|
||||
title: game.i18n.localize('DAGGERHEART.CONFIG.ActionType.action'),
|
||||
origin: origin,
|
||||
action: { name: this.name, img: this.img, tags: this.tags ? this.tags : ['Spell', 'Arcana', 'Lv 10'] },
|
||||
action: {
|
||||
name: this.name,
|
||||
img: this.baseAction ? this.parent.parent.img : this.img,
|
||||
tags: this.tags ? this.tags : ['Spell', 'Arcana', 'Lv 10']
|
||||
},
|
||||
itemOrigin: this.item,
|
||||
description: this.description || (this.item instanceof Item ? this.item.system.description : '')
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ export default class DHWeapon extends AttachableItem {
|
|||
name: 'Attack',
|
||||
img: 'icons/skills/melee/blood-slash-foam-red.webp',
|
||||
_id: foundry.utils.randomID(),
|
||||
baseAction: true,
|
||||
chatDisplay: false,
|
||||
systemPath: 'attack',
|
||||
type: 'attack',
|
||||
range: 'melee',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue