register fields for database structur
parent
81da532074
commit
2414f3b8f3
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -43,7 +43,10 @@
|
|||
"character": {}
|
||||
},
|
||||
"Item": {
|
||||
"skill": {}
|
||||
"skill": {
|
||||
"StringField": ["name", "category", "attributeReference1", "attributeReference2", "attributeReference3"],
|
||||
"NumberField": ["handicapValue", "complexity"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"socket": false,
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
<label>Erstes Attribut
|
||||
<input type="text" name="system.attributeReference1.value" value="{{system.attributeReference1.value}}" />
|
||||
</label>
|
||||
<label>Erstes Attribut
|
||||
<label>Zweites Attribut
|
||||
<input type="text" name="system.attributeReference2.value" value="{{system.attributeReference2.value}}" />
|
||||
</label>
|
||||
<label>Erstes Attribut
|
||||
<label>Drittes Attribut
|
||||
<input type="text" name="system.attributeReference3.value" value="{{system.attributeReference3.value}}" />
|
||||
</label>
|
||||
<label>Behinderung
|
||||
|
|
|
|||
Loading…
Reference in New Issue