From e7f6e915162a5ef694f4f58ac7379a9dbf5aa50b Mon Sep 17 00:00:00 2001
From: Sven Balzer <4653051+Kyuusokuna@users.noreply.github.com>
Date: Sun, 4 May 2025 11:35:56 +0200
Subject: [PATCH] change Kampftalent.system.kategorie to be choices based and
use DSA41_input
---
src/ItemSheets/Kampftalent.hbs | 6 +-----
src/main.mjs | 10 +++++++++-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/ItemSheets/Kampftalent.hbs b/src/ItemSheets/Kampftalent.hbs
index 05a95cf..e96494b 100644
--- a/src/ItemSheets/Kampftalent.hbs
+++ b/src/ItemSheets/Kampftalent.hbs
@@ -12,11 +12,7 @@
-
+ {{DSA41_input "system.kategorie"}}
{{localize "DSA41.talente.label_kategorie"}}
diff --git a/src/main.mjs b/src/main.mjs
index 57045f0..cf90e4c 100644
--- a/src/main.mjs
+++ b/src/main.mjs
@@ -800,7 +800,15 @@ class DSA41_TalentData extends TypeDataModel {
class DSA41_KampftalentData extends TypeDataModel {
static defineSchema() {
return {
- kategorie: new StringField({ initial: "waffenlos" }),
+ kategorie: new StringField({
+ required: true,
+ choices: {
+ "waffenlos": "DSA41.kampftalent.kategorie.waffenlos",
+ "nahkampf": "DSA41.kampftalent.kategorie.nahkampf",
+ "fernkampf": "DSA41.kampftalent.kategorie.fernkampf",
+ },
+ initial: "waffenlos"
+ }),
behinderung: new StringField({ initial: "" }),
steigern: new SteigerungsKategorieField(),