diff --git a/src/module/sheets/vornachteilSheet.mjs b/src/module/sheets/vornachteilSheet.mjs index 842bd24f..aec033b9 100644 --- a/src/module/sheets/vornachteilSheet.mjs +++ b/src/module/sheets/vornachteilSheet.mjs @@ -34,7 +34,13 @@ export class VornachteilSheet extends ItemSheet { // Add the actor's data to context.data for easier access, as well as flags. context.system = advantageData.system; context.flags = advantageData.flags; - context.json = JSON.stringify(advantageData.system, null, 4); + + context.choices = {} + context.system.auswahl.forEach(a => { + context.choices[a] = a + }) + context.hasChoices = context.system.auswahl.length > 0; + context.hasModality = context.system.value == null return context; } @@ -43,7 +49,7 @@ export class VornachteilSheet extends ItemSheet { super.activateListeners(html); // Everything below here is only needed if the sheet is editable - if (!this.isEditable) return; + if (!this.isEditable) } -} \ No newline at end of file +} diff --git a/src/style/_advantage-sheet.scss b/src/style/_advantage-sheet.scss new file mode 100644 index 00000000..105bce7f --- /dev/null +++ b/src/style/_advantage-sheet.scss @@ -0,0 +1,48 @@ +.dsa41.sheet.item.advantage { + + .sheet-body { + padding: 8px; + } + + .tab.advantage.active { + display: grid; + grid-template-columns: 1fr 1fr; + grid-template-rows: 48px 1fr; + gap: 8px; + height: 100%; + + div { + + label { + width: 100%; + display: inline-block; + } + + input { + width: 100%; + display: inline-block; + } + } + + .body { + grid-column: 1/3; + display: flex; + flex-direction: column; + height: 100%; + + label { + flex: 0; + } + + .editor { + flex: 1; + + border: 1px inset #ccc; + background-color: rgba(0, 0, 0, 0.2); + + } + } + + } + +} diff --git a/src/style/_equipment-sheet.scss b/src/style/_equipment-sheet.scss index 18b0ee70..80f041f0 100644 --- a/src/style/_equipment-sheet.scss +++ b/src/style/_equipment-sheet.scss @@ -6,7 +6,6 @@ .sheet-body { position: relative; - top: 5px; .tab.active { padding: 4px; diff --git a/src/style/_talent-sheet.scss b/src/style/_talent-sheet.scss new file mode 100644 index 00000000..6a083006 --- /dev/null +++ b/src/style/_talent-sheet.scss @@ -0,0 +1,51 @@ +.sheet.item.skill { + + .tab.meta.active { + + display: grid; + grid-template-areas: + "category category category" + "taw statistics ebe" + "language language language" + "attack attack attack"; + + gap: 8px; + margin: 8px; + + .category { + grid-area: category; + } + + .taw { + grid-area: taw; + } + + .statistics { + grid-area: statistics; + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: auto 1fr; + + .statistics > label { + grid-column: 1/4; + text-align: center; + } + } + + .ebe { + grid-area: ebe; + } + + .language-statistics { + grid-area: language; + } + + .attack-statistics { + grid-area: attack; + display: flex; + flex-direction: row; + } + + } + +} diff --git a/src/style/styles.scss b/src/style/styles.scss index 1f61b26b..e30542c1 100644 --- a/src/style/styles.scss +++ b/src/style/styles.scss @@ -11,4 +11,6 @@ @use "_player-action"; @use "_modify-liturgy"; @use "_liturgy-banner"; +@use "_talent-sheet"; @use "_active-effect-sheet"; +@use "_advantage-sheet"; diff --git a/src/system.json b/src/system.json index 847fe30a..bf0f5b45 100644 --- a/src/system.json +++ b/src/system.json @@ -113,7 +113,8 @@ ], "arrayFields": [ "talente", - "zauber" + "zauber", + "heldenausruestung" ] } }, diff --git a/src/templates/item/item-advantage-sheet.hbs b/src/templates/item/item-advantage-sheet.hbs index d50d00ce..71a66c55 100644 --- a/src/templates/item/item-advantage-sheet.hbs +++ b/src/templates/item/item-advantage-sheet.hbs @@ -2,13 +2,34 @@ {{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}}
-
-
{{json}}
+
+
+ + + +
+ {{#if hasModality}} +
+ + {{#if hasChoices}} + + {{else}} + + {{/if}} +
+ {{/if}} +
+ + {{editor system.description target="system.description" button=true owner=owner editable=editable}} +
+
diff --git a/src/templates/item/item-skill-sheet.hbs b/src/templates/item/item-skill-sheet.hbs index d6444eb6..1c0d8010 100644 --- a/src/templates/item/item-skill-sheet.hbs +++ b/src/templates/item/item-skill-sheet.hbs @@ -10,57 +10,62 @@
-
+
-
+
-
- +
+ + +
+ +
+
+
+ +
-
-
- -
-
-