diff --git a/src/module/Items/Skill.mjs b/src/module/Items/Skill.mjs index c93cb16b..35b02d88 100644 --- a/src/module/Items/Skill.mjs +++ b/src/module/Items/Skill.mjs @@ -1,4 +1,4 @@ -const { BooleanField, NumberField, SchemaField, SetField, StringField } = foundry.data.fields; +const { BooleanField, NumberField, SchemaField, SetField, StringField, HtmlField } = foundry.data.fields; export class Skill extends foundry.abstract.TypeDataModel { @@ -9,6 +9,8 @@ export class Skill extends foundry.abstract.TypeDataModel { attributeReference1: new StringField(), // References one of the eight attributes by name attributeReference2: new StringField(), // References one of the eight attributes by name attributeReference3: new StringField(), // References one of the eight attributes by name + requisite: new StringField(), // Required skills at a given level + text: new HtmlField(), handicapValue: new NumberField(), // BE-X complexity: new NumberField(), // In case of languages derivedAttribute1: new NumberField(), diff --git a/src/module/Items/SkillSheet.mjs b/src/module/Items/SkillSheet.mjs index 483145a9..427cf71d 100644 --- a/src/module/Items/SkillSheet.mjs +++ b/src/module/Items/SkillSheet.mjs @@ -34,6 +34,15 @@ export class SkillSheet extends ItemSheet { // Add the actor's data to context.data for easier access, as well as flags. context.system = skillData.system; context.flags = skillData.flags; + context.categoryOptions = { + combat: "Kampf", + physical: "Körperlich", + social: "Gesellschaft", + survival: "Natur", + knowledge: "Wissen", + languages: "Sprache und Schriften", + crafting: "Handwerk" + } return context; } diff --git a/src/system.json b/src/system.json index 94336b79..fd07ff43 100644 --- a/src/system.json +++ b/src/system.json @@ -44,8 +44,9 @@ }, "Item": { "skill": { - "StringField": ["name", "category", "attributeReference1", "attributeReference2", "attributeReference3"], - "NumberField": ["handicapValue", "complexity"] + "StringField": ["name", "category", "attributeReference1", "attributeReference2", "attributeReference3", "requisite"], + "NumberField": ["handicapValue", "complexity"], + "HtmlField": ["text"] } } }, diff --git a/src/templates/item/item-skill-sheet.hbs b/src/templates/item/item-skill-sheet.hbs index 341bf472..7398f07d 100644 --- a/src/templates/item/item-skill-sheet.hbs +++ b/src/templates/item/item-skill-sheet.hbs @@ -3,35 +3,56 @@ {{!-- Sheet Header --}} {{!-- Header stuff goes here --}} - + {{!-- Sheet Tab Navigation --}} - Description + Talent + Regeltext {{!-- Sheet Body --}} - -Erstes Attribut - - -Zweites Attribut - - -Drittes Attribut - - -Behinderung - - -Sprachenkomplexizität - - - + + + Kategorie + + {{selectOptions categoryOptions selected=value}} + + + + Erstes Attribut + + + Zweites Attribut + + + Drittes Attribut + + + Behinderung + + + Sprachenkomplexizität + + + + + + Beschreibungstext + {{editor system.text target="system.text" button=true owner=owner editable=editable}} + + Voraussetzung + + + + \ No newline at end of file