diff --git a/src/module/Items/SkillSheet.mjs b/src/module/Items/SkillSheet.mjs index 90b766d4..483145a9 100644 --- a/src/module/Items/SkillSheet.mjs +++ b/src/module/Items/SkillSheet.mjs @@ -19,4 +19,31 @@ export class SkillSheet extends ItemSheet { get template() { return `systems/DSA_4-1/templates/item/item-${this.item.type}-sheet.hbs`; } + + /** @override */ + getData() { + // Retrieve the data structure from the base sheet. You can inspect or log + // the context variable to see the structure, but some key properties for + // sheets are the actor object, the data object, whether or not it's + // editable, the items array, and the effects array. + const context = super.getData(); + + // Use a safe clone of the actor data for further operations. + const skillData = context.data; + + // Add the actor's data to context.data for easier access, as well as flags. + context.system = skillData.system; + context.flags = skillData.flags; + + return context; + } + + activateListeners(html) { + super.activateListeners(html); + + // Everything below here is only needed if the sheet is editable + if (!this.isEditable) return; + + } + } \ No newline at end of file diff --git a/src/system.json b/src/system.json index b70dd199..94336b79 100644 --- a/src/system.json +++ b/src/system.json @@ -43,7 +43,10 @@ "character": {} }, "Item": { - "skill": {} + "skill": { + "StringField": ["name", "category", "attributeReference1", "attributeReference2", "attributeReference3"], + "NumberField": ["handicapValue", "complexity"] + } } }, "socket": false, diff --git a/src/templates/item/item-skill-sheet.hbs b/src/templates/item/item-skill-sheet.hbs index 88fb854f..341bf472 100644 --- a/src/templates/item/item-skill-sheet.hbs +++ b/src/templates/item/item-skill-sheet.hbs @@ -18,10 +18,10 @@ -