mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Start on settings data model for template presets
This commit is contained in:
parent
554bc53dd8
commit
596e149968
5 changed files with 66 additions and 4 deletions
32
module/data/presetTemplate.mjs
Normal file
32
module/data/presetTemplate.mjs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
export const presetTemplateTypes = {
|
||||
circle: {
|
||||
id: 'circle',
|
||||
name: 'circle'
|
||||
},
|
||||
inFront: {
|
||||
id: 'inFront',
|
||||
name: 'inFront'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export default class DhPresetTemplate extends foundry.abstract.DataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
|
||||
return {
|
||||
type: new fields.StringField({
|
||||
required: true,
|
||||
choices: presetTemplateTypes,
|
||||
initial: presetTemplateTypes.inFront.name,
|
||||
label: 'DAGGERHEART.GENERAL.type'
|
||||
}),
|
||||
range: new fields.StringField({
|
||||
required: true,
|
||||
initial: "15",
|
||||
label: 'DAGGERHEART.GENERAL.type'
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue