Restyled character creation dialog.
Added dialog factory.
This commit is contained in:
@@ -6,10 +6,17 @@ const { NumberField, ObjectField } = foundry.data.fields;
|
||||
export const PROFESSION_OPTION_PICKS_KEY = "optionPicks";
|
||||
|
||||
export default class ProfessionItemData extends foundry.abstract.TypeDataModel {
|
||||
/** @inheritdoc */
|
||||
static migrateData(source, options, _state) {
|
||||
const bonds = Number(source.bonds);
|
||||
if (!Number.isFinite(bonds) || bonds < 1) source.bonds = 1;
|
||||
return super.migrateData(source, options, _state);
|
||||
}
|
||||
|
||||
static defineSchema() {
|
||||
return {
|
||||
...defineBaseItemSystemFields(),
|
||||
bonds: new NumberField({ initial: 0, min: 0, max: 5, integer: true }),
|
||||
bonds: new NumberField({ initial: 1, min: 1, max: 5, integer: true }),
|
||||
automaticSkills: new ObjectField({ initial: {} }),
|
||||
automaticSkillMeta: new ObjectField({ initial: {} }),
|
||||
optionSkills: new ObjectField({ initial: { [PROFESSION_OPTION_PICKS_KEY]: 0 } }),
|
||||
|
||||
Reference in New Issue
Block a user