mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
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;
|
|
const fillColor = game.user?.color.toString() || '#777777';
|
|
|
|
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.range'
|
|
}),
|
|
angle: new fields.NumberField({
|
|
label: 'DAGGERHEART.GENERAL.angle'
|
|
}),
|
|
direction: new fields.NumberField({
|
|
initial: 0,
|
|
label: 'DAGGERHEART.GENERAL.direction'
|
|
}),
|
|
width: new fields.NumberField({
|
|
label: 'DAGGERHEART.GENERAL.width'
|
|
}),
|
|
fillColor: new fields.StringField({
|
|
required: true,
|
|
initial: fillColor,
|
|
label: 'DAGGERHEART.GENERAL.fillColor'
|
|
})
|
|
|
|
};
|
|
}
|
|
}
|