DND5e Core 1.2.0

DND5e Core update 1.2.0 modded to SW5e
This commit is contained in:
supervj 2021-01-19 20:52:33 -05:00
parent a544f5e0a9
commit ab510e336c
59 changed files with 2505 additions and 2231 deletions

View file

@ -1,6 +1,6 @@
/**
* A specialized form used to select from a checklist of attributes, traits, or properties
* @extends {FormApplication}
* @implements {FormApplication}
*/
export default class TraitSelector extends FormApplication {
@ -36,8 +36,8 @@ export default class TraitSelector extends FormApplication {
getData() {
// Get current values
let attr = getProperty(this.object.data, this.attribute) || {};
attr.value = attr.value || [];
let attr = getProperty(this.object._data, this.attribute);
if ( getType(attr) !== "Object" ) attr = {value: [], custom: ""};
// Populate choices
const choices = duplicate(this.options.choices);
@ -49,7 +49,7 @@ export default class TraitSelector extends FormApplication {
}
// Return data
return {
return {
allowCustom: this.options.allowCustom,
choices: choices,
custom: attr ? attr.custom : ""