mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
actions types - attack roll
This commit is contained in:
parent
4c7f3a02c4
commit
edaf5df9e0
35 changed files with 1015 additions and 165 deletions
11
module/data/fields/actionField.mjs
Normal file
11
module/data/fields/actionField.mjs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { actionsTypes } from "../action/_module.mjs";
|
||||
|
||||
// Temporary Solution
|
||||
export default class ActionField extends foundry.data.fields.EmbeddedDataField {
|
||||
/** @override */
|
||||
initialize(value, model, options={}) {
|
||||
this.model = actionsTypes[value?.type] ?? actionsTypes.attack;
|
||||
this.fields = this._initialize(this.model.defineSchema());
|
||||
return super.initialize(value, model, options)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue